client_id and client_secret for your merchant account. Copy them from the DropHub dashboard. On the sandbox, run Sandbox bootstrap once first so your account has a pickup location, pricing, and a sandbox driver.
1
Get a token
expires_in: 900). Cache it and reuse it — see Authentication.2
Quote (optional)
Use the ids of the pickup location you ship from (The response carries
GET /api/v2/external/pickup-locations).price, quoteId, and expiresAt (15 minutes). Pass quoteId when you create the shipment and you are charged exactly that price.3
Create a shipment
201 means created; 200 means DropHub already had this order and returns the original shipment. Example response:trackingUrl is the customer-facing link — send it to your buyer.4
Register a webhook
Do this once, not per shipment. The signing secret is returned on creation only.Omitting
events subscribes you to all ten. See Webhooks for verification.5
Follow the shipment
locationStatus, eta, and the refresh interval.