POST
Update status
Update the custom status of a specific order. Automatically sends notifications based on status configuration.
POST
/v1/orders/:order_id/statusAuthentication
This endpoint requires a valid API key with
canChangeOrderStatus permission. The API key must be passed in the X-API-Key header.X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPath parameters
| Parameter | Description |
|---|---|
| order_idstring · Required | Order identifier (UUID by default, or Shopify order ID numeric portion if use_shopify_order_id is true in request body). For Shopify order IDs, extract the number from the GID format (e.g., for 'gid://shopify/Order/450789469', use '450789469'). |
Request body
| Parameter | Description |
|---|---|
| use_shopify_order_idboolean · Optional, default false | Set to 'true' to look up order using Shopify order ID instead of UUID. Extract the number from Shopify's GID format (gid://shopify/Order/450789469 → 450789469) and use it in the order_id path parameter. |
| status_idstring · Required | The UUID of the custom status |
| sub_status_option_idstring · Optional | The UUID of the sub-status option. Required if the status has sub-status options. |
Response
Returns confirmation with updated order details:
{
"success": true,
"data": {
"message": "string",
"order": {
"id": "string",
"shopify_order_id": "string",
"name": "string",
"status": {
"id": "string",
"name": "string",
"color": "string"
},
"sub_status": null
},
"notifications": {
"total_sent": 0,
"total_failed": 0,
"by_channel": {
"email": {
"sent": 0,
"failed": 0
},
"sms": {
"sent": 0,
"failed": 0
},
"whatsapp": {
"sent": 0,
"failed": 0
}
}
},
"orders_fulfilled": 0,
"fulfillment_errors": [
{
"channel": "string",
"code": "string",
"message": "string"
}
]
}
}Response fields
Root response object
| Field | Description |
|---|---|
| successboolean | Always true on a successful response. |
| dataobject | The endpoint's payload. Its fields are listed in the tables below. |
| messagestring | Confirmation message |
| orderobject | Object containing updated order details |
| notificationsobject | Notification delivery summary. |
| orders_fulfillednumber | Number of orders whose fulfilment was applied. |
| fulfillment_errorsarray | Fulfilment errors; a blocked fulfilment never half-applies. |
Order object
| Field | Description |
|---|---|
| idstring | Unique identifier for the order (UUID) |
| shopify_order_idstring | Shopify's global ID for the order |
| namestring | Order number (e.g., #1001) |
| statusobject | Status object with id, name, and color |
| sub_statusobject | null | Sub-status object with id and name (if applicable) |
Status object fields
| Field | Description |
|---|---|
| idstring | Unique identifier for the custom status |
| namestring | Display name of the status (uses public name if configured) |
| colorstring | Hex color code for the status |
Sub-status object
| Field | Description |
|---|---|
| idstring | Unique identifier for the sub-status |
| namestring | Name of the sub-status |
Notifications object fields
| Field | Description |
|---|---|
| total_sentnumber | Number of notifications sent. |
| total_failednumber | Number of notifications that failed. |
| by_channelobject | Per-channel counts: always email, sms and whatsapp, each { sent, failed } |
By channel object fields
| Field | Description |
|---|---|
| emailobject | Email notification counts |
| smsobject | SMS notification counts |
| whatsappobject | WhatsApp notification counts |
Channel stats object fields
| Field | Description |
|---|---|
| sentnumber | Number of notifications sent successfully for this channel |
| failednumber | Number of notifications that failed for this channel |
Fulfillment error object fields
| Field | Description |
|---|---|
| channelstring | Fulfilment channel that failed. |
| codestring | Machine-readable error code. |
| messagestring | Human-readable error message. |
Examples
Basic request (UUID)
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10/status" \
-H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-API-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{"order_id":"8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10","use_shopify_order_id":false,"status_id":"8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10","sub_status_option_id":"8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10"}'Using Shopify order ID
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/5460132438316/status" \
-H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-API-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"status_id": "status-uuid-abc123",
"sub_status_option_id": "sub-status-uuid-def456",
"use_shopify_order_id": true
}'Rate limiting
This endpoint is subject to per-minute and per-day rate limits based on your API key. Rate limit information is returned in the response headers:
X-RateLimit-Limit-Minute: Maximum requests per minuteX-RateLimit-Remaining-Minute: Remaining requests in current minuteX-RateLimit-Reset-Minute: Unix timestamp when minute window resetsX-RateLimit-Limit-Day: Maximum requests per dayX-RateLimit-Remaining-Day: Remaining requests in current dayX-RateLimit-Reset-Day: Unix timestamp when day window resetsRetry-After: Seconds to wait before retrying (when rate limited)
Error responses
400 Bad Request
Invalid request body, validation failed, or status requires a sub-status
{
"success": false,
"error": "Validation failed",
"details": {
"errors": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"status_id"
],
"message": "Required"
}
]
}
}401 Unauthorized
Missing or invalid API key
{
"success": false,
"error": "Missing API key. Include it in the X-API-Key header"
}403 Forbidden
API key lacks required permissions or product chain enforcement prevents this status change
{
"success": false,
"error": "Insufficient permissions. Required: canChangeOrderStatus"
}404 Not Found
Order, status, or sub-status not found
{
"success": false,
"error": "Order not found"
}500 Internal Server Error
Server error occurred
{
"success": false,
"error": "Internal server error",
"details": {
"message": "An unexpected error occurred"
}
}