Shipping API
Integrate Peeap Shipping into your platform. Create deliveries, get quotes, track shipments in real-time.
Base URL: https://api.peeap.com/api/v1/shipping
Overview
The Shipping API lets you programmatically create delivery jobs, get shipping quotes, track packages in real-time, and manage shipping addresses. It authenticates via your secret API key with shipping:read and shipping:write scopes.
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/shipping/quote | Get a shipping quote |
| POST | /v1/shipping/deliveries | Create a delivery job |
| GET | /v1/shipping/deliveries | List your deliveries |
| GET | /v1/shipping/deliveries/:jobNumber/track | Track a delivery |
| POST | /v1/shipping/deliveries/:jobNumber/verify | Verify pickup/delivery handoff code |
| POST | /v1/shipping/deliveries/:jobNumber/cancel | Cancel a delivery |
| POST | /v1/shipping/bulk-track | Track multiple deliveries at once |
| GET | /v1/shipping/zones | List delivery zones |
| POST | /v1/shipping/addresses | Save a shipping address |
| GET | /v1/shipping/addresses | List saved shipping addresses |
Authentication
All shipping endpoints require a secret API key (sk_live_ or sk_test_) with the appropriate scope. Pass it in the Authorization: Bearer header or the X-API-Key header.
"code-comment"># Using Authorization header
curl -X GET "https://api.peeap.com/api/v1/shipping/zones" \
-H "Authorization: Bearer sk_live_your_api_key"
"code-comment"># Using X-API-Key header
curl -X GET "https://api.peeap.com/api/v1/shipping/zones" \
-H "X-API-Key: sk_live_your_api_key"Required Scopes: Endpoints that read data (quotes, tracking, zones) need shipping:read. Endpoints that create resources (deliveries, addresses) need shipping:write. Add these scopes to your API key in the Developer Dashboard.
Delivery Statuses
A delivery progresses through these statuses:
| Status | Description |
|---|---|
pending | Delivery created, waiting for driver assignment |
assigned | Driver assigned to the delivery |
picked_up | Package picked up from the merchant |
in_transit | Package is on the way to the customer |
delivered | Package delivered to the customer |
completed | Delivery cycle completed |
cancelled | Delivery was cancelled |
failed | Delivery failed |
Webhooks
Stay informed about shipping events by registering webhook endpoints. Peeap will send signed POST requests to your endpoint when shipping events occur.
| Event | Description |
|---|---|
shipping.delivery.created | A new delivery job was created |
shipping.status.updated | Delivery status changed |