How To Get Quick Delivery Services API key (token) – Quick Delivery System

Why I need a key to use quick delivery system API

a key to use quick delivery system API – also called a Token- is needed because our servers will receive and proses a huge amount of customer requests, so we must have strict polices monitoring the traffic we receive, and throughout our api token method we can provide every business owner (app developer) with an unique api key (token) that can be used to access our services in a secured manner.

that’s why through pexcode blog we will answer the following questions, Why I need a key to use quick delivery system API, Is it important to protect the api token, and How To protect your API keys or tokens.

Why I need a key to use quick delivery system API

Using a key to access an API quick delivery system serves several important purposes:

  1. Authentication: The key serves as a form of authentication, ensuring that only authorized users or applications can access the API, to prevent unauthorized access and protects the system from misuse or abuse.
  2. Security: By requiring a key, the API provider can track and monitor usage, identifying any unusual or suspicious activity, this helps maintaining the security of the system and provides more protection against potential threats such as denial-of-service attacks or unauthorized data access.
  3. Rate limiting: API keys can be used to enforce rate limits, ensuring that users or applications do not overwhelm the system with too many requests, this helps maintaining the stability and performance of the API for all users.
  4. Tracking usage: API keys allow the provider to track usage statistics, such as the number of requests made, the types of requests, and the users making the requests, this information can be valuable for monitoring system usage, identifying trends, and optimizing performance.

First login with Admin account to https://management.quickdeliverysystem.com/login
Menu -> setting -> Go to your app -> you will find yours applications and chose your app and View token and you can change your token like this .

notice : if you don’t have app in your account follow the link How Add New App In Quick Delivery Delivery System

Also Read: how to use quick delivery system API v1.0.

Is it important to protect the api token

Yes, it is crucial to protect API keys or tokens used to access quick delivery systems API, and Here’s why:

  1. Unauthorized Access: If someone obtains your API key or token, they can potentially use it to access the API and perform actions on your behalf. This could lead to unauthorized data access, manipulation, or even service abuse.
  2. Data Privacy: Many APIs provide access to sensitive data, If your API key is compromised, it could lead to a breach of privacy, exposing confidential information about your organization or your users.
  3. Service Abuse: Malicious users may exploit unprotected API keys to abuse the API, causing disruptions to service availability, increased server costs, or other forms of damage.
  4. Financial Implications: Some APIs have usage-based pricing models, where you are charged based on the number of API requests made, If unauthorized parties gain access to your API key, they could add significant costs by making excessive requests.

Also Read: How To Add a New App In Quick Delivery System.

How To protect your API keys or tokens

  • Store Securely: Keep your keys or tokens in a secure location, such as encrypted configuration files or secure key management systems.
  • Limit Access: Only provide API keys or tokens to trusted individuals or applications that require access to the API, Avoid hardcoding keys into client-side code or sharing them in publicly accessible repositories.
  • Rotate Keys: Regularly rotate your API keys or tokens to mitigate the impact of potential breaches. This helps limit the window of opportunity for attackers to exploit compromised keys.
  • Use Access Controls: Some API providers offer access control mechanisms, such as IP whitelisting or OAuth 2.0, to further restrict access to authorized users or applications.

Read more on: quick delivery system.

In conclusion we’ve talked about Why I need a key to use quick delivery system API, Is it important to protect the API token, and How To protect your API keys or tokens.

How to use API Quick delivery system v.1.0 -This version (1.0) is no longer available. You can use the SDK or wait for the new version (2.0) to be released.

Why I need to use API Quick delivery system

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:

  1. 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.
  2. 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.