whatsapp

Merchant API’S

ALOD APIs are designed to enable you to interact securely with our platform. You will get Base 64 encoded JSON responses from the API (same format will be followed in case of errors as well).

NOTE: You need to pass headers to access all api's.

Headers: authkey : {ACCESS KEY}

Param name - authkey: Access Key of business account. This will be provided to you by our support team.

Also our support team provide you user_id which you have to pass in all required places while requesting.

Merchant URL : https://www.alod.net/mobile_api

Example request:
Name Description Note
Method
( required )
Call Method Name of function String
Model
( required )
Call Model Name of function String

Example success response:
{
   "status":"success",
   "_method_name":"METHOD_NAME",
   "_model_name":"MODEL_NAME"
   "message":"SUCCESS_MESSAGE",
} 
					
Example error response:
Syntax :
{
   "status":"error",
   "errors":[{"param":"PARAM_NAME","msg":"ERROR_MESSAGE","value":"PARAM_VALUE"}]
} 
			

Create Booking

Use: This function is used to create multiple bookings.

Request Parameters :
Name Values Description
Method
( required )
createBooking Fix value
Model
( required )
business_booking Fix value
user_id
( required )
Example : 61559a7e1d3f24416428a6c1 User Id of business account
merchant_id Example : 215349459 Merchant id of business which is your system unique id.
user_type
( required )
business Fix value
booking_detail
(required)
[
	{
		"pickup_latitude":"30.51956649",
		"pickup_longitude":"44.49629547",
		"pickup_country_code":"SA",
		"pickup_address":"Riyadh Saudi Arabia",
		"dropoff_latitude":"29.31800973",
		"dropoff_longitude":"48.02595257",
		"dropoff_country_code":"KW",
		"dropoff_address":"829G+46X, Jabriya, Kuwait",
		"booking_type" : "parcel",
		"stakeholder_name": 'Test 1',
		"country_code": '+966',
		"stakeholders":"123123123",
		"item_name":"Television",
		"quantity":"2",
		"item_weight":10,
		"item_detail":"Television",
		"item_quantity":10,
		"item_price":111,
		"stackable" : "0/1",
		"insurance" : "0/1,
		"payment_type":ppd / cod,
		"is_international": "1",
		"cod_amount":100,
		"schedule_type":'schedule_now/schedule_later',
		"shipment_content_type" : "dry/cold",
		"scheduled_time":"",
		"delivery_partners": dhl/ups/jt/adwar/coldt/imile/sbt/aramex/fedex,
		"delivery_type": "regular/same_day",
		"length": '',
		"width": '',
		"height": '' ,
		"is_location_unknown":"true/false",
		"is_invoice_required" : "0/1"
	},
	{
		"pickup_latitude":"30.51956649",
		"pickup_longitude":"44.49629547",
		"pickup_country_code":"SA",
		"pickup_address":"Riyadh Saudi Arabia",
		"dropoff_address":"829G+46X, Jabriya, Kuwait",
		"dropoff_latitude":"29.31800973",
		"dropoff_longitude":"48.02595257",
		"dropoff_country_code":"KW",
		"booking_type" : "parcel",
		"stakeholder_name": 'Test 1',
		"country_code": '+966',
		"stakeholders":"123123123",
		"item_name":"Television",
		"quantity":"2",
		"item_weight":10,
		"item_detail":"Television",
		"item_quantity":10,
		"item_price":111,
		"stackable" : "0/1",
		"insurance" : "0/1,
		"payment_type":ppd / cod,
		"is_international": "1",
		"cod_amount":100,
		"schedule_type":'schedule_now/schedule_later',
		"shipment_content_type": "dry/cold",
		"scheduled_time":"",
		"delivery_partners": dhl/ups/jt/adwar/coldt/imile/sbt/aramex/fedex,
		"delivery_type": "regular/same_day",
		"length": '',
		"width": '',
		"height": '' ,
		"is_location_unknown":"true/false",
		"is_invoice_required" : "0/1"
	}
]
								
Multiple booking item details
  1. Payment type:ppd or cod.
  2. stakeholder_name is receiver name
  3. schedule_type = "schedule_now/schedule_later' If choose schedule later then scheduled_time is required.
  4. height,width,length is mandatory if delivery type choose as "DHL".
  5. item_quantity : "Total item quantity ".
  6. quantity : "This is package quantity".
  7. is_invoice_required: 0 means not required and 1 means required.
  8. shipment_content_type: "dry/cold" if shipment_content_type is cold then booking should be domestic
  9. For Cold Shipment: jonex/coldt
  10. For Dry Shipment: ups/dhl/shipa/aymakan/jt/spl
  11. is_location_unknown: In case of sender is not confirmed about the dropoff address then in this case they can select location unknown as true but they have to select near by dropoff location including country and city.
  12. In case if sender is not having invoice for the shipment then they can select create invoice system will genrate invoice based on the entered information by businesses or sender.
