Skip to main content

Sales Order List

1. API Information

  • Endpoint: /api/v6.1/sale_orders
  • Method: GET
  • Authentication: Requires X-API-KEY
  • Header:
    • X-API-KEY: <your_api_key>

2. Request Parameters

2.1. Filtering

FieldSupportData TypeDescription
ideq, inintegerFilter by order ID
order_dategte, lte, eq, betweentimestampFilter by order date
created_ateq, gte, ltetimestampFilter by order creation date
updated_ateq, gte, ltetimestampFilter by order modification date

2.2. Sorting

FieldDirection
idasc, desc
order_dateasc, desc

2.3. Pagination

ParameterData TypeDescription
limitintegerNumber of records to retrieve
offsetintegerNumber of records to skip

3. Sample Response

{
"data": [
{
"id": 1,
"order_code": "DH_XXXXX",
"real_amount": 83706.5,
"f_amount": 0,
"discount": 10,
"discount_amount": 6435,
"vat_amount": 5791.5,
"account_id": 12033,
"account_code": "KH/2025/xxxxx",
"account_email": "[email protected]",
"account_phone": "0877200xxxx",
"account_address": "xxxxx - xxxxxx - xxxxx",
"order_date": "2025-03-12",
"created_at": "2025-03-12 08:53:00",
"updated_at": "2025-03-12 08:53:00",
"status": 1,
"assigned_user": 2,
"assigned_user_name": "Nguyen Van A",
"safebook_synchronized": 0,
"contact_name": "Nguyen Van A",
"contact_phone": "0877200XXXX",
"contact_email": "[email protected]",
"store_id": 2,
"lading_code": "BE.01921.1282",
"lading_status": "",
"has_pay_off": 0,
"custom_fields": {
"send_order_confirmation_message": 6,
"so_ne": "0",
"chu_ne": "Demo"
},
"order_details": [
{
"id": 286,
"product_id": 2507,
"product_code": "SP2507",
"product_name": "GF SP Wholesale + Retail Price",
"note": "Fragile product",
"unit_id": 14,
"services": 0,
"unit_name": "Service",
"quantity": 1,
"price": 65000,
"product_sale_off": 1,
"cash_discount": 650,
"vat": 0,
"vat_amount": 0,
"amount": 64350,
"origin_amount": 65000,
"product_avatar": "https://xxxx.getflycrm.com/assets/images/common/no_image.png"
}
],
"tracking_url": "",
"lading_status_title": "",
"payment_status": "Unpaid",
"status_label": "Pending Approval",
"lading_info": {
"status": "",
"tracking_url": ""
}
}
],
"has_more": true,
"offset": 0,
"limited": 1,
"sorted": { "id": "DESC" }
}

4. Data Field Descriptions

4.1. Order Information

FieldData TypeDescription
idintegerOrder ID
order_codestringOrder code
real_amountfloatTotal amount after discount
discountfloatDiscount percentage
vat_amountfloatVAT amount
order_datetimestampOrder date
statusintegerOrder status
status_labelstringStatus label
payment_statusstringPayment status
lading_codestringBill of lading code
lading_status_titlestringBill of lading status
tracking_urlstringBill of lading tracking URL

4.2. Customer Information

FieldData TypeDescription
account_idintegerCustomer ID
account_codestringCustomer code
account_emailstringCustomer email
account_phonestringCustomer phone number
account_addressstringCustomer address

4.3. Product Details

FieldData TypeDescription
product_idintegerProduct ID
product_codestringProduct code
product_namestringProduct name
quantityintegerQuantity
pricefloatProduct price
amountfloatTotal amount

5. Notes

  • The custom_fields field contains custom order data.
  • For advanced data filtering, you can combine filtering, sorting, limit, and offset parameters.