The admin sales endpoints give administrators visibility into all purchase orders and the ability to advance orders through the fulfillment workflow. Read endpoints are accessible to bothDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akibanks/api-tienda-vinilos/llms.txt
Use this file to discover all available pages before exploring further.
admin and demo roles; the status-update operation is restricted to full admin accounts.
GET /admin/ventas
Returns every order in the system, ordered by date descending, with a nested summary of the purchasing customer.| Property | Value |
|---|---|
| Method | GET |
| Path | /admin/ventas |
| Auth | JWT — admin or demo role |
Request parameters
No query parameters or request body required.Response
Returns an array of venta (sale) objects.Unique identifier for the order.
Foreign key referencing the purchasing user’s
id_usuario.Total order value in the store’s currency, calculated server-side at checkout time.
Current fulfillment status of the order. One of
pendiente, pagada, enviada, entregada, cancelada.ISO 8601 timestamp of when the order was placed.
Nested summary of the customer who placed the order.
Example request
Example response
Error responses
| Status | Description |
|---|---|
401 | Missing or invalid JWT token. |
403 | Authenticated user does not have admin or demo role. |
500 | Internal server error while querying the database. |
GET /admin/ventas/:id
Returns the complete record for a single order, including all line items and the full shipping address.| Property | Value |
|---|---|
| Method | GET |
| Path | /admin/ventas/:id |
| Auth | JWT — admin or demo role |
Path parameters
The unique identifier (
id_venta) of the order to retrieve.Response
Returns the full venta object, including top-level fields fromGET /admin/ventas plus the expanded lineas and envio relationships.
Ordered line items included in this purchase.
Full shipping address recorded at checkout.
Example request
Example response
Error responses
| Status | Description |
|---|---|
401 | Missing or invalid JWT token. |
403 | Authenticated user does not have admin or demo role. |
404 | No order found with the given id_venta. |
500 | Internal server error while querying the database. |
PUT /admin/ventas/:id/estado
Updates the fulfillment status of an existing order.| Property | Value |
|---|---|
| Method | PUT |
| Path | /admin/ventas/:id/estado |
| Auth | JWT — admin role only |
Path parameters
The unique identifier (
id_venta) of the order to update.Body parameters
The new fulfillment status. Must be one of
pendiente, pagada, enviada, entregada, cancelada.Valid states
| Estado | Description |
|---|---|
pendiente | Order created; payment not yet confirmed. |
pagada | Payment confirmed. This is the initial state assigned at checkout. |
enviada | Order has been dispatched to the carrier. |
entregada | Order received by the customer. |
cancelada | Order was cancelled. |
Response
Example request
Error responses
| Status | Description |
|---|---|
400 | estado is missing or not one of the five valid values. |
401 | Missing or invalid JWT token. |
403 | Authenticated user is not admin, or is a demo account (write blocked). |
500 | Internal server error while updating the database. |