Get Fee Summary
Calculate the fee breakdown for a shipment.
Endpoint
POST /v1/fee/get
Request
Header Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer YOUR_ACCESS_TOKEN | Bearer access token used for authentication. |
Content-Type | string | Yes | application/json | Request body content type. |
Request Body Schema
application/json
ship_typerequired
string
Shipment type.
Enum: "local" "intl"
Example:
intlshipping_providerrequired
string
Shipping provider code, local or international.
Reference: Get Rates for valid codes.
Example:
fedex_ip_export, sf_expresshk_localsenderrequiredjson-stringSender information.
Sender information.
namerequired
string
Sender full name.
Example:
John Doemobilerequired
string
Mobile number without country prefix.
Example:
91234567mobile_prefixrequired
string
Mobile country calling code.
Example:
+852email
addressrequired
string
Street address.
Minimum 5 characters.
Example:
Unit 12, 3/F, ABC Buildingcountryrequired
string
Country code. Determines whether the shipment is treated as local or international.
Reference: Get Country for full list.
Example:
HKrecipientrequiredjson-stringRecipient information.
Recipient information.
namerequired
string
Recipient full name.
Example:
Hans Muellermobilerequired
string
Mobile number without country prefix.
Example:
98765432mobile_prefixrequired
string
Mobile country calling code.
Example:
+49email
addressrequired
string
Street address.
Note: For local pickup-point quotes, you may append the delivery code using the format
address^delivery_code.Reference: Get Pickup Points for valid
delivery_code values.Minimum 5 characters.
Example (local):
香港九龍牛頭角創業街9號2211室^H852M038PExample (international):
Musterstrasse 123city
string
City name. Used to determine remote area surcharge eligibility.
International shipments only.
Example:
Berlinpost_code
string
Postal or ZIP code. Used to determine remote area surcharge eligibility.
International shipments only.
Example:
10115countryrequired
string
Country code. Determines whether the shipment is treated as local or international.
Reference: Get Country for full list.
Example:
DEshipment_detailrequiredjson-stringShipment and parcel details.
Shipment and parcel details.
package_typerequired
string
Package type identifier.
Enum: "parcel" "document" "pallet" "envelope"
Example:
parcelparcel_listrequiredarrayArray of parcel details. At least one parcel is required.Example: Reference parcel object below
Array of parcel details. At least one parcel is required.
Example: Reference parcel object below
act_weightrequired
string
Actual parcel weight in kg.
Example:
"0.50"height
string
Parcel height in cm.
Example:
"10"width
string
Parcel width in cm.
Example:
"15"length
string
Parcel length in cm.
Example:
"20"declaration_listarrayCustoms declaration items for this parcel.International shipments only — required when ship_type is intl.Example: Reference declaration object below
Customs declaration items for this parcel.
International shipments only — required when
ship_type is intl.Example: Reference declaration object below
descriptionrequired
string
Item description for customs.
Example:
Bluetooth headsetqtyrequired
string
Quantity of items.
Example:
"2"single_pricerequired
string
Declared price per unit.
Example:
"50.00"parcel_itemsarrayItems in this parcel.Local shipments only — used in place of declaration_list when ship_type is local.Example: Reference parcel item object below
Items in this parcel.
Local shipments only — used in place of
declaration_list when ship_type is local.Example: Reference parcel item object below
namerequired
string
Item name.
Example:
Toyqtyrequired
string
Quantity of items.
Example:
"1"single_valuerequired
string
Single item value in HKD.
Example:
"200.00"Example Request Body International
{
"ship_type": "intl",
"shipping_provider": "fedex_ip_export",
"sender": {
"name": "John Doe",
"mobile": "91234567",
"mobile_prefix": "+852",
"email": "johndoe@test.com",
"address": "Unit 1203, 2 Harbour Road",
"country": "HK"
},
"recipient": {
"name": "Hans Mueller",
"mobile": "1512345678",
"mobile_prefix": "+49",
"email": "muller@test.com",
"address": "Musterstrasse 123",
"city": "Berlin",
"post_code": "10115",
"country": "DE"
},
"shipment_detail": {
"package_type": "parcel",
"parcel_list": [
{
"act_weight": "0.50",
"height": "10",
"width": "15",
"length": "20",
"declaration_list": [
{
"description": "Wireless earbuds with charging case",
"qty": "2",
"single_price": "50.00"
}
]
}
]
}
}
Example Request Body Local
{
"ship_type": "local",
"shipping_provider": "sf_expresshk_local",
"sender": {
"name": "Fuuffy Chai",
"mobile": "64105317",
"mobile_prefix": "852",
"email": "cs@fuuffy.com",
"address": "Rm2211, 9 Chong Yip Street, Ngau Tau Kok, Hong Kong"
},
"recipient": {
"name": "小編姐姐",
"mobile": "64105317",
"mobile_prefix": "852",
"email": "cs@fuuffy.com",
"address": "香港九龍牛頭角創業街9號2211室"
},
"shipment_detail": {
"package_type": "parcel",
"parcel_list": [
{
"act_weight": "0.5",
"height": "10",
"width": "14",
"length": "23",
"parcel_items": [
{
"name": "Toy",
"qty": "1",
"single_value": "200.00"
}
]
}
]
}
}
Example request
curl -X POST "${API_URL}/v1/fee/get" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"ship_type": "intl",
"shipping_provider": "fedex_ip_export",
"sender": {
"name": "John Doe",
"mobile": "91234567",
"mobile_prefix": "+852",
"email": "johndoe@test.com",
"address": "Unit 1203, 2 Harbour Road",
"country": "HK"
},
"recipient": {
"name": "Hans Mueller",
"mobile": "1512345678",
"mobile_prefix": "+49",
"email": "muller@test.com",
"address": "Musterstrasse 123",
"city": "Berlin",
"post_code": "10115",
"country": "DE"
},
"shipment_detail": {
"package_type": "parcel",
"parcel_list": [
{
"act_weight": "0.50",
"height": "10",
"width": "15",
"length": "20",
"declaration_list": [
{
"description": "Wireless earbuds",
"qty": "2",
"single_price": "50.00"
}
]
}
]
}
}'
Responses
200 Success
200 Success
Response schema:
application/jsondatajson-stringFee calculation result.
data
json-string
Fee calculation result.
ship_type
string
Detected shipment type.
Example:
intlshipping_provider
string
Shipping provider code used for the calculation.
Example:
fedex_ip_exportcurrency
string
Billing currency. Always
HKD.Example:
HKDtotal_price
string | null
Final total price, after any points/discount deduction.
Example:
"410.00"fee_summaryarrayItemized fee breakdown. Always ends with the total_price item.
fee_summary
array
Itemized fee breakdown. Always ends with the
total_price item.key
string
Machine-readable fee item key.
Example:
cost_price, remote_surcharge_fee, total_pricevalue
string
Amount for this fee item, in
currency.label
json-string
Bilingual label for this fee item.
Example:
{"en":"Shipping Fee","tc":"運費"}Response sample
{
"data": {
"ship_type": "intl",
"shipping_provider": "fedex_ip_export",
"currency": "HKD",
"total_price": "410.00",
"fee_summary": [
{
"key": "cost_price",
"value": "350.00",
"label": {
"en": "Shipping Fee",
"tc": "運費"
}
},
{
"key": "international_processing_fee",
"value": "20.00",
"label": {
"en": "International Processing Fee",
"tc": "國際處理費"
}
},
{
"key": "remote_surcharge_fee",
"value": "40.00",
"label": {
"en": "Remote Surcharge",
"tc": "偏遠附加費"
}
},
{
"key": "total_price",
"value": "410.00",
"label": {
"en": "Total Fee",
"tc": "總價"
}
}
]
}
}
400 Bad Request
400 Bad Request
Response schema:
application/jsonerror.code
string
Error code returned by the API.
Example:
400000error.code_reason
string
Machine-readable error reason.
Example:
BAD_REQUESTerror.message
string
Summary of the error.
Example:
Bad Requesterror.error_tracearrayList of validation or fee-calculation errors.
List of validation or fee-calculation errors.
field
string
Request field that failed, when applicable.
Example:
shipping_providercode
string
Error code for this specific error, when applicable.
Example:
400428message
string
Human-readable explanation for this error.
Example:
shipping_provider is requiredResponse sample — validation error
{
"error": {
"code": "400000",
"code_reason": "BAD_REQUEST",
"message": "Bad Request",
"error_trace": [
{
"field": "shipping_provider",
"message": "shipping_provider is required"
},
{
"field": "shipment_detail",
"message": "shipment_detail is required"
}
]
}
}
Response sample — pickup point / courier mismatch
{
"error": {
"code": "400000",
"code_reason": "BAD_REQUEST",
"message": "Bad Request",
"error_trace": [
{
"field": "shipping_provider",
"code": "400428",
"message": "The recipient address resolves to a pickup point, but the selected shipping_provider does not support pickup point delivery. Please use this courier's pickup-point shipping_provider, or remove the pickup point code from the address."
}
]
}
}
401 Unauthorized
401 Unauthorized
Response schema:
application/jsoncode
string
Error code (e.g. 401000, 401020).
Example:
401000code_reason
string
Machine-readable reason.
Example:
UNAUTHORIZEDmessage
string
Human-readable message.
Example:
UnauthorizedResponse sample
{
"error": {
"code": "401000",
"code_reason": "UNAUTHORIZED",
"message": "Unauthorized"
}
}
403 Forbidden
403 Forbidden
Response schema:
application/jsonerror
json-string
Access forbidden for this resource.
404 Not Found
404 Not Found
Response schema:
application/jsonerror
json-string
Resource or endpoint not found.
500 Failure
500 Failure
Response schema:
application/jsoncode
string
Error code returned by the API.
Example:
500999code_reason
string
Machine-readable error reason.
Example:
API_ERRORmessage
string
Human-readable message.
Example:
Api Error, please contact customer serviceResponse sample
{
"error": {
"code": "500999",
"code_reason": "API_ERROR",
"message": "Api Error, please contact customer service"
}
}