Get started

The Delicon.co API is a web service which allows you to use our Machine Learning platform from your website, software or mobile application. This API provides access to all of the supported functions of our service. The Web Service uses "REST-Like" RPC-style operations over HTTP POST requests with parameters URL encoded into the request and its response is encoded in JSON. It is designed to be easy to use and you can implement it in any computer language model that allows you to generate web requests.

In order to use the Delicon.co API, you must sign-up for an account, login and get your API Key from your member area. Additionally, while developing your code, it is advised to check out our API Sandbox and generate some test requests, as well.

Using the Delicon.co API or its website indicates that you have read and accept the Terms & Conditions and the Privacy Policy. If you do not accept these terms, you are not authorized to use this service.

To use this API, you need an API key. Please create an Account to get your own API key.


Get Areas

To get areas, you need to make a Get call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/get-city-list
Production : https://delicon.co/api/v2/get-city-list


DESCRIPTION

The Get City Lists function will get the info about city and its data i.e. city id, city name, state id, city name in Arabic, city latitude and city longitude.

QUERY PARAMETERS

There is no parameter required for this call.

REQUEST

PHP Sample Request

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/get-city-list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                

RESPONSE

{
 "response": {
  "status": 200,
  "data": {
        "city_id": "1",
        "city_name": "Bayan",
        "city_name_arabic": "بيان",
        "city_lat": "29.298107580815447",
        "city_long": "48.050959637603775"
        },
        {
          ....
        }
    }
}
                

Get My Areas

To get my areas, you need to make a Get call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/get-my-city-list
Production : https://delicon.co/api/v2/get-my-city-list


DESCRIPTION

The Get My City Lists function will get the info about city and its data i.e. city id, city name, state id, city name in Arabic, city latitude and city longitude.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team

REQUEST

PHP Sample Request

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/get-my-city-list',
  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 => 'email=&auth_key=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                

RESPONSE

{
 "response": {
  "status": 200,
  "data": {
        "city_id": "1",
        "city_name": "Bayan",
        "city_lat": "29.298107580815447",
        "city_long": "48.050959637603775"
        },
        {
          ....
        }
    }
}
                

Create Delivery Order

To create a delivery order, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/create-order
Production : https://delicon.co/api/v2/create-order


DESCRIPTION

Create Order Function will create an order if the given params are correct.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
delivery_date Yes date Date when delivery to be expected (Y-m-d i.e 2021-05-21)
delivery_time Yes time Time when delivery to be expected ( H:i:s i.e 21:04:23 )
dropOff_block_no Yes string Drop Off Block #
dropOff_street Yes string Drop Off Street #
dropoff_HouseNo Yes string Drop Off House #
dropoff_city_id Yes string Drop Off City ( get the city ID from get city api )
dropoff_phone_no Yes string Customer Phone #
order_number No string Client system order number
cash_amount No string If you want driver should collect cash from customer.
order_instruction No string Any instructions you want to be followed by delicon while processing order
pickUp_city_id No string Pickup City ( get the city ID from get city api )
pickUp_block_no No string Pickup Block #
pickUp_street No string Pickup Street #
pickup_Jadda No string Pickup Jaddah
pickup_HouseNo No string Pickup House #
pickUp_phone_no No string You pick up address phone number
pickup_Apartment No string  
pickup_ExtraDirection No string  
pickUp_address_name No string This address name is required if you are adding different pickup information

REQUEST

PHP Sample Request

...
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/create-order',
  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 => 'email=&auth_key=&delivery_date=&delivery_time=&dropOff_block_no=&dropOff_street=
                        &dropoff_HouseNo=&dropoff_city_id=&dropoff_phone_no=&order_number=&cash_amount=
                        &order_instruction=&pickUp_city_id=&pickUp_block_no=&pickUp_street=&pickup_Jadd=
                        &pickup_HouseNo=&pickUp_phone_no=&pickup_Apartment=&pickup_ExtraDirection=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                

RESPONSE

{
    "response": {
        "status": "200",
        "message": "Order created successfully.",
        "data": {
            "order_id": 31449343,
            "price": 2,
            "payment_id": "604650ee4095fb9604650e095fbddsaa",
            "payment_method": "wallet",
            "fleetCompany": "PD Co",
            "tracking_code": "604650E0TAFBAAF"
        }
    }
}
                

Delivery Order Details

To get delivery order details, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/order-details
Production : https://delicon.co/api/v2/order-details


DESCRIPTION

Get Order Function will fetch the order details if you have given the required params, correctly. Required params for 'Get Order' function include “email”, “auth_key”, and “order_id”.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
order_id Yes integar Required i.e.: (1737)

REQUEST

PHP Sample Request

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/order-details',
  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 => 'email=&auth_key=&order_id=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                

RESPONSE

