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
| Field | Support | Data Type | Description |
|---|---|---|---|
id | eq, in | integer | Filter by order ID |
order_date | gte, lte, eq, between | timestamp | Filter by order date |
created_at | eq, gte, lte | timestamp | Filter by order creation date |
updated_at | eq, gte, lte | timestamp | Filter by order modification date |
2.2. Sorting
| Field | Direction |
|---|---|
id | asc, desc |
order_date | asc, desc |
2.3. Pagination
| Parameter | Data Type | Description |
|---|---|---|
limit | integer | Number of records to retrieve |
offset | integer | Number 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
| Field | Data Type | Description |
|---|---|---|
id | integer | Order ID |
order_code | string | Order code |
real_amount | float | Total amount after discount |
discount | float | Discount percentage |
vat_amount | float | VAT amount |
order_date | timestamp | Order date |
status | integer | Order status |
status_label | string | Status label |
payment_status | string | Payment status |
lading_code | string | Bill of lading code |
lading_status_title | string | Bill of lading status |
tracking_url | string | Bill of lading tracking URL |
4.2. Customer Information
| Field | Data Type | Description |
|---|---|---|
account_id | integer | Customer ID |
account_code | string | Customer code |
account_email | string | Customer email |
account_phone | string | Customer phone number |
account_address | string | Customer address |
4.3. Product Details
| Field | Data Type | Description |
|---|---|---|
product_id | integer | Product ID |
product_code | string | Product code |
product_name | string | Product name |
quantity | integer | Quantity |
price | float | Product price |
amount | float | Total amount |
5. Notes
- The
custom_fieldsfield contains custom order data. - For advanced data filtering, you can combine filtering, sorting, limit, and offset parameters.