πŸ“˜

See Create Webhook Config for information on how to subscribe to Bill of Lading webhook events.

Below are example payloads for Bill of Lading webhook events. Mothership will POST these payloads to registered endpoints within 1 minute of the triggering event.

The SHA256 signature of each payload can be found in the X-Mothership-Signature header of the webhook POST request and verified using the secretKey available on the Create Webhook Config or Fetch Webhook Config response bodies. See Validating webhooks for more information.

Bill of Lading Created Event

The billOfLading.created event is posted to an organization's webhooks when a shipment purchased by that organization has its bill of lading document created for the first time.

{
  "data": {
    "type": "billOfLading",
    "url": "https://s3-us-west-1.amazonaws.com/mothership-shipments-bill-of-lading/JXM9JN.pdf",
    "shipmentId": "JXM9JN",
    "expiresAt": "2019-03-19T19:46:05.883Z",
    "createdAt": "2019-03-19T19:31:05.883Z"
  },
  "deliveryAttempt": 1,
  "pendingRetries": 4,
  "eventType": "billOfLading.created",
  "sentAt": "2019-03-19T19:31:10.883Z"
}

Bill of Lading Updated Event

The billOfLading.updated event is posted to an organization's webhooks when a shipment purchased by that organization has its bill of lading document updated.

{
  "data": {
    "type": "billOfLading",
    "url": "https://s3-us-west-1.amazonaws.com/mothership-shipments-bill-of-lading/JXM9JN.pdf",
    "shipmentId": "JXM9JN",
    "expiresAt": "2019-03-20T01:19:06.132Z",
    "updatedAt": "2019-03-20T01:04:06.132Z"
  },
  "deliveryAttempt": 1,
  "pendingRetries": 4,
  "eventType": "billOfLading.updated",
  "sentAt": "2019-03-20T01:04:11.132Z"
}