Skip to main content

Calculate Shipping Fee V2

POST /orders/v2/shippingFee

Description​

Calculate Shipping fee based on longitude, latitude, and weight.

Parameters​

  • tenantId (string, header, required): The ID of the tenant.
  • 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"
},
"items": [
{
"sellerLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string",
"city": "string"
},
"itemWeight": 0,
"weightUnitOfMeasurement": "string"
}
],
"userId": "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 calculation is successful. 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​

JSON:

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

Headers​

Content-TypeValue
apiKey{{apiKey}}

🔑 Authentication bearer​

ParamvalueType
token{{accessCode}}string

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /orders/v2/shippingFee \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


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