Decide a purchase intent for a current owner link
const url = 'https://api.xaalis.org/v1/whatsapp/purchase-intents/example/decision';const options = { method: 'POST', headers: { 'x-xaalis-whatsapp-link': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"decision":"approve","action_id":"example"}'};
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://api.xaalis.org/v1/whatsapp/purchase-intents/example/decision \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-xaalis-whatsapp-link: example' \ --data '{ "decision": "approve", "action_id": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “ Responses ”Decision and owner-only PIN capability
object
Example
{ "object": "agent_purchase_intent", "currency": "USD", "status": "approved", "purpose": "agent_purchase"}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Invalid request
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Service credential required
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Current owner required
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Intent unavailable
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Idempotency conflict or expired intent
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Rate limited
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Minimum seconds to wait before retrying. Takes precedence over the quota snapshot.