{
    "response": {
        "status": "200",
        "data": {
            "pay_id": "22880",
            "order_id": "1737",
            "price": "2",
            "payment_id": "5fff1907cd79f5fff1907cd7a2",
            "u_id": "3",
            "created_on": "2018-05-14 04:56:25",
            "fleetCompanyId": "0",
            "payment_method": "wallet",
            "delivery_date": "2018-05-14",
            "delivery_time": "11:00:00",
            "pickUp_phone_no": null,
            "pickup_ExtraDirection": "",
            "pickup_Jadda": "",
            "pickup_Floor": "",
            "pickup_Apartment": "",
            "pickup_HouseNo": "",
            "pickUp_country": "",
            "pickUp_state": "",
            "pickUp_longitude": "47.982493",
            "pickUp_latitude": "29.381214",
            "pickUp_block_no": "",
            "pickUp_arear": "29 Khalid Ibn Al Waleed St, Kuwait City, Kuwait",
            "pickUp_city": "",
            "pickUp_street": "",
            "dropOff_arear": "",
            "dropOff_city_id": null,
            "dropoff_phone_no": "0",
            "dropoff_ExtraDirection": "",
            "dropoff_Jadda": "",
            "dropoff_Floor": "",
        }
    }
}
                

Get All Delivery Orders

To get all orders, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/all-orders
Production : https://delicon.co/api/v2/all-orders


DESCRIPTION

Get All Orders Function will fetch that users all orders and orders details if you have given the required params, correctly. Required Params for 'Get All Orders' function include “Email" and “auth_key”.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
pageno No integar i.e. 1

REQUEST

PHP Sample Request

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/all-orders',
  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 => 'email=&auth_key=&pageno=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                

RESPONSE

{
"response":
    {
        "status": "200",
        "data": {
            "total_pages": 1,
            "total_rows": 8,
            "current_page": 1,
            "per_page": 20,
            "orders": [
                {
                    "pay_id": "22880",
                    "order_id": "1737",
                    "price": "2",
                    "payment_id": "5fff1907cd79f5fff1907cd7a2",
                    "u_id": "3",
                    "created_on": "2018-05-14 04:56:25",
                    "fleetCompanyId": "0",
                    ...
                }
            ]
        }
    }
}
                

Cancel Order Request

To cancel a order, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/cancel-order-request
Production : https://delicon.co/api/v2/cancel-order-request


DESCRIPTION

Cancel Order Request Function will send a request to admin to make the approval for order cancellation if the delivery time gap is at least one hour. Required params for 'Cancel Order Request' function include “Email”, “auth_key”, and “order_id”.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
order_id Yes integar Required i.e.: (2028)

REQUEST

PHP Sample Request

               
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/cancel-order-request',
  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 => 'order_id=&email=&auth_key=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                

RESPONSE

{
    "response": {
        "status": 200,
        "message": "Request has sent for Approval !",
        "data": ""
    }
}
                

Get Shipping Companies List

To get shipping companies' list, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/get-logistic-companies
Production : https://delicon.co/api/v2/shipping/get-logistic-companies


DESCRIPTION

Get Shipping Companies List function will fetch all logistic companies' data if you have given the required params, correctly. Required Params for Get Shipping Companies List function include “Email” and “auth_key”.
Note: This function will return the data of only those logistic companies which has their pricing added on delicon.co

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team

REQUEST

PHP Sample Request


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/shipping/get-logistic-companies',
  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 => 'auth_key=&email=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                

RESPONSE

{
    "response": {
        "status": 200,
        "message": "Logistic Company list found",
        "data": {
            "logistic_companies": [
                {
                    "logistic_company_id": "959",
                    "name": "Aramex"
                },
                {
                    "logistic_company_id": "960",
                    "name": "UPS"
                },
                {
                    "logistic_company_id": "1060",
                    "name": "DHL"
                }
            ]
        }
    }
}             

Get Shipping Countries List

To get shipping countries' list, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/get-logistics-countries
Production : https://delicon.co/api/v2/shipping/get-logistics-countries


DESCRIPTION

Get All Shipping Countries List function will fetch all logistic countries' data if you have given the required params, correctly. Required Params for Get Shipping Countries List function include “Email” and “auth_key”.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team

REQUEST

PHP Sample Request


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/shipping/get-logistics-countries',
  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 => 'email=&auth_key=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                

RESPONSE

{
    "response": {
        "status": 200,
        "message": "Country list found",
        "data": {
            "country_list": [
                {
                    "id": "1",
                    "country_code": "AF",
                    "country_name": "Afghanistan",
                    "is_active": "0"
                },
                {
                    "id": "81",
                    "country_code": "DE",
                    "country_name": "Germany",
                    "is_active": "0"
                },
            ]
        }
    }
}           

Get Shipping Prices

