📘

See Create Webhook Config for information on how to subscribe to Proof of Delivery webhook events.

Below are example payloads for Proof of Delivery 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.

Proof of Delivery Created Event

The proofOfDelivery.created event is posted to an organization's webhooks when when a shipment purchased by the organization has its proof of delivery document created.

{
  "data": {
    "type": "proofOfDelivery",
    "url": "https://s3-us-west-1.amazonaws.com/mothership-shipments-proof-of-delivery/JXM9JN.pdf",
    "shipmentId": "JXM9JN",
    "expiresAt": "2019-03-21T03:16:00.132Z",
    "createdAt": "2019-03-21T03:01:00.132Z"
  },
  "deliveryAttempt": 1,
  "pendingRetries": 4,
  "eventType": "proofOfDelivery.created",
  "sentAt": "2019-03-21T03:06:01.132Z"
}

Proof of Delivery Updated Event

The proofOfDelivery.updated event is posted to an organization's webhooks when when a shipment purchased by the organization has its proof of delivery document updated.

{
  "data": {
    "type": "proofOfDelivery",
    "url": "https://s3-us-west-1.amazonaws.com/mothership-shipments-proof-of-delivery/JXM9JN.pdf",
    "shipmentId": "JXM9JN",
    "expiresAt": "2019-03-21T07:57:47.323Z",
    "updatedAt": "2019-03-21T07:42:47.323Z"
  },
  "deliveryAttempt": 1,
  "pendingRetries": 4,
  "eventType": "proofOfDelivery.updated",
  "sentAt": "2019-03-21T07:42:53.323Z"
}