itemListClient#listItemList(cq, options);
The following operations are used to build up the various pieces of a cart checkout and handle item list requests.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
❌ |
Used to provide an RSQL query string for filtering a list of items |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListPage.
Parameter | Type | Required? | Description |
---|---|---|---|
|
✅ |
A simple collection of catalog items. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemList.
const itemList = {
"name": "string",
"items": [
{
"id": undefined,
"itemListId": "string",
"itemSkuRef": {
"sku": "string",
"productId": "string",
"variantId": "string"
},
"quantity": 0
}
]
};
const newCreatedItemList = await itemListClient.createItemList(itemList, { accessToken });
console.log(newCreatedItemList);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The IDs of the item lists to delete. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a DeletedItemListResponse.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemList.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
✅ |
A simple collection of catalog items. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListPage.
const itemList = {
"name": "string",
"items": [
{
"id": undefined,
"itemListId": "123456",
"itemSkuRef": {
"sku": "string",
"productId": "string",
"variantId": "string"
},
"quantity": 0
}
]
}
const listId = itemList.items[0].itemListId
const replacedItemList = await itemListClient.replaceItemList(itemListId, itemList, { accessToken });
console.log(replacedItemList);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
✅ |
A simple collection of catalog items. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListPage.
const itemList = {
"name": "string",
"items": [
{
"id": undefined,
"itemListId": "123456",
"itemSkuRef": {
"sku": "string",
"productId": "string",
"variantId": "string"
},
"quantity": 0
}
]
}
const listId = itemList.items[0].itemListId
const updatedItemList = await itemListClient.replaceItemList(itemListId, itemList, { accessToken });
console.log(updatedItemList);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
✅ |
Used to provide an RSQL query string for filtering a list of items |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
const shareItemListRequest = {
"listId": "LIST_ID",
"valueType": "string",
"role": "string",
"targets": [
{
"value": "string",
"attributes": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}
]
}
await itemListClient.createShareItemList('LIST_ID', shareItemListRequest, { accessToken });
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
The list item IDs. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a array of ItemListItem.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
A list of item list items to create. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns an array of ItemListItem.
const listId = 'LIST_ID
const listItems = [
{
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
},
{
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
];
const items = await itemListClient.createItemListItems(listId, listItems);
console.log(items);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
A list of item list items to create. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns an array of ItemListItem.
const listId = 'LIST_ID
const listItems = [
{
id: 'ITEM_ID_1',
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
},
{
id: 'ITEM_ID_2',
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
];
const items = await itemListClient.replaceItemListItems(listId, listItems);
console.log(items);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
A list of item list items to create. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns an array of ItemListItem.
const listId = 'LIST_ID
const listItems = [
{
id: 'ITEM_ID_1',
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
},
{
id: 'ITEM_ID_2',
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
];
const items = await itemListClient.updateItemListItems(listId, listItems);
console.log(items);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListItemPage.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
✅ |
The item list item to create. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListItem.
const listId = 'LIST_ID'
const listItem = {
id: undefined,
itemListId: listId,
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
const itemListItem = await itemListClient.createItemListItem(listId, listItem);
console.log(itemListItem);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
The item list item ID. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListItem.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
The item list item ID. |
|
✅ |
The item list item to create. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListItem.
const listId = 'LIST_ID';
const itemId = 'ITEM_ID';
const listItem = {
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
const itemListItem = await itemListClient.replaceItemListItem(listId, itemId, listItem);
console.log(itemListItem);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
The item list item ID. |
|
✅ |
The item list item to create. |
|
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListItem.
const listId = 'LIST_ID';
const itemId = 'ITEM_ID';
const listItem = {
itemSkuRef: {
sku: 'string',
productId: 'string',
variantId: 'string'
},
quantity: 0,
attributes: {},
internalAttributes: {},
attributeChoices: {}
}
const itemListItem = await itemListClient.updateItemListItem(listId, itemId, listItem);
console.log(itemListItem);
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The item list ID. |
|
|
✅ |
The item list item ID. |
|
❌ |
Options passed to the HTTP request call to customize the request configuration. |
This function returns a ItemListPage.