List
Get order list
Sales order list
>HTTP Request
[GET] /api/v6/sale_orders
Query Parameters
Fields
| Fields | Type | Description |
|:---------------------------------|-:----------|:---------------------------------------------------------|
| id | integer | Identifier |
| order_code | string | Order code |
| real_amount | numeric | Total order amount |
| f_amount | numeric | Total paid amount |
| discount | numeric | Discount percentage |
| discount_amount | numeric | Discount amount |
| vat_amount | numeric | VAT amount |
| account_id | integer | Customer identifier |
| account_code | string | Customer code |
| account_email | string | Customer email |
| account_phone | numeric | Customer phone number |
| account_address | string | Customer address |
| contact_name | string | Contact name |
| contact_phone | string | Contact phone number |
| contact_email | string | Contact email |
| order_date | string | Order date in (Y-m-d) format |
| created_at | string | Creation date in (Y-m-d H:i:s) format |
| updated_at | string | Modification date in (Y-m-d H:i:s) format |
| status | integer | Status |
| status_label | string | Status name |
| store_id | integer | Warehouse identifier |
| assigned_user | integer | Order executor |
| assigned_user_name | string | Executor name |
| payment_status | string | Payment status (must also pass has_pay_off) |
| order_details | array | Product information in the order |
| order_details..product_id | integer | Product identifier |
| order_details..product_code | string | Product code |
| order_details..product_name | string | Product name |
| order_details..note | string | Product description |
| order_details..product_sale_off | numeric | Product discount |
| order_details..cash_discount | numeric | Cash discount |
| order_details..price | numeric | Product price |
| order_details..quantity | numeric | Product quantity |
| order_details..vat | numeric | Product VAT (%) |
| order_details..vat_amount | numeric | Product VAT (cash) |\
Filtering
| Fields | Support | Type | Description |
|:-----------|:-------------------|:---------:|:--------------|
| id | eq,in | integer | Identifier |
| order_date | gte,lte,eq,between | timestamp | Order date |
| created_at | eq,gte,lte | timestamp | Order creation date |
| updated_at | eq,gte,lte | timestamp | Order modification date |\
Sort
| Sort (field) | Direction |
|:-------------|-----------|
| id | asc,desc |
| order_date | asc,desc |\
Limit & Offset
| | Type | Description |
|:-------|---------|--------------------------|
| Limit | integer | Number of records to retrieve |
| Offset | integer | Number of records to skip |\
Example
HTTP Request
GET api/v6/sale_orders?fields=order_code&limit=1&offset=1&filtering[id]=4 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
Status
200 OK
Response
{
"data": [
{
"id": 5,
"order_code": "DH1588"
}
],
"has_more": false,
"offset": 1,
"limited": 1
}
Purchase order list
HTTP Request
[GET] /api/v6/purchase_orders
Query Parameters
Fields
| Fields | Type | Description |
|:---------------------------------|-:----------|:---------------------------------------------------------|
| id | integer | Identifier |
| order_code | string | Order code |
| real_amount | numeric | Total order amount |
| f_amount | numeric | Total paid amount |
| discount | numeric | Discount percentage |
| discount_amount | numeric | Discount amount |
| vat_amount | numeric | VAT amount |
| account_id | integer | Customer identifier |
| account_code | string | Customer code |
| account_email | string | Customer email |
| account_phone | numeric | Customer phone number |
| account_address | string | Customer address |
| contact_name | string | Contact name |
| contact_phone | string | Contact phone number |
| contact_email | string | Contact email |
| order_date | timestamp | Order date |
| created_at | timestamp | Creation date |
| updated_at | timestamp | Modification date |
| status | integer | Status |
| assigned_user | integer | Order executor |
| assigned_user_name | string | Executor name |
| payment_status | string | Payment status (must also pass has_pay_off) |
| order_details | array | Product information in the order |
| order_details..product_id | integer | Product identifier |
| order_details..product_code | string | Product code |
| order_details..product_name | string | Product name |
| order_details..note | string | Product description |
| order_details..product_sale_off | numeric | Product discount |
| order_details..cash_discount | numeric | Cash discount |
| order_details..price | numeric | Product price |
| order_details..quantity | numeric | Product quantity |
| order_details..vat | numeric | Product VAT (%) |
| order_details..vat_amount | numeric | Product VAT (cash) |
| custom_fields | object | Data definition |\
Filtering
| Fields | Support | Type | Description |
|:-----------|:-------------------|:---------:|:--------------|
| id | eq,in | integer | Identifier |
| order_date | gte,lte,eq,between | timestamp | Order date |
| created_at | eq,gte,lte | timestamp | Order creation date |
| updated_at | eq,gte,lte | timestamp | Order modification date |\
Sort
| Sort (field) | Direction |
|:-------------|-----------|
| id | asc,desc |
| order_date | asc,desc |\
Limit & Offset
| | Type | Description |
|:-------|---------|--------------------------|
| Limit | integer | Number of records to retrieve |
| Offset | integer | Number of records to skip |\
Example
HTTP Request
GET api/v6/purchase_orders?fields=order_code&limit=1&offset=1&filtering[id]=4 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
Status
200 OK
Response
{
"data": [
{
"id": 4,
"order_code": "DH1588"
}
],
"has_more": false,
"offset": 0,
"limited": 1
}