item_images
{
	'item_images[0][0]': 
	{ 
		name: 'blog-02.png',
		data: ,
		encoding: '7bit',
		mimetype: 'image/png',
		mv: [Function: mv] 
	},
	'item_images[1][0]': 
	{ 
		name: 'blog-full.png',
		data: ,
		encoding: '7bit',
		mimetype: 'image/png',
		mv: [Function: mv] 
	},
}
								
Multiple Item Images of booking.
packaging
{
	'packaging[0][0]': 
	{ 
		name: 'blog-02.png',
		data: ,
		encoding: '7bit',
		mimetype: 'image/png',
		mv: [Function: mv] 
	},
}
								
Packaging Images for booking.
Invoice (required if booking is international and is_invoice_required is 1 )
{ 
'invoice[0][0]': 
	{ 
		name: '1657099691277-bookings.pdf',
		data: ,
		encoding: '7bit',
		mimetype: 'application/pdf',
		mv: [Function: mv] 
	},
	'invoice[1][0]': 
	{ 
		name: '1657099691277-bookings.pdf',
		data: ,
		encoding: '7bit',
		mimetype: 'application/pdf',
		mv: [Function: mv] 
	} 
}                           
								
Upload invoice PDF if booking is international.

Response Data:
Success:
{
	"status":"success",
	"booking_ids":["618e35b89b7f4f5bbf715464"],
	"message":"Booking has been scheduled successfully.",
	"_method_name":"createBooking",
	"_model_name":"business_booking"
}
			
Error:
{
	"status":"error",
	"message":[
		{"param":"booking_detail_0_item_name","msg":"Please enter item name."},
		{"param":"item_images_0","msg":"Please select images."}
	],
	"req_files":null,
	"_method_name":"createBooking",
	"_model_name":"business_booking"
}
			

Booking Listing

Use: This function is used to get booking list.

Request Parameters :
Name Values Description
Method
( required )
bookingListing Fix value
Model
( required )
booking Fix value
user_id
( required )
Example : 61559a7e1d3f24416428a6c1 User Id of business account
limit 10 No. of record you want to show on listing page.
skip 0 Total record skip (along with limit)
user_type
(required)
business Fix value
Response Data:
	Success:{
	"status":"success",
	"result":[
		{
			"_id":"618e35b89b7f4f5bbf715464",
			"user_id":"612dd73727bc7336d71d8f85",
			"booking_id":"786853",
			"business_booking":true,
			"created":"2021-11-12T09:36:56.626Z",
			"dropoff_details":{
				 "dropoff_city":"الجابرية",
				 "dropoff_area":"الجابرية",
				 "dropoff_country":"الكويت‎",
				 "dropoff_address":"829G+46X, Jabriya, Kuwait",
				 "dropoff_latitude":29.31800973,
				 "dropoff_longitude":48.02595257,
				 "dropoff_lng_city":["الجابرية","jabriya"],
				 "dropoff_lng_area":["الجابرية",""],
				 "dropoff_lng_country":["الكويت‎","kuwait"]
			},
			"is_location_unknown":false,
			"items_list":[
			{
				 "_id":"618e35b89b7f4f5bbf715465",
				 "item_name":"etertert",
				 "item_details":"sdgdfgdf",
				 "total_volume":0,
				 "category":"",
				 "quantity":2,
				 "images":[],
				 "volume":0,
				 "dimensions":{"height":0,"width":0,"length":0},
				 "category_name":""
			}],
			"modified":"2021-11-12T09:36:56.625Z",
			"payment_details":{"payment_type":"online"},
			"payout_details":{"system_payout":123},
			"pickup_details":{"pickup_address":"GF9W+RG Al Salman, Iraq","pickup_latitude":30.51956649,"pickup_longitude":44.49629547,"pickup_city":"السلمان","pickup_area":"السلمان","pickup_country":"العراق","pickup_lng_city":["السلمان","al salman"],"pickup_lng_area":["السلمان",""],"pickup_lng_country":["العراق","iraq"]},
			"status":"placed",
			"user_type":"business",
			"customer_name":"Business 1 B1",
			"customer_image":"SEP2021/1632137222448-1623399634603ubericon.png",
			"customer_mobile_number":"+9667777777771"
		}
	],
	"user_image_path":"https://www.alod.net/public/frontend/uploads/user/",
	"booking_image_path":"https://www.alod.net/public/frontend/uploads/booking/",
	"_method_name":"bookingListing",
	"_model_name":"booking"
}                            
			

