Basics
Sendbox API are HTTP based RESTful APIs. API request and response format are in JSON.
All request should be issued using HTTP protocol
All request requires authentication
Content type for responses will always be
application/json
API Request
To construct an API request the following components are required.
Component
Description
The HTTP method
GET
. Request data from resource
POST
. Submit data to a resource to process
PUT
. Update a resource
DELETE
. Deletes a resource
The URL to the staging API service
The URL to the live API service
HTTP request header
Includes the Content-type
header with the value application/json
A JSON request body
required for making a request
You are advised to make all test request on the staging API and ensure there are no errors before you deploy to users using the live API
API response
This describes the response format for Sendbox API
Sendbox API calls return HTTP status codes in the response headers. API calls also return JSON response bodies that include information about the resource.
Each REST API request returns a success or error HTTP status code.we will talk about errors latter in the docs but for now, we will focus on success.
status code
Description
200
A successful GET
request
201
A successful POST
, PUT
request means your request is created or updated.
Fetching Data
Fetching data means you will like to retrieve data from a resource. Most times, you are required to set header parameters usually the content-type and the authorization key and make a get request to an endpoint. For example, let say we want to get all shipments, we can simply make a get request and a successful request will come back with a 200 status code and return all the shipments in JSON format.
Fetch Data
https://sandbox.staging.sendbox.co/shipping
https://live.sendbox.co/shipping/shipments
In this example, we are making a get request to shipment endpoint to fetch all shipments
200: OK
The response body is always in JSON
format. It contains all shipments details
{
"next_page": "?page=2",
"prev": null,
"page_by": {
"total": 79,
"pages": 4,
"next": 2,
"per_page": 20,
"prev": null,
"page": 1
},
"print_string": "U0VMRUNUIHNoaXBtZW50LmlkIEFTIHNoaXBtZW50X2lkLCBzaGlwbWVudC5jb2RlIEFTIHNoaXBtZW50X2NvZGUsIHNoaXBtZW50LnJlZmVyZW5jZV9jb2RlIEFTIHNoaXBtZW50X3JlZmVyZW5jZV9jb2RlLCBzaGlwbWVudC5ub3RlcyBBUyBzaGlwbWVudF9ub3Rlcywgc2hpcG1lbnQuYmFyY29kZSBBUyBzaGlwbWVudF9iYXJjb2RlLCBzaGlwbWVudC5hd2Jfbm8gQVMgc2hpcG1lbnRfYXdiX25vLCBzaGlwbWVudC5hd2JfZW5kcG9pbnQgQVMgc2hpcG1lbnRfYXdi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25uZWN0b3Jfd2VpZ2h0LCBzaGlwbWVudC5wYWNrYWdlX2Nvbm5lY3Rvcl9kaW1lbnNpb25fd2VpZ2h0IEFTIHNoaXBtZW50X3BhY2thZ2VfY29ubmVjdG9yX2RpbWVuc2lvbl93ZWlnaHQsIHNoaXBtZW50LnBhY2thZ2VfY29ubmVjdG9yX2JpbGxhYmxlX3dlaWdodCBBUyBzaGlwbWVudF9wYWNrYWdlX2Nvbm5lY3Rvcl9iaWxsYWJsZV93ZWlnaHQsIHNoaXBtZW50LnBhY2thZ2VfY29ubmVjdG9yX290aGVyX2NoYXJnZSBBUyBzaGlwbWVudF9wYWNrYWdlX2Nvbm5lY3Rvcl9vdGhlcl9jaGFyZ2UsIHNoaXBtZW50LnBhY2thZ2VfY29ubmVjdG9yX290aGVyX2NoYXJnZV9yZWFzb24gQVMgc2hpcG1lbnRfcGFja2FnZV9jb25uZWN0b3Jfb3RoZXJfY2hhcmdlX3JlYXNvbiwgc2hpcG1lbnQubGFzdF91cGRhdGVkIEFTIHNoaXBtZW50X2xhc3RfdXBkYXRlZCwgc2hpcG1lbnQuZGF0ZV9jcmVhdGVkIEFTIHNoaXBtZW50X2RhdGVfY3JlYXRlZCAKRlJPTSBzaGlwbWVudCAKV0hFUkUgc2hpcG1lbnQudGVzdCAhPSB0cnVlIEFORCBzaGlwbWVudC5zdGF0dXNfY29kZSBJTiAoJShzdGF0dXNfY29kZV8xKXMsICUoc3RhdHVzX2NvZGVfMilzLCAlKHN0YXR1c19jb2RlXzMpcykgQU5EIHNoaXBtZW50Lm1lcmNoYW50X2lkID0gJShtZXJjaGFudF9pZF8xKXMgT1JERVIgQlkgc2hpcG1lbnQuZGF0ZV9jcmVhdGVkIERFU0M=",
"results": [
{
"destination_contact_phone": "08012345678",
"code": "0006320484",
"status_code": "drafted",
"height": 0,
"time_schedule": {
"code": "anytime",
"name": "Anytime"
},
"amount": null,
"is_spillable": false,
"narration": null,
"owner": "Sendbox",
"destination_address": "20 Oregun Ikeja Ikeja Lagos Nigeria",
"destination_name": "Johnny English",
"incoming_option": {
"code": "pickup",
"name": "Pickup"
},
"payment_options": null,
"origin_city": "Lagos",
"width": 0,
"package_delivery_attempt": 0,
"short_origin_address": "Lagos Lagos Nigeria",
"origin_phone": "0801234567890",
"package_received_by": null,
"destination_city": "Ikeja",
"package_delivery_status_code": null,
"recurrent_cards": [],
"package_label_image": null,
"origin_state": {
"code": "LOS",
"name": "Lagos"
},
"has_waybill_error": false,
"insurance_option_code": null,
"pk": "894688",
"package_invoice_image": null,
"transaction_id": null,
"merchant": {
"username": null,
"email": "Johndoe@gmail.com",
"id": 10383,
"phone": "081234567890",
"name": "John"
},
"delivery_priority": {
"code": "next_day",
"name": "Next Day"
},
"payment_option": {
"code": null,
"name": null
},
"courier": {
"name": "Sixth Gear Logistics"
},
"total_value": 90,
"package_fulfilment_status_code": null,
"origin_address": "20 Old Yaba Road Lagos Lagos Lagos Nigeria",
"package_agent": {
"username": null,
"email": null,
"id": 0,
"phone": null,
"name": null
},
"min_quoted_fee": 1015,
"pickup_attempts": [],
"origin_state_code": "LOS",
"package_type_code": null,
"max_quoted_fee": 1015,
"tracking": {
"destination_country": null,
"status": null,
"origin_city": null,
"destination_city": null,
"origin_name": null,
"destination_name": null,
"current_awb": null,
"origin_country": null
},
"client_id": 0,
"destination_email": "janedoe@gmail.com",
"origin_contact_phone": "080123456789",
"package_delivery_fee": 0,
"origin_post_code": null,
"coupon_description": null,
"possible_actions": [
{
"code": "pay",
"name": "Pay"
},
{
"code": "cancel",
"name": "Cancel"
}
],
"notes": null,
"current_status": {
"code": "drafted",
"name": "On Hold"
},
"use_selected_rate": null,
"destination_street": "20 Oregun Ikeja",
"package_delivery_date": null,
"reference_code": "74",
"selected_rate_id": null,
"pod": "Prepaid",
"destination_state": {
"code": "LOS",
"name": "Lagos"
},
"shipment_id": null,
"origin_city_id": 1175,
"domain": null,
"package_type": {
"code": null,
"name": null
},
"last_updated": "2019-11-15T14:41:06.185519",
"weight": 0,
"amount_to_receive": 1263.72,
"destination_state_code": "LOS",
"sensitivity": "",
"package_fulfilment_status": {
"code": null,
"name": null
},
"package_delivery_eta": null,
"origin_country": {
"code": "NG",
"name": "Nigeria"
},
"package_courier_id": null,
"delivery_priority_code": "next_day",
"origin_country_code": "NG",
"package_agent_id": 0,
"package_date_received": null,
"package_delivery_status": {
"code": null,
"name": null
},
"has_waybill": null,
"delivery_type_code": "last_mile",
"short_destination_address": "Ikeja Lagos Nigeria",
"pickup_courier": {
"status": null,
"courier_name": null
},HP
Posting Data
Posting data is a little different from fetching data. here you are required to make a post request to the endpoint and pass in a body of JSON data you would like to post. For example, let's say you want to get delivery quotes for a shipment. You simply make a post request to the delivery quotes endpoint this returns a status code 201 and quotes of that shipments in JSON format.
JSON body sample to make a post request
{
"origin_country":"Nigeria",
"origin_country_code":"NG",
"origin_state" : "Lagos",
"destination_country":"Nigeria",
"destination_country_code":" ",
"destination_state": "Abuja",
"weight" : 3,
"destination_state_code":"ABV",
"origin_state_code": "LOS"
}
Post Data
https://sandbox.staging.sendbox.co/shipping/shipment_delivery_quote
https://live.sendbox.co/shipping/shipment_delivery_quote
In this example, we are making a post request to the shipment_delivery_quote endpoint.
Headers
Name
Type
Description
Authorization
String
Authorization-key
Content-type
String
application/json
Body Parameters
Name
Type
Description
origin_country
String
senders country
origin_country_code
String
senders country code
origin_state
String
senders state
origin_state_code
String
senders state code
destination_country
String
recipient country
destination_country_code
String
recipient country code
destination_state
String
recipient state
destination_state_code
String
recipient state code
weight
float
weight of package
201: Created
{
"credit_amount": null,
"payment_option": {
"code": null,
"name": null
},
"weight": 8.1,
"total_value": 0,
"destination_state_code": "LOS",
"min_quoted_fee": 1000,
"origin_state_code": "LOS",
"time_schedule_code": "anytime",
"incoming_option_code": "pickup",
"max_quoted_fee": 8783.775,
"delivery_priority_code": "next_day",
"accept_value_on_delivery": null,
"selected_rate": {
"discount": null,
"courier_id": 0,
"fee": null,
"name": null,
"courier": {
"name": null
},
"return_fee": null,
"actual_fee": null,
"fee_with_return": null,
"id": null
},
"origin_country_code": "NG",
"payment_options": [
{
"pk": "book_on_hold",
"brand": "wallet",
"code": "book_on_hold",
"mask": "Book on hold",
"friendly_brand": "You will be debited from your wallet"
}
],
"origin_city": "Ketu",
"total_quantity": 0,
"delivery_type_code": "last_mile",
"payment_option_code": null,
"destination_city": "zone 5",
"destination_country_code": "NG",
"recurrent_cards": [
{
"pk": "book_on_hold",
"brand": "wallet",
"mask": "Book on hold",
"id": null,
"friendly_brand": "You will be debited from your wallet"
}
],
"rates": [
{
"discount": null,
"courier_id": 3,
"fee": 1000,
"name": "Sixth Gear Logistics",
"courier": {
"name": "Sixth Gear Logistics"
},
"return_fee": 50,
"actual_fee": null,
"fee_with_return": 1050,
"id": "3_1000.0"
},
{
"discount": null,
"courier_id": 19,
"fee": 2200,
"name": "Parcel Line Logistics",
"courier": {
"name": "Parcel Line Logistics"
},
"return_fee": 50,
"actual_fee": null,
"fee_with_return": 2250,
"id": "19_2200.0"
},
{
"discount": null,
"courier_id": 20,
"fee": 1800,
"name": "CRS Logistics",
"courier": {
"name": "CRS Logistics"
},
"return_fee": 50,
"actual_fee": null,
"fee_with_return": 1850,
"id": "20_1800.0"
},
{
"discount": null,
"courier_id": 22,
"fee": 8783.775,
"name": "DHL",
"courier": {
"name": "DHL"
},
"return_fee": 0,
"actual_fee": null,
"fee_with_return": null,
"id": "22"
}
],
"selected_rate_id": null,
"use_selected_rate": null,
"vat": null
}
Last updated