Http Method | Resource | Description |
---|---|---|
POST | /Order_search |
Searches for orders performing full text search. The search is configured by providing a search phrase and search fields (optional). If search fields are not provided, the default ones are used (order_no). The search retrieves orders having each one word of the search phrase in any of the search fields. Additionally the retrieved orders could be limited by "query" and "query_args" parameters. Note that full text order search always uses Search Service and the following limitations exist:
The supported search fields are:
The sort order of the retrieved orders could be specified by the "sort_fields" parameter. It is a list of objects presenting field name (mandatory) and sort direction ("asc" or "desc"). Custom attributes could be used as "search_fields" and as "sort_fields" too. A prefix "c_" has to be added to them. |
Searches for orders performing full text search.
The search is configured by providing a search phrase and search fields (optional). If search fields are not provided, the default ones are used (order_no). The search retrieves orders having each one word of the search phrase in any of the search fields.
Additionally the retrieved orders could be limited by "query" and "query_args" parameters.
Note that full text order search always uses Search Service and the following limitations exist:
The supported search fields are:
The sort order of the retrieved orders could be specified by the "sort_fields" parameter. It is a list of objects presenting field name (mandatory) and sort direction ("asc" or "desc").
Custom attributes could be used as "search_fields" and as "sort_fields" too. A prefix "c_" has to be added to them.
Url
POST https://hostname:port/dw/shop/v15_9/order_search
Formats
json, xml
Authentication
Name | Description |
---|---|
JWT | Authentication via Customer JWT token. |
OAuth | Authentication via OAuth token. |
Request Document
Response Document
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
OrderSearchIndexingDisabledException
|
Thrown when Incremental Indexing is not enabled for Order search schema. |
Sample
REQUEST:
POST /dw/shop/v15_9/order_search HTTP/1.1
Host: example.com
Accept: application/json
{
sort_fields : [
{
field_name:"customer_name",
sort_dir : "ASC"
}],
search_phrase : "[email protected]",
search_fields : ["customer_email" ],
select : "(**)"
}
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
"_v" : "15.9",
"_type" : "order_search_result",
"count" : 1,
"hits" :
[
{
"_type" : "order_search_hit",
"data" :
{
"_type" : "order",
"adjusted_merchandize_total_tax" : 3.75,
"adjusted_shipping_total_tax" : 0.00,
"billing_address" :
{
"_type" : "order_address",
"city" : "Boston",
"country_code" : "US",
"first_name" : "Jane",
"full_name" : "Jane Doe",
"last_name" : "Doe",
"postal_code" : "29199"
},
"channel_type" : "callcenter",
...
"c_created_by" : "testAgent"
},
"relevance" : 2.822207450866699
}
],
"select" : "(**)",
"start" : 0,
"total" : 1
}