Skip to main content

Documentation 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.

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 the /api/v1/despachos path and requires no authentication.

Base URL

EnvironmentBase URL
Localhttp://localhost:3002/api/v1/despachos
AWShttp://{ec2-app-ip}:3002/api/v1/despachos

Request format

All requests and responses use JSON. Set the Content-Type header to application/json for requests that include a body.
Content-Type: application/json
CORS is open for all origins (@CrossOrigin(origins = "*")), so the API is accessible from any client without preflight restrictions.

Data model

Each dispatch record (Despacho) contains the following fields.
idDespacho
Long
Auto-generated unique identifier for the dispatch. Assigned by the database on creation.
fechaDespacho
LocalDate
Dispatch date in ISO-8601 format (YYYY-MM-DD).
patenteCamion
String
Truck license plate assigned to carry out the delivery.
intento
int
Delivery attempt number. Increments on each failed delivery attempt.
idCompra
Long
Reference to the associated sale (Venta) ID. Links this dispatch to its originating sale record.
direccionCompra
String
Delivery address copied from the associated sale at dispatch creation time.
valorCompra
Long
Purchase value copied from the associated sale at dispatch creation time.
despachado
boolean
default:"false"
Indicates whether the delivery was completed. Defaults to false.

Available endpoints

See the endpoints page for full request/response details.
MethodPathDescription
POST/api/v1/despachosCreate a new dispatch
GET/api/v1/despachosList 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

status
HttpStatus
HTTP status enum value (e.g. NOT_FOUND, BAD_REQUEST).
message
String
Human-readable error message.
errors
object
Map of field names to error messages. Present on 404 responses and validation errors.
The API returns structured error responses for the following cases:
ConditionStatus codeDescription
Dispatch not found404 Not FoundThrown by DespachoNotFoundException when the requested idDespacho does not exist.
Validation failure400 Bad RequestReturned when required fields fail validation constraints.
Example 404 response
{
  "status": "NOT_FOUND",
  "message": "Despacho no encontrado",
  "errors": {
    "idDespacho": "ID de despacho no existe"
  }
}
Example 400 response
{
  "status": "BAD_REQUEST",
  "message": "Error de validación",
  "errors": {
    "fieldName": "validation error message"
  }
}

Build docs developers (and LLMs) love