use API Quick delivery system to have a better handle on your business, An API (Application Programming Interface) is a set of rules and protocols that allows different software applications to communicate with each other, APIs are commonly used to enable integration between different systems, allowing them to share data and functionality.
That’s why we will talk more about Why I need to use API Quick delivery system, How can I register in the platform, How can I get the App token (key), How to add a new order to the platform, and how to track or delete the order.
Why I need to use API Quick delivery system
here’s what you need to use API Quick delivery system, Note when an API requires a token key and registration, it typically means that the API provider requires developers to authenticate themselves and obtain permission before they can access the API’s resources.
Here’s a breakdown of the process:
- Registration: Before you can use the API, you usually need to register for an account on the API provider’s website Quick delivery system, this registration process may involve providing some personal or company information, agreeing to terms of service, and possibly verifying your email address.
- Token Key: After registering, the API provider will typically provide you with a token key. This token key acts as a unique identifier for your application when making requests to the API. It’s like a password that grants you access to the API’s resources.
How can I register in the platform
To make sense of the registration process, we recommend reading this article about Quick Services Guide for Delivery Companies Management.
Where we dive in the details of the registration process.
How can I get the App token (key)
Overall, requiring a token key and registration helps API providers controlling access to their services, track usage, and enforce security measures.
It also allows them to provide personalized support and services to registered developers.
How to add a new order to the platform
Follow the link: https://api.pexcode.com/qs/api/app/v1/orders/
and add after it the api token you will receive from out platform.
methods: Post
Params
{
key:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiY2lkIjo3LCJhY2Nlc3MiOjAsImlhdCI6MTcxMDI2MTM3OX0.UoHDIQiQYdZh
}
body
{
"uid":3, // here is Id user who will receive the order , you can use id from your system
"cost_order": 55,
"price_order":44,
"src_address": "address letters", //box address letters
"src_lat": "50.85986",
"src_lng":"12.92454",
"dest_address": "address letters", // recipient address letters
"dest_lat": "50.8634053",
"dest_lng": "12.9575595",
"note": "note about order ", // note about your order like continue Contains breakable product
"dest_name":"Mussab Muhaimeed", // recipient name some times important
"dest_number": "123456", // telephone recipient number
"dest_email": "support@pexcode.com", // email recipient number
"sender_name": "123456", // sender name
"sender_address": "address letters", // sender address
"aender_email": "support@pexcode.com", // sender email
"task":"Box", // give the Task name like Box
"verification":0 // the employee can leave the order // 1 he need code from recipient to approved delivery process
}
uid | not require | Integer | user id in your system , that help you to filter or find order for this user |
cost_order | not require | Integer | the cost delivery process |
price_order | not | Integer | cost the box |
src_address | Require | String | letter address of the center |
src_lat | Require | String | |
src_lng | Require | String | |
dest_address | Require | String | letter address recipient the order |
dest_lng | Require | String | |
dest_lat | Require | String | |
dest_name | Require | String | The recipient name , it’s important to complete delivery process |
note | not Require | String | can be “nothing here” write something important about this order like contained glass breakable |
dest_number | Require | String | important to be true number the employees will call this number |
dest_email | Not require | String | we send notification track by email |
task | Require | String | must be by default “Box” |
sender_name | Require | String | the sender name , we need it to return this order if we can’t find the recipient |
sender_email | Not require | String | we send notification track by email |
sender_address | Require | String | the sender address |
kg | Require | number | How many kilo gram |
cost_box | Require | Boolean | can be 1 or 2 this Obj will show or hide the cost in delivery employee app note :*** cost_order and price_order must be not null |
Example the request will be like this request
https://api.pexcode.com/qs/api/app/v1/orders/?key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiY2lkIjo3LCJhY2Nlc3MiOjAsImlhdCI6MTcxMDI2MTM3OX0.UoHDIQiQYdZh
Success response will be something like this:
{
"success": true,
"status": 200,
"message": "successfully created order",
"data": {
"id": 207, // is ID order
"admin": null,
"did": null,
"uid": 3, // is the same : here is Id user who will receive the order , you can use id from your system
"cid": 7, // your company ID
"appid": 1, // your app ID
"verification": 1,
"code": 5514,
"src_id": null,
"src_address": "address letters",
"src_lng": "12.92454",
"src_lat": "50.85986",
"dest_address": "address letters",
"dest_lng": "12.9575595",
"dest_lat": "50.8634053",
"task": "Box",
"dest_name": " Mussab",
"dest_number": "123456",
"dest_email": "support@pexcode.com",
"sender_name": "123456",
"sender_address": "address letter",
"sender_email": "support@pexcode.com",
"note": "note about order ",
"cost_order": 55,
"price_order": 44,
"kg":1,
"status": -1,
"reported": 0,
"created_at": "2024-03-14T16:47:37.000Z",
"updated_at": "2024-03-14T16:47:37.000Z",
"uuid": "b96f7f80-a066-45aa-add0-b1e21d798a8f",
"service": {
"name": "Quick delivery system",
"number": "+49xxxxxxxxxx",
"id": 7,
"address": "address letters",
"avatar": "https://api.pexcode.com/qs/view/29/Png.png"
}
}
}
Wrong response will be like this response
{
"success": false,
"status": 422,
"message": "There is a validation error.",
"data": [
{
"msg": "src_address must be provided.",
"param": "src_address",
"location": "body"
}
]
}
Now how to track the added order
https://api.pexcode.com/qs/api/app/v1/orders/tracking/? id=207&key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiY2lkIjo3LCJhY2Nlc3MiOjAsImlhdCI6MTcxMDI2MTM3OX0.UoHDIQiQYdZh
methods: Get
response will be like this
{
"success": true,
"status": 200,
"message": "some order data",
"data": {
"id": 207,
"admin": null,
"did": 29,
"uid": 3,
"cid": 7,
"appid": 1,
"verification": 1,
"code": 5514,
"src_id": null,
"src_address": "address letters",
"src_lng": "12.92454",
"src_lat": "50.85986",
"dest_address": "address letters",
"dest_lng": "12.9575595",
"dest_lat": "50.8634053",
"task": "Box",
"dest_name": " Mussab",
"dest_number": "123456",
"dest_email": "support@pexcode.com",
"sender_name": "123456",
"sender_address": "address letter",
"sender_email": "support@pexcode.com",
"note": "note about order ",
"cost_order": 55,
"price_order": 44,
"status": 0,
"kg":1,
"reported": 0,
"created_at": "2024-03-14T16:47:37.000Z",
"updated_at": "2024-03-14T17:02:29.000Z",
"uuid": "b96f7f80-a066-45aa-add0-b1e21d798a8f",
"track": {
"rows": [
{
"id": 394,
"id_order": 207,
"id_user": 3,
"role": 4,
"status": 0,
"created_at": "2024-03-14T16:47:38.000Z"
}
],
"pagination": {
"page": 1,
"page_size": 30,
"total_rows": 1,
"first_row_no": 1
}
},
"service": {
"name": "Quick delivery system",
"number": "033xxxxxxxxx",
"id": 7,
"address": "address letters",
},
"did_info": {
"name": "Mussab Muhaimeed",
"number": "11xxxxxxxxx",
"id": 29,
"avatar": "https://api.pexcode.com/qs/view/29/Png.png"
}
}
}
How to cancel an order
By following this link, you can cancel an order:
https://api.pexcode.com/qs/api/app/v1/orders?uid=3&id=205&key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiY2lkIjo3LCJhY2Nlc3MiOjAsImlhdCI6MTcxMDI2MTM3OX0.UoHDIQiQYdZh
method: DELETE
response
{
"success": true,
"status": 200,
"message": "",
"data": {
"result": true,
"id": 205
}
}
if you need more info or have any questions contact us on support@pexcode.com.
Updated at 16.03.2024
This version (1.0) is no longer available. You can use the SDK or wait for the new version (2.0) to be released.
At the end of our article, we’ve talked about Why I need to use API Quick delivery system, how can I register in the platform, how can I get the App token (key), How to add a new order to the platform, and how to track or delete the order.