Calculate Shipping Fee
POST /tms/shipping-route
Description
Calculate the shipping fee based on the provided buyer and seller locations' longitude and latitude.
Parameters
- tenantId (
string, header, required): The tenant ID. - countryCode (
string, header, required): The country code.
Request Body
- Media Type:
application/json
Example Value
{
"buyerLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string",
"city": "string"
},
"sellerLocations": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string",
"city": "string"
}
}
Responses
This section outlines the possible responses from the TMS Route API.
Success Response (200)
The Success Response (200) is returned when the shipping fee calculation is successful. This response indicates the success of the operation and provides additional details.
Response Fields
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates the success of the shipping fee calculation. |
| statusCode | integer | Numeric code representing the status of the response (e.g., 0 for success). |
| message | string | A message indicating the outcome of the operation. |
| data | object | Contains the calculated shipping fee details. |
| errors | array | An array of objects providing details about any errors encountered during the request. |
Media Type
application/json: The response is in JSON format.
Example Value
Schema:
{
"status": true,
"statusCode": 0,
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /tms/shipping-route \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!