The Despachos API is a Spring Boot REST service that manages dispatch records for orders placed through the Innovatech Chile pet store. It exposes five CRUD endpoints under theDocumentation 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/despachos path and requires no authentication.
Base URL
| Environment | Base URL |
|---|---|
| Local | http://localhost:3002/api/v1/despachos |
| AWS | http://{ec2-app-ip}:3002/api/v1/despachos |
Request format
All requests and responses use JSON. Set theContent-Type header to application/json for requests that include a body.
@CrossOrigin(origins = "*")), so the API is accessible from any client without preflight restrictions.
Data model
Each dispatch record (Despacho) contains the following fields.
Auto-generated unique identifier for the dispatch. Assigned by the database on creation.
Dispatch date in ISO-8601 format (
YYYY-MM-DD).Truck license plate assigned to carry out the delivery.
Delivery attempt number. Increments on each failed delivery attempt.
Reference to the associated sale (
Venta) ID. Links this dispatch to its originating sale record.Delivery address copied from the associated sale at dispatch creation time.
Purchase value copied from the associated sale at dispatch creation time.
Indicates whether the delivery was completed. Defaults to
false.Available endpoints
See the endpoints page for full request/response details.| Method | Path | Description |
|---|---|---|
POST | /api/v1/despachos | Create a new dispatch |
GET | /api/v1/despachos | List all dispatches |
GET | /api/v1/despachos/{idDespacho} | Get a dispatch by ID |
PUT | /api/v1/despachos/{idDespacho} | Update an existing dispatch |
DELETE | /api/v1/despachos/{idDespacho} | Delete a dispatch |
Error handling
HTTP status enum value (e.g.
NOT_FOUND, BAD_REQUEST).Human-readable error message.
Map of field names to error messages. Present on 404 responses and validation errors.
| Condition | Status code | Description |
|---|---|---|
| Dispatch not found | 404 Not Found | Thrown by DespachoNotFoundException when the requested idDespacho does not exist. |
| Validation failure | 400 Bad Request | Returned when required fields fail validation constraints. |
Example 404 response
Example 400 response