Send shipping update emails to multiple orders
LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2
const url = 'https://app.stoqapp.com/api/v1/external/preorders/send_shipping_update';const options = { method: 'POST', headers: {'X-Auth-Token': '<X-Auth-Token>', 'Content-Type': 'application/json'}, body: '{"shopify_order_ids":[5012345678901,5012345678902],"subject":"Your preorder has shipped","header":"Good news!","description":"Your Summer Preorder items are on the way and should arrive within 5–7 business days."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.stoqapp.com/api/v1/external/preorders/send_shipping_update \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: <X-Auth-Token>' \ --data '{ "shopify_order_ids": [ 5012345678901, 5012345678902 ], "subject": "Your preorder has shipped", "header": "Good news!", "description": "Your Summer Preorder items are on the way and should arrive within 5–7 business days." }'Send shipping update emails to multiple preorders. You can specify orders using either:
- STOQ internal order IDs (UUIDs) via
order_ids - Shopify order IDs via
shopify_order_ids
You must provide one or the other, but not both.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”API key for authentication
Request Bodyrequired
Section titled “Request Bodyrequired”object
Array of STOQ internal order UUIDs to send shipping updates to (mutually exclusive with shopify_order_ids)
Array of Shopify order IDs to send shipping updates to (mutually exclusive with order_ids)
Email subject line
Email header text
Email body description
Example
{ "shopify_order_ids": [ 5012345678901, 5012345678902 ], "subject": "Your preorder has shipped", "header": "Good news!", "description": "Your Summer Preorder items are on the way and should arrive within 5–7 business days."}Responses
Section titled “Responses”Shipping update emails queued successfully
object
Number of orders that will receive the shipping update
Example
{ "success": true, "message": "Shipping updates queued", "orders_count": 2}Bad request - missing required parameters or invalid input
object
Example generated
{ "error": "example"}Unauthorized
No valid orders found
object
Example generated
{ "error": "example"}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support