Calculate Fee

API Calculate Fee


This API can help Shop/Merchant get the shipping fee and provide to buyer before create shipping order by

input some information such as Weight,Height,length,width ,to_district_ID, to_ward_code, Service_ID.

Caution : The API Order Info need to infusion token in ShopId header

curl --location --request POST '' \
    --header 'Content-Type: application/json' \
    --header 'Token: 637170d5-942b-11ea-9821-0281a26fb5d4' \
    --header 'ShopId: 885' \
    --header 'Content-Type: text/plain' \
    --data-raw '{
    "coupon": null


Field Type Description
token String

Must be sent with all client requests. This Token helps server to validate request source. Provided by GHN.

shop_id Int

Manage information for shop/seller

service_id Int

Call API SERVICE to show service.
If not input service_type_id

service_type_id Int

Call API SERVICE to show service.

Default value: 1:Express, 2:Standard

If not input service_id.

insurance_value Int

Use to declare parcel value. GHN will base on this value for compensation if any unexpected things happen (lost, broken...).

Maximum 5.000.000

Default value: 0

coupon String

Coupon Code for discount.

from_district_id Int

District ID pick up parcels.Use API Get District

to_ward_code String

Ward Code pick up parcels.Use API Get Ward

to_district_id Int

District ID drop off parcels.Use API Get District

weight Int

Weight (gram)

length Int

Length (cm)

width Int

width (cm)

height Int

height (cm)

        "code": 200,
        "message": "Success",

Structure Response

Field Description

Total service


Service fee


Insurance fee


Pickup fee at Station


Coupon Code for discount


Fee of delivery parcel again

        "code": 400,
        "message": "code=400, message=Syntax error: offset=30, error=invalid character '}' after array element, internal=invalid character '}' after array element",
        "data": null
        "code_message": "USER_ERR_COMMON"