Web Hook Logs

If you utilize webhook logs to receive data, you want to ensure you don't miss any data. Best practice would be to call the web-hook-log endpoint and check for any isSuccess=false, you can also include date ranges to only check since the last time you checked.

The list response is an array of web-hook-log objects, and each object contains the full payload of the original webhook call that failed. This allows you to process and consume any missing data with a single call to get the failed webhook sends.

Web Hook Log Object

{
"id": "4317d7e7-9098-4aa9-b703-3dc714109cad",
"url": "https://apigateway.commerce7.com/lambdas/coolwines-post-order",
"object": "Order",
"action": "Create",
"payload": { ** Full Object **},
"user": "[email protected]",
"isSuccess": false,
"error": {
 "data": {
  "message": "Missing Authentication Token"
 },
 "status": 403,
 "message": "Request failed with status code 403"
},
"createdAt": "2020-01-03T18:08:50.635Z",
"updatedAt": "2020-01-03T18:08:50.635Z"
}

List web-hook-log

GET: /web-hook-log

Parameters

Parameters:
object
['Allocation', 'Cart', 'Club', 'ClubPackage', 'ClubMembership', 'Collection', 'Coupon', 'Customer', 'CustomerAddress', 'CustomerCreditCard', 'Group', 'Product', 'Promotion', 'Order', 'TransactionEmail']
action
['Create', 'Update', 'Delete', 'Send']
isSuccess
boolean
updatedAt
['gte', 'gt', 'lte', 'lt', 'btw']

{
"webHookLogs": [{
"id": "4317d7e7-9098-4aa9-b703-3dc714109cad",
"url": "https://apigateway.commerce7.com/lambdas/coolwines-post-order",
"object": "Order",
"action": "Create",
"payload": { ** Full Object ** },
"user": "[email protected]",
"isSuccess": false,
"error": {
 "data": {
  "message": "Missing Authentication Token"
 },
 "status": 403,
 "message": "Request failed with status code 403"
},
"createdAt": "2020-01-03T18:08:50.635Z",
"updatedAt": "2020-01-03T18:08:50.635Z"
},
{
"id": "d087e10c-c92b-4679-83d6-a76848b1c24d",
"url": "https://webhook.site/699f413c-556f-49ae-919d-87536715ee75",
"object": "Order",
"action": "Update",
"payload": { ** Full Object **},
"user": null,
"isSuccess": false,
"error": {
 "data": {
  "error": {
   "id": null,
   "message": "Token not found"
  },
  "success": false
 },
 "status": 404,
 "message": "Request failed with status code 404"
},
"createdAt": "2019-10-17T23:17:43.723Z",
"updatedAt": "2019-10-17T23:17:43.723Z"
}
],
"total": 2
}