Account Type: Shipping Partner
Use the Pigee Shipping Partner API to plug live global shipping into your own systems. Get live DHL, FedEx, UPS and other carrier rates, create shipments, and let customers pay via Pigee Pay or your Pigee account balance.
Base URL (live): https://api.pigeepost.com
Auth header: Authorization: Bearer <your_api_key>
Validate that your API key is active and correctly configured.
Endpoint: POST /api/v1/store/valid
Request headers:
Authorization: Bearer {{apiKey}}
Content-Type: application/json
Request body:
{
"store_type": 2,
"api_key": "{{apiKey}}"
} Fetch live carrier rates for a shipment. Use this when your customer has entered their shipping address.
Endpoint: POST /api/v1/store/order/getcarriercost
Example request body:
{
"shop_url": "https://partner-example.com",
"currency": "GBP",
"parcel": {
"type": "Box",
"boxsize": 4
},
"weight": {
"value": 4,
"units": "kg"
},
"dimension": {
"length": 40,
"width": 30,
"height": 20,
"units": "cms"
},
"address": {
"pickup": {
"address_line1": "10 High Street",
"town": "London",
"post_code": "SW1A 1AA",
"country": "United Kingdom"
},
"destination": {
"address_line1": "123 Ocean Drive",
"town": "Miami",
"post_code": "33101",
"country": "United States"
}
}
} Create a Pigee order using one of the carrier options returned by the rates endpoint.
Endpoint: POST /api/v1/store/order/create
Note: Payment behaviour (Pigee Pay vs Pigee Account Balance) is controlled in your Pigee dashboard, not in the API payload.
Example request body:
{
"order_from": "api",
"shop_url": "https://partner-example.com",
"order_id": "ORDER-10001",
"currency": "GBP",
"address": {
"pickup": { "...": "..." },
"destination": { "...": "..." }
},
"items": [ { "...": "..." } ],
"shippingData": {
"method_title": "DHL Express Worldwide",
"cost": 125.5,
"currency": "GBP",
"meta_data": {
"carrier_request_id": "cr_abc123",
"carrier_id": "dhl",
"pigee_carrier_id": "DHL_EXPRESS_WORLDWIDE"
}
},
"redirect": {
"success_url": "https://partner-example.com/checkout/success",
"cancel_url": "https://partner-example.com/checkout/cancel"
},
"type": {
"payment": true,
"shipping": true
}
} Send final fulfilment details so labels and tracking can be generated.
Endpoint: POST /api/v1/store/order/fulfill
Example request body:
{
"order_id": "po_78910",
"status": "processing",
"shop_id": "https://partner-example.com",
"currency": "GBP",
"total": 725.5,
"shipping_total": 125.5,
"address": {
"pickup": { "...": "..." },
"destination": { "...": "..." }
},
"items": [ { "...": "..." } ]
} Pigee returns JSON errors with an error.code and error.message.
Example:
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Your Pigee partner balance is not sufficient to create this shipment."
}
}
Common codes include: INVALID_API_KEY, INSUFFICIENT_BALANCE, INVALID_ADDRESS, CARRIER_UNAVAILABLE.