The Ventas API exposes five endpoints for managing sales records. All endpoints are served under the base pathDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DevOpsDuoc/Evaluacion02_Devop_Innovatech/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1/ventas. See the overview page for base URLs, the data model, and error handling.
POST /api/v1/ventas
Creates a new sale record. Returns201 Created with the created object and a Location header pointing to the new resource.
Body parameters
Purchase and delivery address. Cannot be blank.
Purchase value (amount).
Purchase date in ISO-8601 format (
YYYY-MM-DD). Cannot be null.Whether a dispatch record has been generated. Defaults to
false.Example
| Status | Description |
|---|---|
201 Created | Sale created successfully. Location header contains the URI of the new resource. |
400 Bad Request | Validation failed. Required fields are missing or blank. |
GET /api/v1/ventas
Returns a list of all sale records in the system.Example
| Status | Description |
|---|---|
200 OK | Returns an array of all sales. Returns an empty array when no records exist. |
GET /api/v1/ventas/
Returns the details of a single sale by its ID.Path parameters
The unique identifier of the sale to retrieve.
Example
| Status | Description |
|---|---|
200 OK | Sale found and returned. |
404 Not Found | No sale exists with the given idVenta. |
PUT /api/v1/ventas/
Updates an existing sale with new field values. All body fields are replaced with the provided values.Path parameters
The unique identifier of the sale to update.
Body parameters
Updated purchase and delivery address. Cannot be blank.
Updated purchase value.
Updated purchase date in ISO-8601 format (
YYYY-MM-DD).Updated dispatch status.
Example
| Status | Description |
|---|---|
200 OK | Sale updated successfully. Returns the updated object. |
400 Bad Request | Validation failed on one or more fields. |
404 Not Found | No sale exists with the given idVenta. |
DELETE /api/v1/ventas/
Permanently deletes a sale record. Returns no body on success.Path parameters
The unique identifier of the sale to delete.
Example
| Status | Description |
|---|---|
204 No Content | Sale deleted successfully. No response body. |
404 Not Found | No sale exists with the given idVenta. |