Senpex API v4 Documentation

Webhooks

Webhooks notify applications when specific events occur on a Senpex Platform. This is commonly related to the order delivery statuses:

  • Scheduled for delivery
  • Delivered to recipient
  • Ready for pick-up
  • Scheduled for pick-up
  • Picked-up to be delivered to the destination point
  • Returned to Senpex warehouse
  • Recipient doesn’t respond the phone call
  • Unable to reach customer
  • Delivered

To start receive notification using webhook, provide our support team with webhook URL.

ID Status Definition
1000 Ready for delivery Initial status for all drop-off points which come to the Senpex database from the partner. Addresses with this status are ready to be scheduled for a delivery.
1500 Scheduled for delivery The status of drop-off point that was added to the queue for route optimization and delivery.
1550 Courier Assigned A courier is assigned to this order /delivery
1590 Arrived to pickup point Courier has arrived at pickup location to pick up the parcel
1630 Picked up Parcel has been picked up from pickup location
1670 Arrived to drop-off point Courier has arrived at drop-off location
1700 Delivered Parcel has been delivered

webhooks GET

https://api.sandbox.senpex.com/api/restfull/v3/webhooks

This request allows user to retrive the list of all webhook notifications sent for this account and orders.

HEADERS:

secretid: {{ secret_id }}
clientid: {{ client_id }}

Example Request curl

webhooks - example request
      
             
          curl --location 'https://api.sandbox.senpex.com/api/restfull/v3/webhooks' \
--header 'secretid: {{secret_id}}' \
--header 'clientid: {{client_id}}'
        
      
    

webhooks/dropoff_id GET

https://api.sandbox.senpex.com/api/restfull/v3/webhooks/703323

This request allows user to retrive the webhook notifications sent for a specific order by passing the drop-off order id in url (Single drop-off locations orders)

HEADERS:

secretid: {{ secret_id }}
clientid: {{ client_id }}

Example Request curl

webhooks/dropoff_id - example request
      
             
          curl --location --request GET 'https://api.sandbox.senpex.com/api/restfull/v3/webhooks/703323' \
--header 'secretid: {{secret_id}}' \
--header 'clientid: {{client_id}}' \
--data '{"pack_size_id":"1"}'
        
      
    

webhooks/access_key/order_name GET

https://api.sandbox.senpex.com/api/restfull/v3/webhooks/access_key/Route 4

This request allows user to retrive the webhook notifications sent for a specific order by passing the drop-off Access key in url (Single drop-off locations orders)

HEADERS:

secretid: {{ secret_id }}
clientid: {{ client_id }}

Example Request curl

webhooks/access_key/order_name - example request
      
             
          curl --location 'https://api.sandbox.senpex.com/api/restfull/v3/webhooks/access_key/Route 4' \
--header 'secretid: {{secret_id}}' \
--header 'clientid: {{client_id}}' \
--data ''