Business Notification List

Use: This function is used to get notification list of business.

Request Parameters :
Name Values Description
Method
( required )
getNotifications Fix value
Model
( required )
notification Fix value
user_id
( required )
Example : 61559a7e1d3f24416428a6c1 User Id of business account
limit 10 No. of record you want to show on listing page.
skip 0 Total record skip (along with limit)
Response Data :
{"status":"success","result":[],"recordsTotal":5,"recordsSkipTotal":5,"limit":10,"_method_name":"getNotifications","_model_name":"notification"}                              
			

Get Booking Details

Use: This function is used to get booking detail of business.

Request Parameters :
Name Values Description
Method
( required )
getBookingDetails Fix value
Model
( required )
booking Fix value
user_id
( required )
Example : 61559a7e1d3f24416428a6c1 User Id of business account
booking_id
(required)
Example : 620dce6cbeb0ec438274dd74 Booking Id of business booking
user_type
(required)
Business Fix value
Response Data :
{
	"status":"success",
	"result":{
		"_id":"620dce6cbeb0ec438274dd74",
		"user_id":"61559a7e1d3f24416428a6c1",

		"booking_id":"404444",
		"business_booking":true,
		"created":"2022-02-28T04:23:00.000Z",
		"created_on":"2022-02-17T04:26:21.968Z",
		"dropoff_details":{
			 "dropoff_city":"Riyadh",
			  "dropoff_country":"Saudi Arabia",
			 "dropoff_address":"Riyadh Saudi Arabia",
			 "dropoff_latitude":26.9195875,
			 "dropoff_longitude":75.78796080000001,
		},
		"is_location_unknown":false,
		"is_scheduled":true,
		"items_list":[
		 {
			"_id":"620dce6dbeb0ec438274dd77",
			"item_name":"item name",
			"item_details":"sfsfsdf",
			"total_volume":0,
			"category":"",
			"quantity":1,
			"images":[
			   {
				  "_id":"620dce6dbeb0ec438274dd75",
				  "image":"FEB2022/1645071981467-blog01.png"
			   }
			],
			"volume":0,
			"dimensions":{
			   "height":0,
			   "width":0,
			   "length":0
			},
			"category_name":""
		 }
		],
		"modified":"2022-03-08T09:42:02.313Z",
		"no_of_packages":1,
		"payment_details":{
			"cod_amount":"",
			"payment_type":"online"
		},
		"payout_details":{
		 "system_payout":50
		},
		"pickup_details":{
			 "pickup_address":"Riyadh, saudi arabia",
			 "pickup_latitude":26.9124336,
			 "pickup_longitude":75.7872709,
			 "pickup_city":"Riyadh",
			 "pickup_country":"saudi arabia"
		},
		"status":"Placed",
		"shipment_content_type":"dry",
		"user_type":"business",
		"user_mobile_number":"+966111111111",
		"user_name":"Test api",
		"api_type":"alod",
		"customer_name":"Test api",
		"customer_image":"MAR2022/1648112334623-zkOHn2Yv.png",
		"customer_rating":3,
		"customer_mobile_number":"+966111111111",
		"stackholder_list":[
		 {
			"mobile_number":"1010101010",
			"stakeholder_name":""
		 }
		],
	
	},
	"image_path":"https://www.alod.net/public/frontend/uploads/user/",
	"booking_image_path":"https://www.alod.net/public/frontend/uploads/booking/",
	"booking_invoice_url":"https://www.alod.net/public/frontend/uploads/booking_invoice/",
	"ups_image_path":"https://www.alod.net/public/frontend/uploads/ups_label/",
	"_method_name":"getBookingDetails",
	"_model_name":"booking"
}                            
			

Booking Tracking API:

Use:This function is used to track a particular booking

Request Parameters :

