Webhook provides the mechanism to push locker events as they occur. With help of this user would be able to receive events as they are generated and is received to the end user. This operation creates a webhook configuration. It needs details of events for which webhook tracking is required also the URL with its authorization details to which the locker events be pushed.
It indicates the type of webhook. Currently it takes tracking and lockeras value. These event codes are supported for the defined type:
| type | supported events |
|---|---|
| locker | reservation, cancelreservation, deposit, pickup, stalemailpickup, onhold |
| tracking | Manifest, Acceptance, InTransit, DeliveryAttempt, OutForDelivery, Delivered, Exception, ReturnToSender, ReadyForPickup, PickupMissed, PickedUp |
It indicates the customer url to which events should be sent.
It indicates the timeout value before system waits response from the customer url, here timeout indicates in seconds.
It indicates the status of the webhook. By default it takes active. To mark it inactive use in-active
- Sandbox Server for Webhook API'shttps://api-sandbox.sendpro360.pitneybowes.com/webhook/api/v1/webhookConfig
- Production Server for Webhook API's (uses live data)https://api.sendpro360.pitneybowes.com/webhook/api/v1/webhookConfig
- custom
- basic
- OAuth
curl -i -X POST \
https://api-sandbox.sendpro360.pitneybowes.com/webhook/api/v1/webhookConfig \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "dev_webhook1",
"type": "locker",
"events": [
"reservation",
"cancelreservation",
"deposit"
],
"url": "https://webhook.com",
"timeOut": 5,
"status": "active",
"authParams": {
"authType": "custom",
"apiKey": "JsuG7jk",
"headerName": "webhook1"
}
}'Webhook created successfully
It indicates the type of webhook. Currently it takes tracking and lockeras value. These event codes are supported for the defined type:
| type | supported events |
|---|---|
| locker | reservation, cancelreservation, deposit, pickup, stalemailpickup |
| tracking | Manifest, Acceptance, InTransit, DeliveryAttempt, OutForDelivery, Delivered, Exception, ReturnToSender, ReadyForPickup, PickupMissed, PickedUp |
It shows the timeout value untill which it waits to receive response from the customer url, here timeout indicates in seconds.
- custom
- basic
- OAuth
{ "webHookConfigID": "DELn75Jx7r3p", "name": "dev_webhook1", "type": "locker", "events": [ "reservation", "cancelreservation", "deposit" ], "url": "https://webhook.com", "authParams": { "authType": "custom", "apiKey": "JsuG7jk", "headerName": "webhook1" }, "timeOut": 5, "status": "active", "developerPartnerId": "xxxxxx" }