Skip to content

Notify multiple intents in bulk

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

POST/external/intents/bulk_notify_intent

Costs 2 rate-limit points · Rate limits

Send back-in-stock notifications for multiple intents in one request. Each intent is processed independently; the response reports which succeeded and which failed, returning 207 when only some succeed. Set allow_resend to true to re-notify intents that were already sent.

Request body

  • intent_idsarray of strings

    Array of intent IDs

  • allow_resendboolean

    Allow resending notifications

Returns

  • successarray of strings
  • failedarray of objects
    Show 2 child attributesHide child attributes
    • intent_idstring
      Example: 1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809
    • errorstring
      Example: Already notified

Errors

400

Bad request

401

Unauthorized

POST/external/intents/bulk_notify_intent
curl -X POST "https://app.stoqapp.com/api/v1/external/intents/bulk_notify_intent" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "intent_ids": [
      "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70",
      "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
    ],
    "allow_resend": false
  }'
Response
{
  "success": [
    "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70"
  ],
  "failed": [
    {
      "intent_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
      "error": "Already notified"
    }
  ]
}