InventoryListSearch resource (Data API 20.9)

Summary

Http Method Resource Description
POST /inventory_list_search

Searches for inventory lists.

The query attribute specifies a complex query that can be used to narrow down the search. This is the list of searchable attributes:

  • id - String
  • default_in_stock - boolean
  • description - String
  • on_order_inventory_enabled - boolean
  • status - one of {"normal","delete"}
  • use_bundle_inventory_only - boolean

Search Inventory Lists

Searches for inventory lists.

The query attribute specifies a complex query that can be used to narrow down the search. This is the list of searchable attributes:

Url

POST https://hostname:port/dw/data/v20_9/inventory_list_search

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

SearchRequest

Response Document

InventoryListSearchResult

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedSearchParameterException   Thrown if the query is ill-formed.
400 MalformedSelectorException

selector (String)

Thrown if the given selector is invalid.

Sample

REQUEST:
POST /s/-/dw/data/v20_9/inventory_list_search HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Accept: application/json
{
    "query" : {
        "text_query": {
            "fields": ["id", "description"],
            "search_phrase": "my"
        }
    },
    "select" : "(**)"
}

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "20.9",
  "count" : 2,
  "hits" : [
    {
       "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
       "id" : "my-inventory_list1",
       "description" : "description for inventory list 1.",
       "assigned_sites" :
          [
             "site1",
             "site2",
             "site3"
          ],
       "default_in_stock": true,
       "link" : "https://example.com/s/-/dw/data/v20_9/inventory_lists/my-inventorylist",
       "on_order_inventory_enabled" : false,
       "use_bundle_inventory_only": false
    },
    {
       "_resource_state" : "t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6",
       "id" : "my-inventorylist2",
       "description" : "description for inventorylist 2.",
       "assigned_sites" :
          [
             "site3"
          ],
       "default_in_stock": false,
       "link" : "https://example.com/s/-/dw/data/v20_9/inventory_lists/my-inventorylist2",
       "on_order_inventory_enabled" : true,
       "use_bundle_inventory_only": false
    }
  ],
  "query" : { "text_query": { "fields": ["id", "description"], "search_phrase": "my" } },
  "select": "**",
  "start" : 0,
  "total" : 2
}
OCAPI obsolete versions 13.x and 14.x will be end of life in 2020 and versions 15.x and 16.x in 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.