InventoryLists resource (Data API 19.3)

Summary

Http Method Resource Description
GET /inventory_lists Action to get all the inventory lists with no filtering.
GET /inventory_lists/{id} Action to get inventory list information.
PATCH /inventory_lists/{id} Updates the inventory list with the specified information.
DELETE /inventory_lists/{id} Deletes the inventory list by ID
PUT /inventory_lists/{id} Creates an inventory list using the information provided.

Get Inventory Lists

Action to get all the inventory lists with no filtering.

Url

GET https://hostname:port/dw/data/v19_3/inventory_lists?start={Integer}&count={Integer}&select={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

InventoryLists

Query Parameters

Parameter Type Description Constraints
count Integer Optional count for retrieving only a subset of the items (default is 25).  
select String The property selector.  
start Integer Optional start index for retrieving the items from a given index (default 0).  

Sample

REQUEST:
GET  /s/-/dw/data/v19_3/inventorylists?select=(**) HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "19.3",
  "count" : 2,
  "data" : [
    {
        "_v" : "19.3",
        "_type": "inventory_list",
        "id" : "my-inventorylist1",
        "assigned_sites": ["SiteGenesis","MyOtherSite"],
        "description" : "description for inventorylist1",
        "default_in_stock": true,
        "link": "https://www.example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist1",
        "on_order_inventory_enabled": false,
        "use_bundle_inventory_only": false
    },
    {
        "_v" : "19.3",
        "_type": "inventory_list",
        "id" : "my-inventorylist2",
        "assigned_sites": ["MyOtherSite"],
        "description" : "description for inventorylist2",
        "default_in_stock": false,
        "link": "https://www.example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist2",
        "on_order_inventory_enabled": true,
        "use_bundle_inventory_only": false
    }
  ],
  "select": "**",
  "start" : 0,
  "total" : 2
}

Get Inventory List

Action to get inventory list information.

Url

GET https://hostname:port/dw/data/v19_3/inventory_lists/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

InventoryList

Path Parameters

Parameter Type Description Constraints
id String The id of the requested inventory list. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 InventoryListNotFoundException

inventorylistId (String)

Thrown in case the inventory list does not exist matching the given id

Sample

REQUEST:
GET /s/-/dw/data/v19_3/inventory_lists/my-inventorylist HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
    "_v" : "19.3",
   "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "description for inventorylist",
    "default_in_stock": true,
    "link": "https://example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist",
    "on_order_inventory_enabled": false,
    "use_bundle_inventory_only": false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Requested resource not found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v":"19.3",
   "_type":"fault",
  "fault":
  {
    "type":"InventoryListNotFoundException",
    "message":"No inventory list with ID 'my-inventorylist' was found."
  }
}

Update Inventory List

Updates the inventory list with the specified information.

Url

PATCH https://hostname:port/dw/data/v19_3/inventory_lists/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

InventoryList

Response Document

InventoryList

Path Parameters

Parameter Type Description Constraints
id String The id of the requested inventory list. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 InventoryListNotFoundException

inventorylistId (String)

Thrown in case the inventory list does not exist matching the given id

Sample

REQUEST:
PATCH /s/-/dw/data/v19_3/inventory_lists/my-inventorylist HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367

Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "_resource_state" : t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6
    "description" : "Modified description",
    "default_in_stock": false
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8


{
    "_v" : "19.3",
    "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "Modified description",
    "default_in_stock": false,
    "link": "https://example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist",
    "on_order_inventory_enabled": false,
    "use_bundle_inventory_only": false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
    "_v":"19.3",
    "fault":{
        "type":"InventoryListNotFoundException",
        "message":"No inventory list with ID 'my-inventorylist' was found."
    }
}

Delete Inventory List

Deletes the inventory list by ID

Url

DELETE https://hostname:port/dw/data/v19_3/inventory_lists/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String One inventory list id to remove  

Sample

REQUEST:
DELETE /s/-/dw/data/v19_3/inventory_lists/my-inventorylist HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

Create Inventory List

Creates an inventory list using the information provided.

Url

PUT https://hostname:port/dw/data/v19_3/inventory_lists/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

InventoryList

Response Document

InventoryList

Path Parameters

Parameter Type Description Constraints
id String The id of the inventory list to create. maxLength=256, minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 IdConflictException

bodyID (String)

urlID (String)

if the Id in request is not the same as the ID in document.

Sample

REQUEST:
PUT /s/-/dw/data/v19_3/inventory_lists/my-inventorylist HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
   "description" : "description for inventorylist",
   "default_in_stock": true,
   "use_bundle_inventory_only": false
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Location: https://example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "_v" : "19.3",
   "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "description for inventorylist",
    "default_in_stock": true,
    "link": "https://example.com/s/-/dw/data/v19_3/inventory_lists/my-inventorylist",
    "on_order_inventory_enabled": false,
    "use_bundle_inventory_only": false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v":"19.3",
    "fault":{
        "type":"InventoryListDuplicateException",
        "message":"The inventory list could not be created because of duplicate ID 'my-inventorylist1'."
    }
}