API Documentation

List of available APIs of 1st version (beta)

NOTE: All requests are POST request and Authorization code must have to be provided into the request headers.
Make sure return Accept is set to application/json.
Authorization code expiry is 1 year so dont forget to regenerate if your code get expired.

Generate Authorization Code

Request

Parameter Required Data Type
email Required String
password Required PASSWORD

API request link: https://cod.shaheencargo.com/api/v1/user/generate-authorization-token

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
authorization_code your most secure system-generated authorization code which will be used to call for all of our API's
authorization code will be sent into headers for all API request except:
  • cities/all
ERROR
status error
message detailed error message
View All Cities

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API

API request link: https://cod.shaheencargo.com/api/v1/cities/all

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
cities (array) All active cities
These cities id will have to be provided at the time of booking for Origin & Destination Like if Origin is Karachi then ID will be 1 and so on...
ERROR
status error
message detailed error message
Bookings
View All Bookings

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API

API request link: https://cod.shaheencargo.com/api/v1/booking/all

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
all_bookings (array)
ERROR
status error
message detailed error message
Create Booking

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API
shipper_name Required String
consignee_name Required String
consignee_address Required String
consignee_phone Required String
origin Required Integar
destination Required Integar
cod_amount Required Decimal
product_detail Required String
order_id Required String
quantity Optional Integar (By default 1)
remarks Optional String

API request link: https://cod.shaheencargo.com/api/v1/booking/create

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
message
ERROR
status error
message detailed error message
Edit Booking

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API
Same fields as create booking
(Note: Only those fields will be update which will be provided at the time of API calling and update will only success until package is not dispatched for delivery)

API request link: https://cod.shaheencargo.com/api/v1/booking/{cn_number}/update

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
message
ERROR
status error
message detailed error message
View Specific Booking / Tracking

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API

API request link: https://cod.shaheencargo.com/api/v1/booking/{cn_number}

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
booking_detail (array)
ERROR
status error
message detailed error message
Delete Booking

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API

API request link: https://cod.shaheencargo.com/api/v1/booking/{cn_number}/delete

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
message
ERROR
status error
message detailed error message
Shipment Label

Request

Parameter Required Data Type
Authorization (header) Required System Generated Code by "Generate Authorization Code" API

API request link: https://cod.shaheencargo.com/api/v1/booking/{reference_code}/shipping_label

Response

Parameter Response Message
status Success / Error
SUCCESS
status success
shipment_label System Generated Shipment Label for Printing
This label must have to be pasted on every booking for Shaheen Cargo Services.
ERROR
status error
message detailed error message