Skip to main content

Add New

Add new order

Add new sales order

HTTP Request

[POST] /api/v6/sale_orders

Body Parameters

ParameterTypeDefaultNullableRequireDescription
account_idintegeryesCustomer identifier
account_codestringyesCustomer code
account_namestringyesCustomer name
account_addressstringyesCustomer address
account_emailstringyesCustomer email
account_phoneintegeryesCustomer phone number
order_datetimestampyesOrder date
discountnumericDiscount percentage
discount_amountnumericDiscount amount
vatnumericVAT percentage
vat_amountnumericVAT amount
transportnumericShipping fee percentage
transport_amountnumericShipping fee amount
installationnumericInstallation fee percentage
installation_amountnumericInstallation fee amount
src_idintegerSource identifier
assigned_userintegerOrder executor
saved_order_detailsarrayyesProduct list
saved_order_details.*.idintegeryesProduct identifier in order
saved_order_details.*.product_idintegeryesProduct identifier
saved_order_details.*.pricenumericyesProduct price
saved_order_details.*.quantityintegeryesProduct quantity
saved_order_details.*.product_sale_offnumericyesProduct discount
saved_order_details.*.cash_discountnumericyesCash discount
saved_order_details.*.notestringyesProduct description
order_termsarrayyesOrder terms
order_terms.*.idintegeryesTerm identifier
order_terms.*.term_contentstringyesTerm content
custom_fieldsobjectyesData definition

Example

HTTP Request

POST api/v6/sale_orders HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"account_id": 1,
"order_date": 1701229899,
"saved_order_details": [
{
"product_id": 1,
"quantity": 1,
"price": 100
}
]
}

Status

200 OK

Response

{
"message": "Successfully added",
"id": 4
}

Add new purchase order

HTTP Request

[POST] /api/v6/purchase_orders

Body Parameters

ParameterTypeDefaultNullableRequireDescription
account_idintegeryesCustomer identifier
account_codestringyesCustomer code
account_namestringyesCustomer name
account_addressstringyesCustomer address
account_emailstringyesEmail khách hàng
account_phoneintegeryesCustomer phone number
order_datetimestampyesOrder date
discountnumericDiscount percentage
discount_amountnumericDiscount amount
vatnumericVAT percentage
vat_amountnumericVAT amount
transportnumericShipping fee percentage
transport_amountnumericShipping fee amount
installationnumericInstallation fee percentage
installation_amountnumericInstallation fee amount
src_idintegerSource identifier
saved_order_detailsarrayyesProduct list
saved_order_details.*.idintegeryesProduct identifier in order
saved_order_details.*.product_idintegeryesProduct identifier
saved_order_details.*.pricenumericyesProduct price
saved_order_details.*.quantityintegeryesProduct quantity
saved_order_details.*.product_sale_offnumericyesProduct discount
saved_order_details.*.cash_discountnumericyesCash discount
saved_order_details.*.notestringyesProduct description
order_termsarrayyesOrder terms
order_terms.*.idintegeryesTerm identifier
order_terms.*.term_contentstringyesTerm content
custom_fieldsobjectyesData definition

Example

HTTP Request

POST api/v6/purchase_orders HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"account_id": 1,
"order_date": 1701229899,
"saved_order_details": [
{
"product_id": 1,
"quantity": 1,
"price": 100
}
]
}

Status

200 OK

Response

{
"message": "Thêm mới thành công",
"id": 4
}