📘

See Create Webhook Config for information on how to subscribe to Certificate of Insurance webhook events.

Below are example payloads for Certificate of Insurance 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.

Certificate of Insurance Created Event

The certificateOfInsurance.created event is posted to an organization's webhooks when when a shipment purchased by the organization has its certificate of insurance document created.

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