Zajil API Documentation

API Key Generation

To generate an API key plese contact Zajil Express Support Team by clicking here.

Create PUDO Shipment

To create PUDO Shipment, below are the required parameters and information for the API request along with example of the API request

URL: https://staging.zajil-express.org/api/pudoshipment/create
Method: POST
headers: { 'Authorization': YOUR_API_KEY, 'Content-Type': 'application/json' }
data: { YOUR REQUEST PARAMETERS of TYPE JSON}

Examples of the API Request:

                                      
import requests
import json

url = "https://staging.zajil-express.org/api/pudoshipment/create"

payload = json.dumps({
    "PaymentTypeId": 83,
    "SenderPhoneCode": "00966",
    "SenderPhoneNumber": "500059512",
    "SenderName": "Mitchel Admin",
    "SenderCity": 104,
    "SenderAddress": "testSenderAddress",
    "ReceiverPhoneNumber": "500059612",
    "ReceiverName": "Test Receiver",
    "ReceiverAddress": "Nicity",
    "ReceiverCity": 104,
    "ReceiverRegionId": 8,
    "ReceiverPhonecode": "00966",
    "DestinationBranchId": 181,
    "TotalPieces": 2,
    "WeighingUnitId": 41,
    "VolumtricWeightList":[0.2,2],
    "ActualWeightList":[20,30],
    "NetAmount":0,
    "AmountToBePaid":0,
    "ActualWeight":23,
    "ChargeableWeight":25,
    "TotalLength":10,
    "TotalWidth":8,
    "TotalHeight":6,
    "ShipmentValue": 100,
    "ShipmentDescription": "de1sc"
})
headers = {
  'Authorization': '***************VvzKC',
  'Content-Type': 'application/json',
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

                                                                                    
                                    
                                      
curl --location 'https://staging.zajil-express.org/api/pudoshipment/create' \
--header 'Authorization: ***************VvzKC' \
--header 'Content-Type: application/json' \
--data '{
"PaymentTypeId": 83,
"SenderPhoneCode": "00966",
"SenderPhoneNumber": "500059512",
"SenderName": "Mitchel Admin",
"SenderCity": 104,
"SenderAddress": "testSenderAddress",
"ReceiverPhoneNumber": "500059612",
"ReceiverName": "Test Receiver",
"ReceiverAddress": "Nicity",
"ReceiverCity": 104,
"ReceiverRegionId": 8,
"ReceiverPhonecode": "00966",
"DestinationBranchId": 181,
"TotalPieces": 2,
"WeighingUnitId": 41,
"VolumtricWeightList":[0.2,2],
"ActualWeightList":[20,30],
"NetAmount":0,
"AmountToBePaid":0,
"ActualWeight":23,
"ChargeableWeight":25,
"TotalLength":10,
"TotalWidth":8,
"TotalHeight":6,
"ShipmentValue": 100,
"ShipmentDescription": "de1sc"
}'
                                                                                
                                    
                                      
?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://staging.zajil-express.org/api/pudoshipment/create',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
"PaymentTypeId": 83,
"SenderPhoneCode": "00966",
"SenderPhoneNumber": "500059512",
"SenderName": "Mitchel Admin",
"SenderCity": 104,
"SenderAddress": "testSenderAddress",
"ReceiverPhoneNumber": "500059612",
"ReceiverName": "Test Receiver",
"ReceiverAddress": "Nicity",
"ReceiverCity": 104,
"ReceiverRegionId": 8,
"ReceiverPhonecode": "00966",
"DestinationBranchId": 181,
"TotalPieces": 2,
"WeighingUnitId": 41,
"VolumtricWeightList":[0.2,2],
"ActualWeightList":[20,30],
"NetAmount":0,
"AmountToBePaid":0,
"ActualWeight":23,
"ChargeableWeight":25,
"TotalLength":10,
"TotalWidth":8,
"TotalHeight":6,
"ShipmentValue": 100,
"ShipmentDescription": "de1sc"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: ***************VvzKC',
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                                
                                    
                                      
require "uri"
require "json"
require "net/http"

url = URI("https://staging.zajil-express.org/api/pudoshipment/create")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "***************VvzKC"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
    "PaymentTypeId": 83,
    "SenderPhoneCode": "00966",
    "SenderPhoneNumber": "500059512",
    "SenderName": "Mitchel Admin",
    "SenderCity": 104,
    "SenderAddress": "testSenderAddress",
    "ReceiverPhoneNumber": "500059612",
    "ReceiverName": "Test Receiver",
    "ReceiverAddress": "Nicity",
    "ReceiverCity": 104,
    "ReceiverRegionId": 8,
    "ReceiverPhonecode": "00966",
    "DestinationBranchId": 181,
    "TotalPieces": 2,
    "WeighingUnitId": 41,
    "VolumtricWeightList":[0.2,2],
    "ActualWeightList":[20,30],
    "NetAmount":0,
    "AmountToBePaid":0,
    "ActualWeight":23,
    "ChargeableWeight":25,
    "TotalLength":10,
    "TotalWidth":8,
    "TotalHeight":6,
    "ShipmentValue": 100,
    "ShipmentDescription": "de1sc"
})

response = http.request(request)
puts response.read_body

                                                                                
                                    

Response Codes:

                                      
{
    "jsonrpc": "2.0",
    "id": null,
    "result": {
        "status": "SUCCESS",
        "code": "Created",
        "message": "SUCCESS",
        "refNo": "075124687312",
        "cusRefNo": None
    }
}
                                                                                
                                    
                                      
