POST
Update Status
Update the custom status of a specific order. Automatically sends notifications based on status configuration.
Endpoint
HTTP Request
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.Required Header
X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPath Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
order_id | string | Yes | - | 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 | Type | Required | Default | Description |
|---|---|---|---|---|
status_id | string | Yes | - | The UUID of the custom status |
sub_status_option_id | string | Conditional | - | The UUID of the sub-status option. Required if the status has sub-status options. |
use_shopify_order_id | boolean | No | 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. |
fulfillment_selections | object | No | - | Optional (v1.5) answer to a fulfillment_readiness block: { [shopOrderId]: { [fulfillmentOrderId]: locationId } }. |
Response
Returns confirmation with updated order details:
200 OK - Success Response
{
"success": true,
"data": {
"message": "string",
"order": {
"id": "string",
"shopify_order_id": "string",
"name": "string",
"status": {
"id": "string",
"name": "string",
"color": "string"
},
"sub_status": null,
"workflow_id": "string",
"workflow_name": "string"
},
"notifications": {
"total_sent": 0,
"total_failed": 0,
"by_channel": {}
},
"orders_fulfilled": 0,
"fulfillment_errors": [
{
"channel": "string",
"code": "string",
"message": "string"
}
]
}
}Response Fields
Root Response Object
| Field | Type | Description |
|---|---|---|
success | boolean | Always true on a successful response. |
data | object | The endpoint's payload. Its fields are listed in the tables below. |
message | string | Confirmation message |
order | object | Object containing updated order details |
notifications | object | Object containing notification delivery statistics |
orders_fulfilled | number | Number of orders whose fulfilment was applied. |
fulfillment_errors | array | Fulfilment errors; a blocked fulfilment never half-applies. |
fulfillment_readiness | object | null | Present when fulfilment was refused; the choice block to resolve it (v1.5 only). |
fulfillment_move_results | array | Outcome of a requested move (v1.5 only). |
Order Object
| Field | Type | Description |
|---|---|---|
id | string | Order UUID |
shopify_order_id | string | Shopify order ID |
name | string | Shopify order name/number |
status | object | Status object with id, name, and color |
sub_status | object | null | Sub-status object with id and name (if applicable) |
workflow_id | string | UUID of the workflow the order belongs to (v1.3+ only) |
workflow_name | string | Name of the workflow the order belongs to (v1.3+ only) |
Status Object Fields
| Field | Type | Description |
|---|---|---|
id | string | UUID of the status |
name | string | Display name of the status |
color | string | Hex color code of the status |
Sub-Status Object
| Field | Type | Description |
|---|---|---|
id | string | UUID of the sub-status |
name | string | Name of the sub-status |
Notifications Object Fields
| Field | Type | Description |
|---|---|---|
total_sent | number | Total number of notifications sent |
total_failed | number | Total number of notifications that failed |
by_channel | object | Breakdown of notifications by channel (email, SMS, WhatsApp) |
Channel Stats Object Fields
| Field | Type | Description |
|---|---|---|
sent | number | Number of notifications sent for this channel |
failed | number | Number of notifications failed for this channel |
Fulfillment Error Object Fields
| Field | Type | Description |
|---|---|---|
channel | string | Fulfilment channel that failed. |
code | string | Machine-readable error code. |
message | string | Human-readable error message. |
Fulfillment Readiness Object Fields
| Field | Type | Description |
|---|---|---|
required | boolean | Whether a location choice is needed. |
code | string | Machine-readable refusal code. |
cause | string | Underlying cause. |
message | string | Message to show the operator. |
orders_to_fulfillment_orders_map | object | Order id → fulfilment order ids map. |
moveable_fulfillment_order_ids | array | Fulfilment orders that can be moved. |
location_choices | array | Candidate destination locations. |
submit_with | string | Request field to send the answer in — fulfillment_selections. |
Fulfillment Move Result Fields
| Field | Type | Description |
|---|---|---|
shop_order_id | string | Shopify order GID involved in the move. |
fulfillment_order_id | string | Fulfilment order GID moved. |
location_id | string | Destination location id. |
success | boolean | Whether the move succeeded. |
error | string | null | Error message when the move failed. |
Examples
Basic Request (UUID)
cURL Request
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.5" \
-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","fulfillment_selections":{}}'Using Shopify Order ID
cURL Request
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.5" \
-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
400 Bad Request
{
"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
401 Unauthorized
{
"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
403 Forbidden
{
"success": false,
"error": "Insufficient permissions. Required: canChangeOrderStatus"
}404 Not Found
Order, status, or sub-status not found
404 Not Found
{
"success": false,
"error": "Order not found"
}500 Internal Server Error
Server error occurred
500 Internal Server Error
{
"success": false,
"error": "Internal server error",
"details": {
"message": "An unexpected error occurred"
}
}