To Get Shipping Prices, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/get-shipping-pricing
Production : https://delicon.co/api/v2/shipping/get-shipping-pricing


DESCRIPTION

Get All Get Shipping Prices function will return all logistics companies' data that can ship orders in your destination country ID, if you have given the required params, correctly. Required Params for Get Shipping Prices function include “Email”, “auth_key”,“product_ids” and “country_id”.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
product_ids Yes string Provided by Delicon Team
country_id Yes Integer Provided by Delicon Team

REQUEST

PHP Sample Request


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://delicon.co/testing/api/v2/shipping/get-shipping-pricing',
  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 => 'auth_key=&email=&product_ids=&country_id=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                

RESPONSE

{
    "response": {
        "status": 200,
        "message": "Pricing against Afghanistan",
        "data": {
            "pricing": {
                "959": {
                    "dimentions": [
                        {
                            "dimention_id": 1,
                            "logistic_company_id": 959,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.2125,
                            "shipment_price": "21.250",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 2,
                            "logistic_company_id": 959,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.265,
                            "shipment_price": "26.500",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 3,
                            "logistic_company_id": 959,
                            "shipping_fee": "1.000",
                            "shipment_tax": 2.1375,
                            "shipment_price": "213.750",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 4,
                            "logistic_company_id": 959,
                            "shipping_fee": "1.000",
                            "shipment_tax": 2.1375,
                            "shipment_price": "213.750",
                            "zone": "zone1"
                        }
                    ],
                    "pyment_data": {
                        "shipping_fee": "1.000",
                        "shipping_vat": "1.000",
                        "total_shipping_fee": 4,
                        "total_shipping_tax": 4.7525,
                        "total_shipping_price": 475.25,
                        "net_price": 484.0025,
                        "logistic_company_id": 959,
                        "first_name": "Aramex",
                        "image": "3241088061046137.png"
                    }
                },
                "960": {
                    "dimentions": [
                        {
                            "dimention_id": 1,
                            "logistic_company_id": 960,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.41250000000000003,
                            "shipment_price": "41.250",
                            "zone": "zone3"
                        },
                        {
                            "dimention_id": 2,
                            "logistic_company_id": 960,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.5175,
                            "shipment_price": "51.750",
                            "zone": "zone3"
                        },
                        {
                            "dimention_id": 3,
                            "logistic_company_id": 960,
                            "shipping_fee": "1.000",
                            "shipment_tax": 3.1775,
                            "shipment_price": "317.750",
                            "zone": "zone3"
                        },
                        {
                            "dimention_id": 4,
                            "logistic_company_id": 960,
                            "shipping_fee": "1.000",
                            "shipment_tax": 3.1775,
                            "shipment_price": "317.750",
                            "zone": "zone3"
                        }
                    ],
                    "pyment_data": {
                        "shipping_fee": "1.000",
                        "shipping_vat": "1.000",
                        "total_shipping_fee": 4,
                        "total_shipping_tax": 7.285,
                        "total_shipping_price": 728.5,
                        "net_price": 739.785,
                        "logistic_company_id": 960,
                        "first_name": "UPS",
                        "image": "3241088061046137.png"
                    }
                },
                "1060": {
                    "dimentions": [
                        {
                            "dimention_id": 1,
                            "logistic_company_id": 1060,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.13369999999999999,
                            "shipment_price": "13.370",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 2,
                            "logistic_company_id": 1060,
                            "shipping_fee": "1.000",
                            "shipment_tax": 0.166,
                            "shipment_price": "16.600",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 3,
                            "logistic_company_id": 1060,
                            "shipping_fee": "1.000",
                            "shipment_tax": 1.4723,
                            "shipment_price": "147.230",
                            "zone": "zone1"
                        },
                        {
                            "dimention_id": 4,
                            "logistic_company_id": 1060,
                            "shipping_fee": "1.000",
                            "shipment_tax": 1.4723,
                            "shipment_price": "147.230",
                            "zone": "zone1"
                        }
                    ],
                    "pyment_data": {
                        "shipping_fee": "1.000",
                        "shipping_vat": "1.000",
                        "total_shipping_fee": 4,
                        "total_shipping_tax": 3.2443,
                        "total_shipping_price": 324.42999999999995,
                        "net_price": 331.67429999999996,
                        "logistic_company_id": 1060,
                        "first_name": "DHL",
                        "image": "3241088061046137.png"
                    }
                }
            }
        }
    }
}

             

Shipping Products List

To Get Shipping Products List, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/get-products
Production : https://delicon.co/api/v2/shipping/get-products


DESCRIPTION

Get All Shipping Products List function will fetch all products' data, if you have given the required params, correctly. Required Params for Shipping Products List function include “Email” and “auth_key”.
Note: Shipping Products List will return users' products which they have added on delicon.co

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team

