Code | Description |
---|---|
404 | Resource Not Found |
422 | Validation Error |
500 | Internal Server Error |
curl 'https://app.octopi.co/api/v1/service_orders/ORDER_NUMBER/cancel.json' \ -X 'PUT' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token token=YOURTOKEN' \ -d '{ \ "service_order": { "cancellation_reason": "Lorem Ipsum" } }'
{ "id": 41, "order_number": "API_TEST_002", "due_at": "2024-04-30T20:00:00-04:00", "cargo_type": "container", "status": "cancelled", "comment": "Latest Comment", "created_at": "2024-01-29T05:33:55-05:00", "ordered_by": "System", "service_order_items": [ { "id": 74, "container_id": 4337700, "status": "cancelled", "cancelled_at": "2024-01-29T05:50:02-05:00", "cancelled_by": "System", "cancellation_reason": "Lorem Ipsum", "container_number": "0317933", "service_type": "custom", "service_id": 721, "service_name": "Repainting" }, { "id": 75, "container_id": 4337700, "status": "cancelled", "cancelled_at": "2024-01-29T05:50:02-05:00", "cancelled_by": "System", "cancellation_reason": "Lorem Ipsum", "container_number": "0317933", "service_type": "default", "service_id": "cleaning", "service_name": "Cleaning (Default)" } ] }
Param name | Description |
---|---|
order_number required |
Octopi ID or the unique service order number given while creating one. Validations:
|
service_order optional |
Validations:
|
service_order[cancellation_reason] required |
The reason for cancelling the service order. Validations:
|