InventoryLists Resource (Data API 16.4)

Summary

Http Method Resource Description
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 List

Action to get inventory list information.

Url

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

Formats

json, xml

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/v16_4/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
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
    "_v" : "16.4",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "description for inventorylist",
    "default_in_stock": true,
    "link": "https://www.example.com/s/-/dw/data/v16_4/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":"16.4",
   "_type":"fault",
  "fault":
  {
    "type":"InventoryListNotFoundException",
    "message":"No inventory list with id 'my-inventorylist' found."
  }
}

Update Inventory List

Updates the inventory list with the specified information.

Url

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

Formats

json, xml

Request Document

InventoryList

Response Document

InventoryList

Path Parameters

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

Header Parameters

Parameter Type Description Constraints
If-Match String    

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/v16_4/inventory_lists/my-inventorylist HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
If-Match: t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "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
Etag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5

{
    "_v" : "16.4",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "Modified description",
    "default_in_stock": false,
    "link": "https://www.example.com/s/-/dw/data/v16_4/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":"16.4",
    "fault":{
        "type":"InventoryListNotFoundException",
        "message":"No store with id 'my-inventorylist' found."
    }
}

Delete Inventory List

Deletes the inventory list by ID

Url

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

Formats

json, xml

Path Parameters

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

Sample

REQUEST:
DELETE /s/-/dw/data/v16_4/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/v16_4/inventory_lists/{id}

Formats

json, xml

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/v16_4/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/v16_4/inventory_lists/my-inventorylist
Content-Length: 67
Content-Type: application/json; charset=UTF-8
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
    "_v" : "16.4",
    "_type": "inventory_list",
    "id" : "my-inventorylist",
    "assigned_sites": ["SiteGenesis","MyOtherSite"],
    "description" : "description for inventorylist",
    "default_in_stock": true,
    "link": "https://www.example.com/s/-/dw/data/v16_4/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":"16.4",
    "fault":{
        "type":"InventoryListDuplicateException",
        "message":"Inventory list with id 'my-inventorylist1' is already in use."
    }
}