Web Hooks

Web-hooks are used to keep remote systems in-sync for customers, products, orders and groups. You have the option to push new, updated and deleted records to a remote URL for consumption. Example web-hook response body.

Bulk Updates:
For actions in the Commerce7 UI that add tags in bulk to customers, orders, club memberships or reservations, rather than notify you 1,000s of times when 1,000s of records are updated - we will notify you one time of a bulk update, and send you a callback URL to get the list of updated records.

If you are using the 'tag' properties on orders, customers, reservations, or club memberships for your integration you will need to add a bulk update web-hook to ensure you receive these tag updates. See below for an example bulk update response. The response provides a callback URL that you can use to call the Commerce7 APIs to retrieve all the records updated, 50 per request using cursor pagination. Example bulk update web-hook response body.

The web-hook object

{
 "id": "28e547bb-baf4-433b-8c35-05b6e9b0ea04",
 "object": "Customer",
 "action": "Update",
 "url": "https://receivecustomerupdates.mymarketingengine.com",
 "createdAt": "2018-05-22T18:57:01.420Z",
 "updatedAt": "2018-05-22T19:13:08.231Z"
}

Create a web-hook

POST: /web-hook

{
 "object": "Customer",
 "action": "Create",
 "url": "https://receivenewcustomer.mymarketingengine.com"
}

RESPONSE: responds with a web-hook object.

Retrieve a web-hook

GET: /web-hook/:id

RESPONSE: responds with a web-hook object.

Update a web-hook

PUT: /web-hook/:id

{
 "object": "Customer",
 "action": "Delete",
 "url": "https://receivedeletedcustomers.mymarketingengine.com"
}

RESPONSE: responds with a web-hook object.

Delete a web-hook

DELETE: /web-hook/:id

RESPONSE: responds with a blank object and 204 status.

List all web-hooks

GET: /web-hook

RESPONSE: responds with an array of web-hook objects and a total count.

{
 "webHooks": [{
  "id": "28e547bb-baf4-433b-8c35-05b6e9b0ea04",
  "object": "Customer",
  "action": "Delete",
  "url": "https://receivedeletedcustomers.mymarketingengine.com",
  "createdAt": "2018-05-22T18:57:01.420Z",
  "updatedAt": "2018-05-22T19:14:57.640Z"
 }, {
  "id": "8335dc92-1d12-4a42-af6d-4cea607d1b1d",
  "object": "Customer",
  "action": "Create",
  "url": "https://receivecreatedcustomers.mymarketingengine.com",
  "createdAt": "2018-05-22T19:16:16.172Z",
  "updatedAt": "2018-05-22T19:16:16.172Z"
 }, {
  "id": "bd5f4986-a17c-4bfe-bba2-2fcc063c84bd",
  "object": "Customer",
  "action": "Update",
  "url": "https://receiveupdatedcustomers.mymarketingengine.com",
  "createdAt": "2018-05-22T19:16:29.285Z",
  "updatedAt": "2018-05-22T19:16:29.285Z"
 }],
 "total": 3
}

Web-hook response body

{
"object": "Customer",
"action": "Create",
"payload": { entire customer object },
"user": "[email protected]",
"tenantId": "example-tenant"
}

Web-hook bulk update response body

{
"object": "Customer",
"action": "Bulk Update",
"payload": {
 "callbackUrl": "https://api.commerce7.com/v1/customer?tagId=b098a8e0-bf54-4f04-ba96-3ef386221fda&cursor=start"
},
"user": "[email protected]",
"tenantId": "example-tenant"
}