POST

Bulk Update Status

Update the custom status for multiple orders in a single request.

Endpoint

HTTP Request
POST /v1/orders/status-bulk

Authentication

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: your_api_key_here

Request Body

ParameterTypeRequiredDefaultDescription
order_idsstring[]Yes-Array of order identifiers (UUIDs by default, or Shopify order IDs if use_shopify_order_id is true). For Shopify order IDs, provide the numeric portion of Shopify's order GID (e.g., for 'gid://shopify/Order/450789469', use '450789469').
status_idstringYes-The UUID of the custom status
sub_status_option_idstringConditional-The UUID of the sub-status option. Required if the status has sub-status options.
use_shopify_order_idbooleanNofalseSet to 'true' to look up orders using Shopify order IDs instead of UUIDs. Extract the number from Shopify's GID format (gid://shopify/Order/450789469 → 450789469) and use it in the order_ids array.

Response

Returns confirmation with count of updated orders:
200 OK - Success Response
{
  "message": "Statuses updated successfully",
  "updated": 2,
  "failed": 1,
  "results": [
    {
      "order_id": "uuid1",
      "success": true,
      "status_id": "status-uuid",
      "status_name": "Processing"
    },
    {
      "order_id": "uuid2",
      "success": true,
      "status_id": "status-uuid",
      "status_name": "Processing"
    },
    {
      "order_id": "invalid-uuid",
      "success": false,
      "error": "Order not found"
    }
  ],
  "notifications": {
    "total_sent": 4,
    "total_failed": 0,
    "by_channel": {
      "email": {
        "sent": 2,
        "failed": 0
      },
      "sms": {
        "sent": 2,
        "failed": 0
      }
    }
  }
}

Response Fields

Root Response Object

FieldTypeDescription
messagestringConfirmation message
updatednumberNumber of orders successfully updated
failednumberNumber of notifications that failed for this channel
resultsarrayArray of per-order result objects
notificationsobjectObject containing notification statistics

Result Object Fields (per order)

FieldTypeDescription
order_idstringUUID of the order
successbooleanWhether the status update succeeded for this order
status_idstringUUID of the status that was applied
status_namestringDisplay name of the status that was applied
errorstringError message if the update failed for this order

Notifications Object Fields

FieldTypeDescription
total_sentnumberTotal number of notifications sent successfully across all orders
total_failednumberTotal number of notifications that failed across all orders
by_channelobjectObject with per-channel stats (e.g., email, sms)

Channel Stats Object Fields

FieldTypeDescription
sentnumberNumber of notifications sent successfully for this channel
failednumberNumber of notifications that failed for this channel

Examples

Basic Request (UUIDs)

cURL Request
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/status-bulk" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Version: 1.3" \
  -H "Content-Type: application/json" \
  -d '{
    "order_ids": ["uuid1", "uuid2", "uuid3"],
    "status_id": "status-uuid",
    "sub_status_option_id": "sub-status-option-uuid"
  }'

Using Shopify Order IDs

cURL Request
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/status-bulk" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Version: 1.3" \
  -H "Content-Type: application/json" \
  -d '{
    "order_ids": ["5460132438316", "5460132438317", "5460132438318"],
    "use_shopify_order_id": true,
    "status_id": "status-uuid",
    "sub_status_option_id": "sub-status-option-uuid"
  }'

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 minute
  • X-RateLimit-Remaining-Minute: Remaining requests in current minute
  • X-RateLimit-Reset-Minute: Unix timestamp when minute window resets
  • X-RateLimit-Limit-Day: Maximum requests per day
  • X-RateLimit-Remaining-Day: Remaining requests in current day
  • X-RateLimit-Reset-Day: Unix timestamp when day window resets
  • Retry-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
{
  "error": "Validation failed",
  "details": {
    "errors": [...]
  }
}

401 Unauthorized

Missing or invalid API key

401 Unauthorized
{
  "error": "Unauthorized"
}

403 Forbidden

API key lacks required permissions

403 Forbidden
{
  "error": "Insufficient permissions"
}

404 Not Found

No valid orders found, or status/sub-status not found

404 Not Found
{
  "error": "No valid orders found"
}

500 Internal Server Error

Server error occurred

500 Internal Server Error
{
  "error": "Internal server error",
  "details": {
    "message": "Error description"
  }
}