Skip to content

Notify multiple intents in bulk

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

POST
/external/intents/bulk_notify_intent
curl --request POST \
--url https://app.stoqapp.com/api/v1/external/intents/bulk_notify_intent \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <X-Auth-Token>' \
--data '{ "intent_ids": [ "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70", "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809" ], "allow_resend": false }'

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.

Media typeapplication/json
object
intent_ids

Array of intent IDs

Array<string>
allow_resend

Allow resending notifications

boolean

Example

{
"intent_ids": [
"8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70",
"1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
],
"allow_resend": false
}

All notifications sent successfully

Media typeapplication/json
object
success
Array<string>
failed
Array<object>
object
intent_id
string
error
string

Example

{
"success": [
"8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70"
],
"failed": [
{
"intent_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
"error": "Already notified"
}
]
}

Partial success (some notifications failed)

Media typeapplication/json
object
success
Array<string>
failed
Array<object>
object
intent_id
string
error
string

Example generated

{
"success": [
"example"
],
"failed": [
{
"intent_id": "example",
"error": "example"
}
]
}

Bad request

Unauthorized

Was this page helpful?

Still stuck? Ask Quinn or chat with support