API Docs
Home
Home
Developer GuideAPI
StatusWebhooks
Developer GuideAPI
StatusWebhooks
  1. Order Return
  • Config
    • List Pickup Address
      GET
    • List Box Dimension
      GET
    • List vendor
      GET
    • List store
      GET
  • Online Product
    • Options
      • List category
      • List brand
    • Create Single Product
      POST
    • Create Product From Product Inventory
      POST
    • List product
      GET
    • Product detail
      GET
  • Product Inventory
    • Options
      • List Outbound Strategy
      • List Product Type
      • List Material
      • List Storage Method
    • List product inventory
      GET
    • Product inventory detail
      GET
    • Create single inventory product
      POST
  • Order
    • Shipping Service
      • Preview shipping prices
        • List shipping service
        • List available courier
      • List available courier from order
      • List shipping service of courier
    • Create order B2C
      POST
    • Create order B2B
      POST
    • List order
      GET
    • Order detail
      GET
    • Cancel order
      PATCH
  • Shipment
    • Create shipment auto
      POST
    • [Retail][Ship by self] Create shipment with item
      POST
    • Cancel shipment
      PATCH
    • List shipment
      GET
    • Shipment detail
      GET
    • List shipment of order
      GET
  • Shipment Inbound
    • Create shipment inbound
    • Cancel shipment inbound
    • List shipment inbound
    • Shipment inbound detail
    • Shipment inbound items
  • Order Return
    • List return order
      GET
    • Return order detail
      GET
    • Create return order
      POST
    • Cancel Return Order
      PATCH
  • Courier
    • List courier service integrated
    • List courier operate
    • List courier integrated
  • Address Directory
    • Province
    • District
    • Ward
  1. Order Return

Create return order

POST
/api/v1/public/return-orders/create
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/public/return-orders/create' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_tracking_code": "NHOV1908761573",
    "return_address": {{pickup_id}},
    "reason_type": "wrong_item",
    "reason": "",
    "pickup": {
         "customer_id": null,
        "fullname": "Bùi Thị Hoài Thương",
        "phone": "+84961557476",
        "country": "VN",
        "email": "buithihoaithuong301@gmail.com",
        "address": "Số 9 Trà khúc",
        "zipcode": null,
        "province_id": 79,
        "district_id": 766,
        "ward_id": 26965
    },
    "return_items": [
        {
            "sku": "MUOIXATAC",
            "sale_price": "200000.00",
            "return_quantity": 2

        },
        {
            "sku": "250204067",
            "sale_price": "30700000.00",
            "return_quantity": 1

        }
    ],
    "config": {
        "delivery_service": "SOF_STD"
    },
    "shipping_info": {
        "courier_integration_id": 172,
        "courier_id": 16,
        "shipping_fee": 0,
        "courier_tracking_code": "SPXVN045379876785"
    }
}'
Response Response Example
{"status_code":200,"data":{"order_return_id":350,"return_tracking_code":"NHRV1908266927"},"error":false,"error_code":null,"log_id":null,"messages":"","total":1}

Request

Header Params
Authorization
string 
required
Default:
{{your_api_key_here}}
Body Params application/json
order_tracking_code
string 
required
return_address
integer 
required
reason_type
string 
required
item_missing : Missing item (Thiếu sản phẩm)
item_damaged : Item is damaged (Mặt hàng bị hư hỏng)
wrong_item : Wrong item delivered (Sai mặt hàng)
not_receipt : Item not received (Không nhận được)
warranty : Under warranty/insurance claim (Bảo hiểm)
different_description : Not as described (Mô tả khác)
mutual_agree : Return by mutual agreement (Thỏa thuận)
change_mind : Customer changed mind (Change mind)
expectation_failed : Did not meet expectations (Expectation failed)
item_fake : Counterfeit item (Hàng giả)
physical_dmg : Physical damage (Physical DMG)
functional_dmg : Functional damage (Functional DMG)
other : Other reason (Khác)
reason
string 
optional
pickup
object 
optional
To implement the logic where the customer_id field determines whether the other fields are mandatory or not, you can structure it as follows:
API Request Logic:
If customer_id is provided: Other fields such as fullname, phone, address, zipcode, province_name, district_name, and ward_name are optional.
If customer_id is null: Other fields (fullname, phone, address, zipcode, province_name, district_name, ward_name) are mandatory.
customer_id
integer 
optional
If customer_id is null, the following fields are required
fullname
string 
optional
This must be filled if customer_id is null
phone
string 
optional
This must be filled if customer_id is null
country
string 
optional
This must be filled if customer_id is null
email
string 
optional
This must be filled if customer_id is null
address
string 
optional
This must be filled if customer_id is null
zipcode
null 
optional
This must be filled if customer_id is null
province_id
integer 
required
This must be filled if customer_id is null
district_id
integer 
optional
This must be filled if customer_id is null
ward_id
integer 
optional
This must be filled if customer_id is null
return_items
array [object {5}] 
optional
sku
string 
required
return_quantity
integer 
required
sale_price
string 
optional
product_id
integer 
optional
weight
integer 
optional
config
object 
required
delivery_service
string 
required
shipping_info
object 
optional
courier_integration_id
integer 
optional
ID referring to the courier's integration setup.
courier_id
integer 
optional
ID of the courier used (likely "Tự Vận Chuyển" or Self-shipping).
shipping_fee
integer 
required
courier_tracking_code
string 
required
"SPXVN045379876785" — The tracking number provided by the courier.
Examples

Responses

🟢200OK
application/json
Body
status_code
integer 
optional
data
object 
optional
order_return_id
integer 
optional
return_tracking_code
string 
optional
error
boolean 
optional
error_code
null 
optional
log_id
null 
optional
messages
string 
optional
total
integer 
optional
Previous
Return order detail
Next
Cancel Return Order
Built with