{
    "jsonrpc": "2.0",
    "id": null,
    "result": {
        "status": "Failure",
        "code": "PreconditionFailed",
        "message": "Expected parameter values are not passed",
        "refNo": "",
        "cusRefNo": ""
    }
}
                                                                                
                                    
                                      
{
    "jsonrpc": "2.0",
    "id": null,
    "result": {
        "status": "Failure",
        "code": "AuthorizationFailed",
        "message": "API Key is invalid or expired",
        "refNo": "",
        "cusRefNo": ""
    }
}
                                                                                
                                    

Mandatory Fields & Its Types

Here is the list of Mandatory Fields with its types required for API requests.

Fields Type
PaymentTypeId int
SenderPhonecode string
SenderPhoneNumber string
SenderName string
SenderAddress string
SenderCity int
ReceiverPhonecode string
ReceiverPhoneNumber string
ReceiverName string
ReceiverAddress string
ReceiverRegionId int
ReceiverCity int
DestinationBranchId int
WeighingUnitId int
TotalPieces int
ActualWeight decimal
ChargeableWeight decimal
ShipmentDescription string
ShipmentValue decimal
AmountTo be Paid decimal
NetAmount decimal
VolumtricWeightList List of decimal
ActualWeightList List of decimal

Master Data   Track API       Get Label API

City

Below are the list of City with there corresponding IDs, which will be required for the SenderCity and ReceiverCity parameters in the request.

CityID
Abha1
Abo Ajram2
AbuAreesh3
AdDilam4
AdDiriyah5
Afïf6
Ahad AlMasarihah7
Ahad Rafidah8
Ain Dar9
Al Dulaymiyah10
Al Hariq11
Al Hulwah12
Al Jafr13
Al Lith14
Al Tuwal15
AlAflaj16
AlAwamiyah17
AlBadai18
Al-Badie Al-Shamali 19
AlBaha20
AlBukayriyah21
Alhawiyah22
AlJumoom23
AlKhabra24
AlKhafji25
AlKharj26
AlKhurmah27
AlMajmaah28
AlMakhwah29
AlMidhnab30
AlMubarraz31
AlMuzahimiyah32
AlQatif33
AlQudaih34
AlQunfudhah35
AlQurayyat36
AlQuwayiyah37
AlQuz38
AlUla39
AlUyun40
AlWajh41
An Nabhaniyah42
Anak43
Ar Ruwaidhah44
Arar45
As Sulayyil46
Athuqbah47
Badr48
Bahrah49
Bahrain Causeway50
Baljurashi51
Bariq52
Batha53
Bish54
Bisha55
Buqayq56
Buraidah57
Damad58
Dammam59
Darb/abha60
Dawadmi61
Dhahran62
Dhahran Al Janub63
Dhurma64
Duba65
Dukhnah66
Dumat alJandal67
Ghat68
Hadaad Bani Malek69
Hafar AlBatin70
Hail71
Hali AlQunfudhah72
Haql73
Hassa74
Hawtat Sudayr75
Hayel Al Mahattah76
Hotat Bani Tamim77
Huraymila 78
Jash79
Jeddah80
Jizan81
Jubail82
Khamis Mushait83
Khobar84
Layla85
1med86
Mahail87
Majardah88
Malham89
Mecca90
Medina91
Nairiyah92
Najran93
Nakeea94
Namas95
Qaisumah96
Qarya Al Uliya97
Rabigh98
Rafha99
Ranyah100
Ras Tannurah101
Rass102
Rijal Alma103
Riyadh104
Riyadh AlKhabra105
Rumah106
Sabt AlUlayah107
Sabya108
Safwa109
Saihat110
Sajir111
Sakakah112
Salbukh113
Salwa114
Samtah115
Sarat Abideh116
Shaqraa117
Sharurah118
Tabarjal119
Tabuk120
Taif121
Taraf122
Tarut123
Tathlith124
Tayma125
Thwal126
Turabah127
Turaif128
Udhayliyah129
Ummluj130
Unaizah131
Uqlat As Suqur132
Uthmaniyah133
Uyun al jawa134
Wadi adDawasir135
Wadi Bin Hashbal136
Yanbu137
Zalom138
Zulfi139
Al Henakiyah140
Mahd Al zahab141
Hail al Shamali142
BASHAIR143
BIN OMER144
BL AHMER145
BLASMIR146
Bahrain147
Dubai148
Dubi Lan149

Region

Below are the list of Region with there corresponding IDs, which will be required for the ReceiverRegionId parameters in the request.

RegionID
Center Region1
North Region2
South Region3
West Region4
East Region5
Bahrain Region6
Emirates7

Origin & Destination Branch Mapping




Possible Values for Type IDs

Below are the possible values for Type ID fields that are required for the API parameters.

FieldsThe possible values of Type Ids
PaymentTypeIdPrepaid - 83


Get Label API 

curl --location --request GET 'http://sample.zajil-express.org/api/shipment/GenerateLabelPdf?awbno=075170508133&from=1&to=1' \ --header 'Authorization: Basic d2ludXNlcjpwYXNzd29yZA=='

Tracking API


 By using the below link you can get the full tracking detalis for the conisngemnts

https://mobileapi.zajil-express.org/track?shipment={Airybillnumer}

List of shipemnts tracking statuses

Statuses

Assigned to Hub

assigntoworker

attempted

Cancelled

Closed

Damaged

Data Received

Delivered

Delivery Failed

In Transit

inscan_at_gateway

not_picked_up

On hold

Out for Delivery

Pickup Completed

Reached at Hub

Ready_For_Collection

Redirect Shipment

Release on hold

Returned to Origin

RTS_Initiated

Scan at Hub

shelved

Transit to Hub

Under Process

Wrong Close Attempt