Skip to main content

Calculate Shipping Fee

POST /tms/shipping-params

Description

This endpoint is used to calculate the shipping fee based on the geographical coordinates (longitude and latitude) of the buyer's and seller's locations.

Parameters

  • tenantId (string, header, required): The tenant's unique identifier.
  • countryCode (string, header, required): The country code where the calculation is being made.

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 shipping fee calculation API.

Success Response (200)

The Success Response (200) is returned when the shipping fee is successfully calculated. This response indicates the success of the operation and provides additional details.

Response Fields

FieldTypeDescription
statusbooleanIndicates the success of the shipping fee calculation request.
statusCodeintegerNumeric code representing the status of the response (e.g., 0 for success).
messagestringA message indicating the outcome of the operation.
dataobjectContains the calculated shipping fee details.
errorsarrayAn array of objects providing details about any errors encountered during the request.

Example Value

{
"status": true,
"statusCode": 0,
"message": "shipping fee calculation successful",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /tms/shipping-params \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!