API
Last updated
Was this helpful?
Last updated
Was this helpful?
the Wakilni offers an API to help create and manage orders from third-party applications.
Developers can use this API to integrate Wakilni into their custom applications.
Below are steps required, along with detailed documentation on the API.
For Testing
use the data below instead of the data in the section
URL
-> https://api-dev.wakilni.com
You need to register as a new client in and complete the integration as followed in the documentation.
If everything went right, please find the Production
data (use data below instead of the data in the section)
URL
-> https://api.wakilni.com
JORDAN URL
-> https://jordan-api.wakilni.com
Each client will be able to generate an access token that is attached to your account to be used in the API.
Login to customer back office
Go to Settings
Open tab “Api Tokens”
Click “Link to your custom app”
Enter your shop name/label.
Click create
A key/secret combination will be created for this client.
Copy these credentials and pass them to the request of the auth api.
A token will be generated, which you can pas as a bearer token in the other apis.
Bulk process is divided into 2 flows: pickup bulk and delivery bulk
Pickup bulk: driver pickups the product from the vendor
Delivery bulk: driver delivers the product to the recipient
Shipping price: Wakilni has default delivery prices based on pickup/delivery locations. Also, each customer can have his own customized prices.
Api process:
Start bulk: creates pickup bulk order (multiple bulks can be created)
Add delivery: creates delivery order related to pickup bulk (multiple deliveries can be created)
End bulk: orders become active and are sent to portal for shipping
Show order status: shows order status based on the flow update Status/ Status Code:
PENDING = 1
CONFIRMED = 2
DECLINED = 6
CANCELED = 7
PROCESSING = 3
SUCCESS = 4
FAILED = 5
CLOSED_FAILED = 8
POSTPONED = 9
PENDING_CANCELLATION = 10
SUCCESS, REJECTED = 4
When the order is delivered but the client rejected it
Method: GET
Body:
key
: App key
secret
: App secret
Response
Method: POST
Header: Authorization: Bearer {token}
Body:
location_id
: customer’s location id reference from your app
longitude
: customer’s location’s longitude
latitude
: customer’s location’s latitude
floor
: customer’s location’s floor
area
: it is preferable to send us the area name from the list provided from get area’s list
Response
Method: POST
Header: Authorization: Bearer {token}
Body:
get_order_details
: Set to true if you want to display order details after creating order
get_barcode
: Set to true if you want the barcode label returned
waybill
: To reference or identify your order
receiver_id
: The recipient’s unique reference id from your app or system
For example: your recipient's id in your system is 123, then "receiver_id" : 123
receiver_first_name
: Recipient’s first name
receiver_last_name
: Recipient’s last name
receiver_phone_number
: Recipient’s phone number
receiver_gender
: Recipient’s gender (1 -> male, 2 -> female)
receiver_email
: Recipient’s email
receiver_secondary_phone_number
: Recipient’s secondary phone number
receiver_location_id *
: The recipient’s location's unique reference id from your app or system
For example, your recipients shipping address location id is 123, then
"receiver_location_id" : 123
receiver_longitude
: Customer’s location’s longitude
receiver_latitude
: Customer’s location’s latitude
receiver_building
: Customer’s location’s building
receiver_floor
: Customer’s location’s floor
receiver_directions
: Customer’s location’s directions
receiver_area
: It is preferable to send us the area name from the list provided from get area’s list
currency
: 1 -> USD, 2 -> LBP
cash_collection_type_id
: (paid: 54, on delivery: 52)
type_id
: (paper: 57, regular box: 58, small box: 59, large box: 60, very large box: 61)
Response:
Note: for use of barcode label to display barcode image, add the blob value to the image src as follows:
Method: POST
Header: Authorization: Bearer {token}
Response:
Method: POST
Header: Authorization: Bearer {token}
Response:
Method: POST
Header: Authorization: Bearer {token}
Response:
Method: PUT
Header: Authorization: Bearer {token}
Body:
reason
: Reason for canceling the order
Response:
Note: You are able to cancel an order only if the status is pending
Method: GET
Header: Authorization: Bearer {token}
Method: GET
Header: Authorization: Bearer {token}
Response:
Example response:
API:
API:
API:
API:
API:
API:
API:
API:
Pagination:
Filter:
Pagination and Filter:
API: