search_order
POST /search_order
The call can be used for simple search in fields using the logical operator OR
To get the TOTAL COUNT of list of orders for the search criteria.
Use this method with only_counted = 'Y' FIRST to determine how many total records there are for the given criteria.
After you call this method with only_counted = 'Y', then call again this method with only_counted = 'N', and pass the required paging parameters.
{
"api_credentials": {
"token": "XXXX"
},
"search_option": {
"only_counted": "Y",
"expression_searched": "Joe",
"search_operator_type": "Contains",
"search_in_fields": "CustomerName, DeliveryCustomerName",
"order_type": "all"
}
}
To get a list of orders for the search criteria.
{
"api_credentials": {
"token": "XXXX"
},
"search_option": {
"only_counted": "N",
"page_number": 1,
"page_size": 100,
"expression_searched": "Joe",
"search_operator_type": "Contains",
"search_in_fields": "CustomerName, DeliveryCustomerName",
"order_type": "all"
}
}
| field |
type |
description |
|
api_credentials
|
| token |
string |
Credentials provided by Powersoft that allow access to the API |
|
search_option
|
| only_counted |
string |
'Y' = brings only the total of orders found based on user search criteria. 'N' = brings the list of the orders found based on user search criteria |
| page_number |
integer |
The page number in the entire list. eg Page 1. |
| page_size |
integer |
The number of rows to return. eg 10 rows |
| expression_searched |
string |
Expression searched. Required. Minimum 3 characters needs to be provided. |
| search_operator_type |
string |
Search operator type. Required. Allowed values are 'StartsWith', 'Contains', 'Equals', 'EndsWith'. |
| search_in_fields |
string |
A comma separated list of fields to be searched for the expression. Required. For each element in the list allowed values are 'OrderNumber', 'ShoppingCartCode', 'StoreCode', 'CustomerCode', 'CustomerName', 'CustomerShortName', 'CustomerPhones', 'CustomerEmail', 'CustomerWebsite', 'CustomerAdress', 'DeliveryCustomerName', 'DeliveryCustomerEmail', 'DeliveryOrderAddress'. |
| order_type |
string |
'pending' = Search only in the pending orders. 'completed' = Search only in the completed items. 'cancelled'= search only in cancelled orders. 'partialcompleted'= search only in partial completed orders. 'all' = search in all orders |