Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt

Use this file to discover all available pages before exploring further.

The Products API has two areas: the product catalog (materials and equipment tracked in inventory) and pendiente items (the specific quantities of products used in a given work order). Products are identified by barcode and have a unit cost. When a technician uses materials on a job, those are recorded as items on the pendiente.
All endpoints require a valid Bearer token. Include Authorization: Bearer <token> in every request header.

Products

List active products

GET /api/productos Returns a paginated list of active products.

Query parameters

page
number
default:"0"
Zero-based page index.
size
number
default:"20"
Number of records per page.
curl --request GET \
  --url 'https://your-api.example.com/api/productos?page=0&size=20' \
  --header 'Authorization: Bearer <token>'

Response fields

id
number
Unique product ID.
codigoBarra
string
Barcode identifier.
nombre
string
Product name.
descripcion
string
Product description.
costoUnitario
number
Unit cost in the local currency.
vigente
boolean
true if the product is active.

Get product by ID

GET /api/productos/{id} Returns a single product record.
id
number
required
Numeric product ID.
curl --request GET \
  --url 'https://your-api.example.com/api/productos/7' \
  --header 'Authorization: Bearer <token>'

Create a product

POST /api/productos Adds a new product to the catalog.
codigoBarra
string
required
Unique barcode string for the product.
nombre
string
required
Product name (e.g., Router TP-Link TL-WR840N).
descripcion
string
Additional product description.
costoUnitario
number
required
Unit cost. Use a decimal value (e.g., 45.00).
curl --request POST \
  --url 'https://your-api.example.com/api/productos' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "codigoBarra": "7501234567890",
    "nombre": "Router TP-Link TL-WR840N",
    "descripcion": "Wireless N router 300 Mbps, dual antenna",
    "costoUnitario": 45.00
  }'

Update a product

PUT /api/productos/{id} Updates an existing product record.
id
number
required
Numeric ID of the product to update.
All body fields from Create a product are accepted. Only included fields are updated.
curl --request PUT \
  --url 'https://your-api.example.com/api/productos/7' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "costoUnitario": 48.50
  }'

Delete a product

DELETE /api/productos/{id} Soft-deletes a product by setting vigente = false.
id
number
required
Numeric ID of the product to deactivate.
Deactivating a product does not remove it from existing pendiente item records. Historical usage data is preserved.
curl --request DELETE \
  --url 'https://your-api.example.com/api/productos/7' \
  --header 'Authorization: Bearer <token>'

Pendiente items

Pendiente items record which products (and in what quantity) were used in a specific work order (pendiente). They link a product to a pendiente with cost details.

List items for a pendiente

GET /api/productos/pendientes/{pendienteId}/items Returns all active items associated with a specific work order.
pendienteId
number
required
The ID of the work order (pendiente) to retrieve items for.
curl --request GET \
  --url 'https://your-api.example.com/api/productos/pendientes/15/items' \
  --header 'Authorization: Bearer <token>'

Response fields

id
number
Item ID.
pendienteId
number
ID of the associated work order.
producto
object
The product used.
descripcion
string
Notes about this specific usage.
cantidad
number
Quantity used.
costoUnitario
number
Unit cost at time of use (may differ from current product cost).
costoTotal
number
Total cost: cantidad × costoUnitario.

Create a pendiente item

POST /api/productos/pendientes/items Records a product as having been used in a work order.
pendienteId
number
required
ID of the work order.
productoId
number
required
ID of the product used.
descripcion
string
Notes about this usage (e.g., installation details).
cantidad
number
required
Quantity of the product used.
costoUnitario
number
required
Unit cost at the time of use. Store the current price to preserve cost history.
costoTotal
number
required
Total cost. Should equal cantidad × costoUnitario.
Always record costoUnitario at the time of use rather than relying on the product’s current price. This preserves accurate cost history even if product prices change later.
curl --request POST \
  --url 'https://your-api.example.com/api/productos/pendientes/items' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "pendienteId": 15,
    "productoId": 7,
    "descripcion": "Router installed at client premises",
    "cantidad": 1,
    "costoUnitario": 45.00,
    "costoTotal": 45.00
  }'

Update a pendiente item

PUT /api/productos/pendientes/items/{id} Updates an existing pendiente item (e.g., to correct quantity or cost).
id
number
required
Numeric ID of the pendiente item to update.
All body fields from Create a pendiente item are accepted.
curl --request PUT \
  --url 'https://your-api.example.com/api/productos/pendientes/items/88' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "cantidad": 2,
    "costoTotal": 90.00
  }'

Delete a pendiente item

DELETE /api/productos/pendientes/items/{id} Soft-deletes a pendiente item.
id
number
required
Numeric ID of the item to deactivate.
curl --request DELETE \
  --url 'https://your-api.example.com/api/productos/pendientes/items/88' \
  --header 'Authorization: Bearer <token>'

Build docs developers (and LLMs) love