API: Sale Orders
Table of Contents
The ERP API Sale Order endpoint provides a list of sale orders and their associated information from the Enapps ERP system. As standard, this method returns 100 records per page. It is recommended that this API method is called in real-time for logged in customers when they access their orders page. This, should be used in conjunction with Sale Order Lines API below.
Base URL |
https://<server>:<port>/api/v1 |
Endpoint | /orders |
Method | GET |
Retrieve Sale Orders
Request parameters | |||
Name | Type |
Required |
Description |
_id | integer |
No |
ID of a specific Sale Order to obtain only 1 Sale Order record. |
partner_id | integer |
No |
ID of a partner obtained from Partners API response. |
create_date | date_time |
No |
Filter records created from the specified date and later (%Y-%m-%d %H:%M:%S) |
page | integer |
No |
Optional pagination parameter. |
additional_fields | array/list | No |
Provide field names of additional fields not part of the standard Endpoint. For more information please refer to Additional Fields |
Response parameters | ||
Name | Type |
Description |
id | integer |
Sale Order unique ID |
name | string |
Sale Order unique name generated by the ERP system |
client_order_ref | string |
Customer PO Number/unique e-order reference |
delivery_address_id | integer |
ID of the address for delivery purposes |
state | string |
The state of the Sale Order |
amount_total | numeric |
Grand total |
amount_tax | numeric |
The sum of all taxes |
amount_untaxed | numeric |
The amount before taxes |
date_order | date_time |
The date of the Sale Order (%Y-%M-%D) |
partner_id | array |
Partner unique ID and the Name |
shop_id | array |
Shop unique ID and it's Name |
partner_shipping_id | array |
Delivery Contact ID |
partner_order_id | array |
Ordering Contact ID |
create_date | date_time |
Sale Order creation date (%Y-%M-%D %H:%M:%S) |
order_line | array |
IDs of Order Lines |
currency | string |
Sale Order currency |
Examples | |
HTTP |
GET /api/v1/orders/ HTTP/1.1 Host: company.erp.zone:4095 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTg5OTc5NTYsInQiOiJhY2Nlc3MiLCJsIjoid29vY29tbWVyY2VhcGkiLCJkYiI6InByb2R1Y3Rpb25fZGV2In0.kLQG7QIIxBdXCp9H9wiEf5YeQxwwecq55hoiJ64KIFM Cookie: sessionid=9412fbdf30a858b69a990bffba84c1640ebf2a16 |
Retrieve Sale Order Lines data
The ERP API's Sale Order Lines endpoint provides a list of sale order lines and their associated information from the Enapps ERP system. By default, this method returns 100 records per page. It is recommended to call this API method in real-time for logged-in customers when they access their orders page and intend to view detailed Sale Order information. This should be used in conjunction with the Sale Order API.
Endpoint | /order_lines |
Method | GET |
Request parameters | |||
Name | Type |
Required |
Description |
order_id | integer |
Yes |
ID of a specific sale order to obtain all order lines |
page | integer |
No |
Optional pagination parameter. |
additional_fields | array/list | No |
Provide field names of additional fields not part of the standard Endpoint. For more information please refer to Additional Fields |
Response parameters | ||
Name | Type |
Description |
id | integer |
Order Line unique ID |
order_id | array |
Sale Order unique ID and it's Name |
product_id | array |
Product unique ID and it's Name |
name | string |
Product full name |
product_option_codes | string |
Product code |
product_uom_qty | numeric |
Total product amount |
price_unit | numeric |
Sale price |
parameters | array |
An array representing product parameters. Structure: - Option Type Name Example: "parameters": [ [ 28, "DarkGolden" ], [ 29, "DarkSlateBlue" ] ] |
Examples | |
HTTP | GET /api/v1/order_lines/ HTTP/1.1 Host: company.erp.zone:4095 order_id: 636634 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyiOjE2OTg5OTc5NTYsInQiOiJhY2Nlc3MiLCJsIjoid29vY29tbWVyY2VhcGkiLCJkYiI6InByb2R1Y3Rpb25fZGV2In0.kLQG7QIIxBdXCp9H9wiEf5YeQxwwecq55hoiJ64KIFM |