Add/Remove/Update Webhooks

You can easily set up and de-setup your webhooks via your online dashboard, or use the corresponding API routes to do so.

📘

Good to know

  • You can bind multiple URLs to one event and/or one URL to multiple events.
  • Regardless of the webhook event, the payload structure is always the same.

Sample Parcel Payload

{
  "event": "same.parcel.created",
  "data": {
    "parcel_size": "Medium",
    "parcel_code": "medium",
    "pickup_code": "FBX-221702057887",
    "trigger_datetime": "2022-06-20T21:12:54+00:00",
    "custom_code": "XYZ-0000000000001234",
    "tracking_code": "FBD-000000000000000001",
    "request_date": "2022-06-20T21:12:53+00:00",
    "pick_up": {
      "date": "2022-06-27",
      "picked_at": null,
      "time_slot": "10:00 AM - 2:00 PM",
      "address": "340 Ferrier St Unit 218, Markham, ON L3R 2Z5, Canada"
    },
    "drop_off": {
      "date": "2022-06-27",
      "dropped_at": null,
      "user_ref_id": "54222",
      "time_slot": "4:00 PM - 10:00 PM",
      "receiver_name": "JOHN DOE",
      "receiver_phone": "1234567890",
      "receiver_address": "100 University Ave, Toronto, ON M5J 1V6, Canada",
      "proof_of_delivery": [
        "https://place-hold.it/500x700"
      ]
    },
    "extra_data": [
      "drop_off_fail_reason": {
				"fail_feedback": {
          "text": "Customer was not available at the specified delivery time-slot",
          "title": "Address type issue",
          "type": "COURIER_FAIL_A_DROP_OFF_SHIPMENT"
        }
      }
    ]
  }
}

Sample Shipment Payload

{
  "event": "same.shipment.scheduled",
  "data": {
    "tracking_code": "FBD-000000000000000001",
    "request_date": "2022-06-20T21:12:53+00:00",
    "trigger_datetime": "2022-06-20T21:12:54+00:00",
    "pick_up": {
      "date": "2022-06-27",
      "picked_at": null,
      "time_slot": "10:00 AM - 2:00 PM",
      "address": "340 Ferrier St Unit 218, Markham, ON L3R 2Z5, Canada"
    },
    "drop_off": {
      "date": "2022-06-27",
      "time_slot": "4:00 PM - 10:00 PM",
      "dropped_at": "",
      "user_ref_id": "54222",
      "receiver_name": "JOHN DOE",
      "receiver_phone": "1234567890",
      "receiver_address": "100 University Ave, Toronto, ON M5J 1V6, Canada",
      "proof_of_delivery": [
        "https://place-hold.it/500x700"
      ],
      "requirments": {
        "signature": true
      }
    },
    "parcels": [
      {
        "parcel_name": null,
        "parcel_code": "small",
        "custom_code": "XYZ-0000000000001234",
        "pickup_code": "FBX-000000000000000001",
        "value": null
      }
    ],
    "extra_data": "extra_data": [
      "drop_off_fail_reason": {
				"fail_feedback": {
          "text": "Customer was not available at the specified delivery time-slot",
          "title": "Address type issue",
          "type": "COURIER_FAIL_A_DROP_OFF_SHIPMENT"
        }
      }
    ]
  }
}