Get started

    API Endpoint

    https://www.karton.express/wp-json/kte-parcels/v1/
                

The Karton Express API provides programmatic access to read shipping data. Retrieve shipment rates and track parcels etc.

Authentication


# Request Header
content-type: application/json
x-kte-apikey: YOUR_API_KEY
                

# Here is a curl example
curl \
-X GET https://www.karton.express/wp-json/kte-parcels/v1/
-H 'content-type=application/json' \
-H 'x-kte-apikey=YOUR_API_KEY'
                

The Karton Express API uses API Key to authenticate requests.

How to get API Key?

To use this API, you need an API key. Register and login here OR contact us at [email protected] to get your own API key.

After you get your API Key, be sure to keep them secure! Do not share your secret API Keys in publicly accessible area such as Github, client-side code, and so forth.

API REQUESTS

All requests to the API can be sent over HTTPS only.

Header

All API calls must include the x-kte-apikey header in order to authenticate the usage of Karton Express API. Replace YOUR_API_KEY with your API Key.

Content-Type for all calls should be application/json. The charset parameter provided in Content-Type header is by default set to UTF-8, it DOES NOT support any other encodings such like ISO-8859-1.



get rates


# Here is a curl example
curl \
-X GET https://www.karton.express/wp-json/kte-parcels/v1/quote \
-F 'secret_key=your_api_key' \
-F 'country=TH'
-F 'state=TH-10'
-F 'city=Bangkapi'
-F 'postal=10240'
-F 'weight=0.5'
-F 'width=5.25'
-F 'depth=5.15'
-F 'length=10.15'
-F 'value=100'
                

To get rates you need to make a GET call to the following url :
https://www.karton.express/wp-json/kte-parcels/v1/quote



Result example :

{
  code: 200,
  message: "Request response is successful.",
  data: [
    {
      id: 3846,
      p_id: 9,
      name: "Express (DAP)",
      company: "DHL",
      code: "EXPD0-EWNDAP",
      img_url: "https://www.karton.express/img/dhl.jpg",
      price: 9.88,
      delivery: {
        min: 1,
        max: 5
      }
    },
    {
      id: 3856,
      p_id: 12,
      name: "ABC (DAP)",
      company: "FEDEX",
      code: "ABCD0-FEDEXDAP",
      img_url: "https://www.karton.express/img/fedex.jpg",
      price: 11.10,
      delivery: {
        min: 1,
        max: 3
      }
    },
  ]
}
                

QUERY PARAMETERS

Field Type Description
country String ISO 3166-1 country code.
state String ISO 3166-2 state codes.
city String City name
zip String (optional) ISO Zip code of city
weight Float Parcel weight in Kilogram (Kg).
width Float Parcel width in Centimters (cm).
depth Float Parcel depth in Centimters (cm).
length Float Parcel length in Centimters (cm).
value Integer (optional - default: 0) Parcel value in Thailand baht "THB".

track parcel


# Here is a curl example
curl \
-X GET https://www.karton.express/wp-json/kte-parcels/v1/track \
-F 'secret_key=your_api_key' \
-F 'tracking_number=7745842976'
                

To track parcel you need to make a GET call to the following url :
https://www.karton.express/wp-json/kte-parcels/v1/track



Result example :

{
  code: 200,
  message: "Request response is successful.",
  data: [
    {
      "event_date": "2022-08-11 14:45:00",
      "event_location": "OR YEHUDA,IL",
      "event_detail": "Delivered"
    },
    {
      "event_date": "2022-08-11 04:18:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "In transit Tendered to authorized agent for final delivery"
    },
    {
      "event_date": "2022-08-10 16:53:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "In transit Tendered to authorized agent for final delivery"
    },
    {
      "event_date": "2022-08-10 10:36:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "At local FedEx facility"
    },
    {
      "event_date": "2022-08-10 10:33:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "In transit Tendered to authorized agent for final delivery"
    },
    {
      "event_date": "2022-08-10 10:30:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "Delay Future delivery requested."
    },
    {
      "event_date": "2022-08-10 07:51:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "At local FedEx facility"
    },
    {
      "event_date": "2022-08-10 06:06:00",
      "event_location": "NEMAL TEHUFA BEN GURION,IL",
      "event_detail": "At destination sort facility"
    },
    {
      "event_date": "2022-08-10 01:39:00",
      "event_location": "KOELN,DE",
      "event_detail": "In transit"
    },
    {
      "event_date": "2022-08-10 01:08:00",
      "event_location": "KOELN,DE",
      "event_detail": "Departed FedEx hub"
    },
    {
      "event_date": "2022-08-09 18:43:00",
      "event_location": "KOELN,DE",
      "event_detail": "In transit"
    },
    {
      "event_date": "2022-08-09 11:37:00",
      "event_location": "KOELN,DE",
      "event_detail": "Arrived at FedEx hub"
    },
    {
      "event_date": "2022-08-09 05:01:00",
      "event_location": "GUANGZHOU,CN",
      "event_detail": "Departed FedEx hub"
    },
    {
      "event_date": "2022-08-09 04:55:00",
      "event_location": "GUANGZHOU,CN",
      "event_detail": "In transit"
    },
    {
      "event_date": "2022-08-09 01:03:00",
      "event_location": "GUANGZHOU,CN",
      "event_detail": "Arrived at FedEx hub"
    },
    {
      "event_date": "2022-08-08 21:09:00",
      "event_location": "SAMUTPRAKARN,TH",
      "event_detail": "In transit"
    },
    {
      "event_date": "2022-08-05 21:39:00",
      "event_location": "SAMUTPRAKARN,TH",
      "event_detail": "At local FedEx facility"
    },
    {
      "event_date": "2022-08-05 20:59:00",
      "event_location": "SAMUTPRAKARN,TH",
      "event_detail": "Clearance in progress"
    },
    {
      "event_date": "2022-08-05 19:05:00",
      "event_location": "SAMUTPRAKARN,TH",
      "event_detail": "Left FedEx origin facility"
    },
    {
      "event_date": "2022-08-05 13:30:00",
      "event_location": "SAMUTPRAKARN,TH",
      "event_detail": "Picked up"
    },
    {
      "event_date": "2022-08-04 04:31:05",
      "event_location": null,
      "event_detail": "Shipment information sent to FedEx"
    },
    {
      "event_date": "22-06-11 06:08:20",
      "event_detail": "Order status changed from Pending payment to Processing."
    },
    {
      "event_date": "22-06-11 06:08:16",
      "event_detail": "Order#4069 was created."
    }
  ]
}
                

QUERY PARAMETERS

Field Type Description
tracking_number String tracking code received after shipment booked.