Skip to main content

Edit Order

Edit an existing order in the system

Edit sales order

HTTP Request

[PUT] /api/v6/sale_orders/{id}

Query Parameters

ParameterTypeDefaultNullableRequireDescription
order_codestringyesOrder code
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
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

custom_fields can be retrieved from API custom fields list

Example

HTTP Request

PUT api/v6/sale_orders/1588 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"account_id": 1,
"order_date": 1701229899,
"discount": 50,
}

Status

200 OK

Response

{
"message": "Successfully updated"
}

Edit purchase order

HTTP Request

[PUT] /api/v6/purchase_orders/{id}

Query Parameters

ParameterTypeDefaultNullableRequireDescription
order_codestringyesOrder code
account_idintegeryesCustomer identifier
account_codestringyesMã khách hàng
account_namestringyesTên khách hàng
account_addressstringyesĐịa chỉ khách hàng
account_emailstringyesEmail khách hàng
account_phoneintegeryesSố điện thoại khách hàng
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
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

custom_fields can be retrieved from API custom fields list

Example

HTTP Request

PUT api/v6/purchase_orders/1588 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"account_id": 1,
"order_date": 1701229899,
"discount": 50,
}

Status

200 OK

Response

{
"message": "Successfully updated"
}