Schedule Order Notifications
Schedules SMS and/or email notifications to the customers on a set of orders, using up to two of your notification templates (see GET /notifications/templates). One notification is created for each order and template pair. It is sent at send_time_utc, or straight away if you leave that out.
- The recipient is the order's contact phone number or email. If the order has none, the linked customer's phone number or email is used.
- Each SMS uses one credit per 160 characters of the rendered message, and the credits are deducted when the notification is scheduled. If the depot has no SMS credits left, SMS templates are skipped without being reported in errors.
- Order and template ids that don't belong to this depot are ignored. If none of the orders are found, the response is 404 RESOURCE_NOT_FOUND.
- Nothing checks for duplicates. Calling again for the same orders schedules the notifications again.
The request can partly succeed. The response is 200 with notifications listing the order_id of each notification created, and errors listing each order and template pair that was skipped and why (for example, no phone number, or an invalid email). Check errors even when the status is 200. To see the scheduled notifications, use GET /notification-tasks. Supports the idempotency-key header, so a retry won't schedule twice (see Idempotency).
Request
- Base URL: https://api.smartroutes.io/v2
- URL: https://api.smartroutes.io/v2/notifications/schedule/orders
- Auth: none declared
Headers
Optional idempotency key for safe retries. See Idempotency for behaviour. 1–255 characters; UUID recommended.
Request body
Response
Successful response
Changes
No recorded changes to this operation across all 1 revision of this API.