Carrier API

This section describes the API method to obtain the details of a carrier or the list of all carriers. The carrier list is typically only retrieved once, stored internally to your application for use.

Note: The sample requests contained in this document are for reference only. You will not be able to run the examples as is. Please construct your requests based on your authorization token and data requests with your own data values.

Generating the Request

As an example, request the following request will return the list of carriers.

				// Example Request
curl -v -X GET 'https://www.lclxchange.com/api/carrier' -H "Content-Type: application/json" -H "Authorization: Bearer <access_token>"

On a successful authentication the result will look something like:

				//Example Result
{
"carriers": {
"0": {
"index": 1,
"name": "A.P. Moller-Maersk Group"
},
"1": {
"index": 4,
"name": "China COSCO Shipping"
},
"2": {
"index": 3,
"name": "CMA CGM"
},
"3": {
"index": 5,
"name": "Evergreen Marine"
},
"4": {
"index": 8,
"name": "Hamburg Sud"
},
"5": {
"index": 6,
"name": "Hapag-Lloyd"
},
"6": {
"index": 13,
"name": "Hyundai Merchant Marine"
},
"7": {
"index": 14,
"name": "K Line"
}
}

As another example, the request specifying an index will return one carrier result.

				// Example Request
curl -v -X GET 'https://www.lclxchange.com/api/carrier' -H "Content-Type: application/json" -H "Authorization: Bearer <access_token>" -d '{ "index" : "<index_value>" }'

On a successful authentication the result will look something like:

				//Example Result
{
"carriers": {
"0": {
"index": 1,
"name": "A.P. Moller-Maersk Group"
}
}
}

An error or invalid credentials will return:

				{
    "Unauthorized": "Access denied."
}
				

API REQUEST DETAILS

This section provides information about what is required to generate a carrier API Request. These fields populate the JSON request.

Component Description
index

The index of the carrier

The URL of the API Services

https://www.lclxchange.com/api/carrier

Query Parameters

None

HTTP Request Body

A JSON formatted POST request.