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

Authorizations

X-Api-Key
string
header
required

Body

application/json

Request body for incremental merchant action trigger operations.

Exactly one of merchantTriggers (for add) or triggerIds (for remove) must be provided, depending on the operation.

operation
enum<string>
required

The operation to perform:

  • add: Register new merchants or update existing ones via merchant matching
  • remove: Remove merchants (excluded from enrichment lookups)
Available options:
add,
remove
merchantTriggers
object[]

List of merchant triggers to add. Required for the add operation.

If a trigger ID already exists, the old registration is replaced (upsert behavior).

Field requirements:

  • id, merchantName, and action are always required
  • If location fields (address, city) are NOT provided, website is required
Required array length: 1 - 100000 elements
triggerIds
string[]

List of trigger IDs to remove. Required for the remove operation.

Trigger IDs that are not currently active are silently ignored (idempotent).

Minimum array length: 1
Maximum string length: 512
Example:
["merchant_123", "merchant_456"]

Response

Remove operation completed successfully

Response for the remove PATCH operation.

status
enum<string>
Available options:
succeeded
Example:

"succeeded"

version
integer

The version number of this operation.

Example:

5