Cancel Order

API Cancel Order

 

Cancel a shipping order from GHN.

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

post/get
https://online-gateway.ghn.vn/shiip/public-api/v2/switch-status/cancel
https://dev-online-gateway.ghn.vn/shiip/public-api/v2/switch-status/cancel
curl --location --request POST 'https://dev-online-gateway.ghn.vn/shiip/public-api/v2/switch-status/cancel' \
--header 'Content-Type: application/json' \
--header 'ShopId: 885' \
--header 'Token: 637170d5-942b-11ea-9821-0281a26fb5d4' \
--data-raw '{"order_codes":["5E3NK3RS"]}'


Parameter

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

order_codes String

GHN Order Code. This is tracking code.

{
    "code": 200,
    "message": "Success",
    "data":[
    {
    "order_code":"5E3NK3RS"  
    "result":true 
    "message":"OK" 
}
]
}

Structure Response

Field Description
order_code

Code order

result

Result

message

Message

{
    "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"
}