Notify a single intent
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/notify_intent
const url = 'https://app.stoqapp.com/api/v1/external/intents/notify_intent';const options = { method: 'POST', headers: {'X-Auth-Token': '<X-Auth-Token>', 'Content-Type': 'application/json'}, body: '{"id":"8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70","allow_resend":false}'};
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/intents/notify_intent \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: <X-Auth-Token>' \ --data '{ "id": "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70", "allow_resend": false }'Send the back-in-stock notification for a single intent immediately, regardless of current inventory. By default an intent that has already been notified will not be sent again; set allow_resend to true to force a resend. Returns 404 if the intent does not exist and 422 if the notification could not be sent.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id
Intent ID
string
allow_resend
Allow resending notification
boolean
Example
{ "id": "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70", "allow_resend": false}Responses
Section titled “Responses”Notification sent successfully
Media typeapplication/json
object
success
boolean
intent_id
string
Example
{ "success": true, "intent_id": "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70"}Unauthorized
Intent not found
Failed to notify intent
Was this page helpful?
Thanks for letting us know.
Still stuck? Ask Quinn or chat with support