The admin sales endpoints give administrators full visibility into every order placed through VinylVibes. Admins can list all sales across all users, inspect individual order details including line items and shipping addresses, and move orders through their lifecycle fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akibanks/tienda_musica_web/llms.txt
Use this file to discover all available pages before exploring further.
pendiente to entregada. All three endpoints require a valid JWT from an account with the admin role.
GET /admin/ventas
Authentication: Required — admin JWT Returns all orders across all users. This is the data source for the admin panel’s sales table, the pending-orders stat card, and the total revenue calculation. The frontend computes total revenue by summing each order’stotal, and counts pending orders by filtering for estado === 'pendiente'.
cURL Example
Response
Returns an array of order summary objects.Unique order ID.
Basic information about the buyer who placed the order.
Current order status. One of:
pendiente, pagada, enviada, entregada, or cancelada.Order total as a decimal string (e.g.,
"89.97").ISO 8601 timestamp of when the order was placed.
Response Example
Stats Calculation
The admin panel derives its summary cards from this endpoint’s response:GET /admin/ventas/{id}
Authentication: Required — admin JWT Returns the full detail for a single order, including its complete list of purchased vinyl records and the shipping address provided at checkout. The admin panel calls this endpoint when an admin clicks “Ver detalle” in the sales table.Path Parameter
| Parameter | Type | Description |
|---|---|---|
id | integer | Order ID |
cURL Example
Response
Unique order ID.
Basic information about the buyer.
Current order status.
Order total as a decimal string.
ISO 8601 creation timestamp.
Array of vinyl records included in the order.
Shipping address provided at checkout.
PUT /admin/ventas/{id}/estado
Authentication: Required — admin JWT Updates the status of a specific order. Status changes take effect immediately and are visible to the buyer inGET /mis-compras. The admin panel triggers a client-side stats refresh after a successful update, without a full page reload.
Path Parameter
| Parameter | Type | Description |
|---|---|---|
id | integer | Order ID |
Request Body
The new status to assign. Must be one of:
pendiente, pagada, enviada, entregada, cancelada.cURL Example
Success Response (200)
Order Status Lifecycle
| Status | Description |
|---|---|
pendiente | Order placed, awaiting processing |
pagada | Payment confirmed |
enviada | Order shipped |
entregada | Order delivered to customer |
cancelada | Order cancelled |