Skip to content

Send shipping update emails to multiple orders

API v1 is the older API. It still works, but new integrations should use API v2. Migrating from v1 to v2

POST/external/preorders/send_shipping_update

Costs 2 rate-limit points · Rate limits

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.

Headers

  • X-Auth-TokenstringRequired

    API key for authentication

Request body

  • order_idsarray of strings

    Array of STOQ internal order UUIDs to send shipping updates to (mutually exclusive with shopify_order_ids)

  • shopify_order_idsarray of integers

    Array of Shopify order IDs to send shipping updates to (mutually exclusive with order_ids)

  • subjectstringRequired

    Email subject line

  • headerstringRequired

    Email header text

  • descriptionstringRequired

    Email body description

Returns

  • successboolean
    Example: true
  • messagestring
    Example: Shipping updates queued
  • orders_countinteger

    Number of orders that will receive the shipping update

Errors

400

Bad request - missing required parameters or invalid input

401

Unauthorized

404

No valid orders found

POST/external/preorders/send_shipping_update
curl -X POST "https://app.stoqapp.com/api/v1/external/preorders/send_shipping_update" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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."
  }'
Response
{
  "success": true,
  "message": "Shipping updates queued",
  "orders_count": 2
}