REQUEST

PHP Sample Request

                            $curl = curl_init();

                            curl_setopt_array($curl, array(
                            CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/shipping/get-products',
                            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 => 'auth_key=&email=',
                            CURLOPT_HTTPHEADER => array(
                            'Content-Type: application/x-www-form-urlencoded'
                            ),
                            ));

                            $response = curl_exec($curl);

                            curl_close($curl);
                            echo $response;

                        

RESPONSE

                        {
                            "response": {
                            "status": 200,
                            "message": "Product list found",
                            "data": {
                            "UserProduct": [
                            {
                                "id": "9",
                                "name": "LCD",
                                "description": "Desktop LCD ",
                                "picture": "3345036434083328.png",
                                "length": "150",
                                "width": "45",
                                "height": "4",
                                "weight": "5.4",
                                "size": "",
                                "color": "black",
                                "ship_deliver": "1",
                                "created_by": "677",
                                "created_on": "2021-05-09 05:26:16",
                                "updated_on": "2021-05-09 05:26:16"
                            },
                            {
                                "id": "10",
                                "name": "Laptop",
                                "description": "Dell Laptopssssssss",
                                "picture": "2582522440664637.png",
                                "length": "12.8",
                                "width": "50",
                                "height": "52.5",
                                "weight": "6.72",
                                "size": "",
                                "color": "",
                                "ship_deliver": "0",
                                "created_by": "677",
                                "created_on": "2021-05-09 05:27:12",
                                "updated_on": "2021-05-09 05:27:12"
                            },
                            ]
                        }
                    }
                }



            

Add New Shipping Product

To Add New Shipping Product, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/add-products
Production : https://delicon.co/api/v2/shipping/add-products


DESCRIPTION

Product will be added by using Add New Shipping Product function, if you have given the required params, correctly. Required Params for Shipping Products List function include “Email”, “auth_key” and product dimensionality details.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
name Yes string Provided by User
length Yes Double Provided by User
width Yes Double Provided by User
height Yes Double Provided by User
weight Yes Double Provided by User
picture Yes string Provided by User
description Yes string Provided by User

REQUEST

PHP Sample Request


                        $curl = curl_init();

                        curl_setopt_array($curl, array(
                        CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/shipping/add-products',
                        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 => 'auth_key=&email=&name=&length=&width=&height=&picture=&description=',
                        CURLOPT_HTTPHEADER => array(
                        'Content-Type: application/x-www-form-urlencoded'
                        ),
                        ));

                        $response = curl_exec($curl);

                        curl_close($curl);
                        echo $response;


                        

RESPONSE

                      {
                        "response": {
                            "status": 200,
                            "message": "Product Added Successfully",
                            "data": {
                                "product_data": {
                                    "product_id": "32",
                                    "name": "test",
                                    "weight": "0",
                                    "length": "1",
                                    "width": "1",
                                    "height": "1",
                                    "picture": "1",
                                    "created_on": "2022-05-26 10:56:10"
                                }
                            }
                        }
                    }


            

Create Shipping Order

To Create Shipping Order, you need to make a POST call at the following URL :
Sandbox : https://sandbox.delicon.co/api/v2/shipping/create-order
Production : https://delicon.co/api/v2/shipping/create-order


DESCRIPTION

Shipping order will be added by using Create Shipping Order function, if you have given the required params, correctly. Required Params for Shipping Products List function include “Email”, “auth_key” and receiver's address detail.

QUERY PARAMETERS

Parameter Name Required Type Description
api_key Yes string Provided by Delicon Team
email Yes string Provided by Delicon Team
country_id Yes Integer Provided by User
logistics_company_id Yes Integer Provided by User
reciever_name Yes string Provided by User
receiver_phone Yes number Provided by User
receiver_email Yes string Provided by User
reciever_city Yes string Provided by User
reciever_state Yes string Provided by User
reciever_zip_code Yes number Provided by User
reciever_address_1 Yes string Provided by User
reciever_address_2 No string Provided by User
product_ids Yes string Provided by User

REQUEST

PHP Sample Request


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.delicon.co/api/v2/shipping/create-order',
  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 => 'auth_key=&email=&country_id=&logistics_company_id=&reciever_name=&receiver_phone=&receiver_email=&reciever_city=&reciever_state=&reciever_zip_code=&reciever_address_1=&reciever_address_2=&product_ids=',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;



                        

RESPONSE

{
    "response": {
        "status": 200,
        "message": "Order Successfully Saved",
        "data": {
            "order_id": 114,
            "logistic_company": "Logistics user 1 shipping (Shipping Logi)",
            "order_charges": 484.0025,
            "payment_id": "60b50c476b9ad1622477895",
            "payment_method": "Wallet",
            "tracking_code": "60B50C480319E"
        }
    }
}