Name Values Description
Method
( required )
getDeliveryPartnersTrackingDetail Fix value
Model
( required )
business_booking Fix value
booking_number
(required)
Example : 444276 Booking number/AWB number of business booking
Response Data :
{
    "status": "success",
    "api_type": "spl",
    "tracking_details": [
        {
            "EventId": "329",
            "EventNameAR": "بانتظار الإستلام من المرسل",
            "EventNameEN": "Awaiting receiving from Sender",
            "CreationDate": "2023-08-24 12:19:16.",
            "ItemDeliveryStatusEnum": 0,
            "OriginOfficeID": "999999",
            "OriginOfficeNameAR": "المرسل",
            "OriginOfficeNameEN": "Sender",
            "DestinationOfficeID": "",
            "DestinationOfficeNameAR": null,
            "DestinationOfficeNameEN": null,
            "ItemBarcode": "CRDSAL0600536923",
            "NoDeliveryReasonID": 0,
            "NoDeliveryReasonNameAR": null,
            "NoDeliveryReasonNameEN": null,
            "EventCategoryCode": "12",
            "EventCategoryName_Ar": "تحت التجهيز",
            "EventCategoryName_En": "preparation"
        }
    ],
    "current_status": "assign",
    "_method_name": "getDeliveryPartnersTrackingDetail",
    "_model_name": "business_booking"
}

Get Airwaybill Label

Use: This function is used to get Airwaybill Label from booking id.

Request Parameters :
Name Values Description
Method
( required )
getAwbLinks Fix value
Model
( required )
booking Fix value
booking_id
( required )
Example : 633fc33b82eae94a8817fcb7 Booking Id of business booking
Response Data :
{
	"status":"success",
	"result":[
	{
		"_id":"633fc37fe4152efb029214af",
		"shipment_label_pdf":"https://www.alod.net/public/frontend/uploads/ups_label/1665123194654_0_shipment_label.PDF"
	},
	{
		"_id":"633fc37fe4152efb029214b0",
		"shipment_label_pdf":"https://www.alod.net/public/frontend/uploads/ups_label/1665123198701_1_shipment_label.PDF"
	}],
	"_method_name":"getAwbLinks",
	"_model_name":"booking"
}				
			

Merchant Onboard

Use: This function is used to onboard merchant of business in alod system.

Request Parameters :
Name Values Description
Method
( required )
merchantOnboard Fix value
Model
( required )
business_booking Fix value
business_id
( required )
Example : 61559a7e1d3f24416428a6c6 Business id of business account which is provided by our support team.
merchant_id
( required )
Example : 215349459 Merchant id of business which is your system unique id.
merchant_name
( required )
Example : Demo Merchant name of business
merchant_email
( required )
Example : [email protected] Merchant email of business
merchant_mobile
( required )
Example : +966511111111 Merchant mobile of business
merchant_location Example : Riyadh Front - Shopping Area, Airport Road, Riyadh Saudi Arabia Merchant location of business
Response Data :
{
	"status":"success",
	"message":"Merchant detail has been added successfully.",
	"_method_name":"merchantOnboard",
	"_model_name":"business_booking"
}
			


Delivery Partners Pricing

Use: This function is used to get delivery partner pricing.

Request Parameters :
Name Values Description
Method
(required)
getRateAndDeliveryTimeAmountApi Fix value
Model
(required)
business_booking Fix value
weight
(required)
Example : 5 Weight of the package
pickup_country_code
(required)
Example : SA Country code for pickup
dropoff_country_code
(required)
Example : SA Country code for dropoff
type Example : b2c Type of delivery
is_international Example : false Whether the delivery is international
pickup_country
(required)
Example : Saudi arabia Country for pickup
dropoff_country
(required)
Example : Saudi arabia Country for dropoff
pickup_city
(required)
Example : riyadh City for pickup
dropoff_city
(required)
Example : riyadh City for dropoff
shipment_content_type
(required)
Example : dry Shippment type : cold/dry
user_id Example : 61559a7e1d3f24416428a6c6 User ID
Response Data :
					{
						"status": "success",
						"result": [
						  {
							"amount": 1,
							"days": "2 Days",
							"type": "dhl"
						  },
						  {
							"amount": 1,
							"days": "2 - 3 Days",
							"type": "shipa"
						  },
						  {
							"amount": 702,
							"days": "2 Days",
							"type": "ups"
						  },
						  {
							"amount": 1,
							"days": "2 - 3 Days",
							"type": "jt"
						  },
						  {
							"amount": 1,
							"days": "3 Days",
							"type": "jonex"
						  },
						  {
							"amount": 1,
							"days": "4 Days",
							"type": "saee"
						  },
						  {
							"amount": 5,
							"days": "3 Days",
							"type": "aymakan"
						  },
						  {
							"amount": 8,
							"days": "3 Days",
							"type": "spl"
						  },
						  {
							"amount": 45,
							"days": 0,
							"type": "coldt"
						  }
						],
						"_method_name": "getRateAndDeliveryTimeAmountApi",
						"_model_name": "business_booking"
					  }