Shipping Offers API

This section describes the API method to obtain the list of offers to ship the requested cargo for each request made by the freight owner. The the response will contain the request and the list of offers (if any). Additionally, the freight owner can use this API to accept or decline an offer.

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, the following request will return the list of current and available rate requests from third parties. This list contains the requests that are available for a company to make a competitive offer.

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

On a successful authentication the result will look something like:

				//Example Result
{
"offers": {
"0": {
"index": 22,
"cargoname": "BS6yyEDq",
"status": "Available",
"origin": "Hong Kong",
"destination": "Los Angeles",
"needdate": "2019-02-07 00:00:00",
"notes": "A customer has a need to ship 194.1408 cbm of BS6yyEDq to Los Angeles. The requested arrival date for the cargo is 07 Feb 2019",
"qty": 18,
"packingtype": "Piece",
"measureUnit": "m",
"cargowidth": 2.14,
"cargoheight": 1.5,
"cargolength": 3.36,
"massUnit": "kg",
"weight": 297,
"offer": {
"0": {
"offerId": "22",
"offerAmount": 1689,
"currencyId": 52,
"status": "pending"
},
"1": {
"offerId": "21",
"offerAmount": 1710,
"currencyId": 52,
"status": "pending",
"terms": "Rate Validity:\nRate validity is indicated in this tariff.\nAll rates and surcharges are subject to change without prior notice.",
"rates": {
"Chassis Fee": 10.12,
"Ocean Freight": 195
}
}
}
},
"1": {
"index": 21,
"cargoname": "UIxyAplp",
"status": "Available",
"origin": "Hong Kong",
"destination": "Los Angeles",
"needdate": "2019-02-10 00:00:00",
"notes": "A customer has a need to ship 13.09365 cbm of UIxyAplp to Los Angeles. The requested arrival date for the cargo is 10 Feb 2019",
"qty": 15,
"packingtype": "Pallet",
"measureUnit": "m",
"cargowidth": 5.49,
"cargoheight": 5.3,
"cargolength": 0.03,
"massUnit": "kg",
"weight": 102,
"offer": {}
}
}
}

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

				// Example Request
curl -v -X GET 'https://www.lclxchange.com/api/quote/offer' -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
{
"offers": {
"0": {
"index": 22,
"cargoname": "BS6yyEDq",
"status": "Available",
"origin": "Hong Kong",
"destination": "Los Angeles",
"needdate": "2019-02-07 00:00:00",
"notes": "A customer has a need to ship 194.1408 cbm of BS6yyEDq to Los Angeles. The requested arrival date for the cargo is 07 Feb 2019",
"qty": 18,
"packingtype": "Piece",
"measureUnit": "m",
"cargowidth": 2.14,
"cargoheight": 1.5,
"cargolength": 3.36,
"massUnit": "kg",
"weight": 297,
"offer": {
"0": {
"offerId": "22",
"offerAmount": 148,
"currencyId": 52,
"status": "pending"
},
"1": {
"offerId": "21",
"offerAmount": 145,
"currencyId": 52,
"status": "pending"
}
}
}
}
}

Selecting an Offer for your Rate Request

The offer API allows you to select the best offer to ship your cargo. Once selected you will be provided the selected forwarders information. Likewise they will be provided your information to formalize the transaction.

Warning: You will not be able to determine who made the offer until you have agreed to the selected rate. Once an offer is selected, a representative from the selected forwarder will contact you to formalize the transaction.

				// Example Request
curl -v -X POST 'https://www.lclxchange.com/api/quote/offer' -H "Content-Type: application/json" -H "Authorization: Bearer <access_token>" -d '{ "offerIndex": 21, "approved": 1 }'

On a successful authentication and validated arguments, the result will look something like:

				//Example Result
{
"offers": {
"0": {
"index": 22,
"cargoname": "BS6yyEDq",
"status": "Available",
"origin": "Hong Kong",
"destination": "Los Angeles",
"needdate": "2019-02-07 00:00:00",
"notes": "A customer has a need to ship 194.1408 cbm of BS6yyEDq to Los Angeles. The requested arrival date for the cargo is 07 Feb 2019",
"qty": 18,
"packingtype": "Piece",
"measureUnit": "m",
"cargowidth": 2.14,
"cargoheight": 1.5,
"cargolength": 3.36,
"massUnit": "kg",
"weight": 297,
"offer": {
"offerIndex": "21",
"offerAmount": 145,
"currencyId": 52,
"status": "selected",
"loadingPOC": {
"name": "John Doe",
"email": "j.doe@lclxchange.com"
},
"loadingCompany": {
"name": "BLUESEA SHIPPING LINE, INC.",
"address1": "6103 OBISPO AVENUE",
"city": "LONG BEACH",
"state": "CA",
"postal": "90805",
"country": "UNITED STATES",
"fax": "(310) 324-4440",
"otilicense": "016232"
}
}
}
}
}

An error or invalid credentials will return:

				{
    "Unauthorized": "Access denied."
}
				

API REQUEST DETAILS

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

GET POST Component Description
offerIndex

The index of the offer to respond to

approved

A true or false response. Use 1 for true, 0 for false

index

The index of the target offer to return

offset

The page offset starting at 0

rowsperpage

The number of results to return per page, this value must be included with offset

The URL of the API Services

https://www.lclxchange.com/api/quote/offer

Query Parameters

None

HTTP Request Body

A JSON formatted GET or POST request.