POST
Bulk send notifications
Send notifications to customers for multiple orders in a single request.
POST
/v1/orders/notify-bulkAuthentication
This endpoint requires a valid API key with
canSendNotifications permission. The API key must be passed in the X-API-Key header.X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXRequest body
| Parameter | Description |
|---|---|
| order_idsstring[] · Required | Array of 1 to 100 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'). |
| use_shopify_order_idboolean · Optional, default false | Set 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. |
| channelsstring[] · Required | Notification channels to use: "email", "sms", "whatsapp". At least one channel is required to prevent accidental mass notifications. |
Response
Returns detailed notification results for each order:
{
"success": true,
"data": {
"message": "string",
"total_orders": 0,
"results": [
{
"order_id": "string",
"notifications_sent": {
"email": "string",
"sms": "string",
"whatsapp": "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 |
| total_ordersnumber | Number of orders processed |
| resultsarray | Array of notification results per order |
Result object fields (per order)
| Field | Description |
|---|---|
| order_idstring | UUID of the order |
| notifications_sentobject | Object containing notification status for each channel |
Notifications sent object fields
| Field | Description |
|---|---|
| emailstring | Email notification status: "sent", "skipped", or "failed" |
| smsstring | SMS notification status: "sent", "skipped", or "failed" |
| whatsappstring | WhatsApp notification status: "sent", "skipped", or "failed" |
Examples
Basic request (UUIDs)
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/notify-bulk" \
-H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-API-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{"order_ids":["8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10"],"use_shopify_order_id":false,"channels":["email"]}'Using Shopify order IDs
curl -X POST "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/notify-bulk" \
-H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-API-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"order_ids": ["5460132438316", "5460132438317", "5460132438318"],
"use_shopify_order_id": true,
"channels": ["email", "sms"]
}'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 or validation failed
{
"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
{
"success": false,
"error": "Insufficient permissions. Required: canSendNotifications"
}404 Not Found
No valid orders found for the provided IDs
{
"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"
}
}