Skip to main content
PUT
/
merchant-action-triggers
Register merchant triggers at account scope
curl --request PUT \
  --url https://east.sandbox.spade.com/merchant-action-triggers \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "merchantTriggers": [
    {
      "id": "<string>",
      "merchantName": "<string>",
      "action": {
        "type": "<string>"
      },
      "website": "<string>",
      "address": "<string>",
      "city": "<string>",
      "region": "<string>",
      "country": "<string>",
      "postalCode": "<string>",
      "latitude": 123,
      "longitude": 123,
      "customAttributes": {}
    }
  ]
}
'
{
  "status": "pending",
  "version": 123
}

Authorizations

X-Api-Key
string
header
required

Body

application/json

Request body for registering merchant action triggers.

merchantTriggers
object[]
required

List of merchant triggers to register for action matching. Each trigger must have a unique id.

Field requirements:

  • id, merchantName, and action are always required
  • If location fields (address, city) are NOT provided, website is required

Limits: User-scope and card-scope registrations are limited to 100 triggers per request. Account-scope registrations with more than 100 triggers will be processed asynchronously as a batch job.

Required array length: 1 - 100000 elements

Response

Registration created successfully

Response containing the status of an action trigger registration.

status
enum<string>

The current status of the action trigger registration.

  • pending: Registration received, processing not yet started
  • running: Registration is being processed (for batch registrations with >100 triggers)
  • succeeded: Registration complete, triggers are now active
  • failed: Registration failed, check your request and retry
  • deleted: Trigger scope has been cleared via DELETE
Available options:
pending,
running,
succeeded,
failed,
deleted
Example:

"succeeded"

version
integer

The version number of this registration. Increments with each PUT or DELETE request to this scope.

Example:

1