Calculate shipping fee longitude and latitude
POST {{base_url}}/orders/shipping-fee
Description
This API endpoint calculates the shipping fee based on the longitude and latitude coordinates of the buyer's location and the seller's location.
Request
Request Headers:
| Name | Description |
|---|---|
| tenantId | (required, header) The tenant ID associated with the request. |
| countryCode | (required, header) The country code associated with the request. |
Request Body Schema (JSON):
{
"buyerLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
},
"sellerLocations": [
{
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
}
]
}
Request Body Example (XML):
<shippingCalculationRequest>
<buyerLocation>
<latitude>0</latitude>
<longitude>0</longitude>
<address class='preserveHtml' class='preserveHtml' class='preserveHtml'>string</address>
<userId>string</userId>
</buyerLocation>
<sellerLocations>
<sellerLocation>
<latitude>0</latitude>
<longitude>0</longitude>
<address class='preserveHtml' class='preserveHtml' class='preserveHtml'>string</address>
<userId>string</userId>
</sellerLocation>
</sellerLocations>
</shippingCalculationRequest>
Responses:
Status: 200 OK Description: Shipping fee calculation successful.
Response Body Schema (JSON):
{
"status": "boolean",
"statusCode": "integer",
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}
Example:
<shippingCalculationResponse>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data></data>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</shippingCalculationResponse>
LANGUAGE
CURL REQUEST
curl --request POST \
--url /orders/shipping-fee \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!