Cancel Order
Cancels an existing hardware order. The order must be in PENDING or QUOTED status and belong to the authenticated company.
Authentication
This endpoint requires authentication. See Authentication for details.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | UUID of the order request to be cancelled |
| companyCode | string | Yes | Company code of the authenticated company |
Request
Production URL: https://orchestrator.tecspal.com/
Sandbox URL: https://tecspal-orchestrator.sandbox.lexartlabs.uy/
Endpoint: POST /orders/cancel
Example Request
{
"data": {
"id": "3178e7e9-0fe9-47ad-b69a-e5604a990822",
"companyCode": "DM1"
},
"request": "orders/cancel",
"vendor": "tecspal",
"verb": "POST"
}
Response Schema
| Property | Type | Description |
|---|---|---|
| statusCode | number | HTTP status code of the response (200 on success) |
| message | string | Description of the response status (e.g. Request successful) |
| envelop | array | Array containing the cancelled order minimal data |
Envelope Item Properties
Cada item dentro de envelop terá apenas os campos essenciais da order cancelada:
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of the order |
| status | string | Final status of the order (CANCELLED) |
Example Response
{
"statusCode": 200,
"message": "Request successful",
"envelop": [
{
"id": "3178e7e9-0fe9-47ad-b69a-e5604a990822",
"status": "CANCELLED"
}
]
}
Error Responses
Bad Request (400) - Missing ID
{
"error": "Bad Request",
"message": "id is required",
"statusCode": 400
}
Invalid Company or Order (400)
{
"error": "Bad Request",
"message": "Order request not found",
"statusCode": 400
}
Invalid Status (400)
{
"error": "Bad Request",
"message": "The Order cannot be cancelled. Only orders with status PENDING or QUOTED can be cancelled",
"statusCode": 400
}
Unauthorized (401)
{
"error": "Unauthorized",
"message": "Unauthorized access",
"statusCode": 401
}
Notes
- Only orders with status
PENDINGorQUOTEDcan be cancelled via this endpoint. - Cancelling the order updates its status to
CANCELLED. - The
companyCodeprovided must match the company associated with the order. - If the order is already in
CANCELLEDstatus, the endpoint will return the sameidandstatuswithout making changes (idempotent behavior). - A status history record is created when an order is cancelled.
- The company associated with the order will receive a notification when the order is cancelled.