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
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates the success of the shipping fee calculation request. |
| 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. |
Example
JSON:
{
"status": true,
"statusCode": 0,
"message": "shipping fee calculation successful",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
🔑 Authentication bearer
| Param | value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
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!