Broadleaf Microservices
  • v1.0.0-latest-prod

Cart Item List

Retrieves a page of item lists

Operation

itemListClient#listItemList(cq, options);

Parameters

Parameter Type Required? Description

cq

string

Used to provide an RSQL query string for filtering a list of items

options

NumberedPageableClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListPage.

Example

Example of getting a Item List Page
const itemListPage = await itemListClient.listItemList('<LIST_ID>', { accessToken });

console.log(itemListPage);

Create Item List

Operation

itemListClient#createItemList(itemList, options);

Parameters

Parameter Type Required? Description

itemList

ItemList

A simple collection of catalog items.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemList.

Example

Example of creating a Item List
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);

Delete Item List

Operation

itemListClient#deleteItemLists(listIds, options);

Parameters

Parameter Type Required? Description

listIds

Array<string>

The IDs of the item lists to delete.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a DeletedItemListResponse.

Example

Example of deleting a Item List
const deletedItemListResponse = await itemListClient.deleteItemLists(['<LIST_ID>', '<LIST_ID>'], { accessToken });


console.log(deletedItemListResponse);

Get Item List

Operation

itemListClient#getItemList(listId, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemList.

Example

Example of getting a Item List
const itemList = await itemListClient.getItemList('<LIST_ID>', { accessToken });

console.log(itemList);

Replace Item List

Operation

itemListClient#replaceItemList(listId, itemList, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemList

ItemList

A simple collection of catalog items.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListPage.

Example

Example of replacing a Item List
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);

Update Item List

Operation

itemListClient#updateItemList(itemList, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemList

ItemList

A simple collection of catalog items.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListPage.

Example

Example of updating a Item List
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);

Delete Item List

Operation

itemListClient#deleteItemList(listId, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This returns a status of 200.

Example

Example of deletinbg a Item List
 await itemListClient.deleteItemList('<LIST_ID>', { accessToken });

Share Item List

Operation

itemListClient#createItemList(listId, shareItemListRequest, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

shareItemListRequest

ShareItemListRequest

Used to provide an RSQL query string for filtering a list of items

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This returns a status of 200.

Example

Example of sharing a Item List
const shareItemListRequest = {
  "listId": "LIST_ID",
  "valueType": "string",
  "role": "string",
  "targets": [
    {
      "value": "string",
      "attributes": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  ]
}
await itemListClient.createShareItemList('LIST_ID', shareItemListRequest, { accessToken });

List Select Item List Items

Operation

itemListClient#listSelectItemListItems(listId, itemIds, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemIds

Array<string>

The list item IDs.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a array of ItemListItem.

Example

Example of getting Item List Items
const items = await itemListClient.listSelectItemListItems('<LIST_ID>', ['ITEM_ID', 'ITEM_ID2']);

console.log(items);

Create Item List Items

Operation

itemListClient#createItemListItems(listId, listItems, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

listItems

Array<ItemListItem>

A list of item list items to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns an array of ItemListItem.

Example

Example of creating a Item List Item
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);

Replace Item List Items

Operation

itemListClient#createItemListItems(listId, listItems, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

listItems

Array<ItemListItem>

A list of item list items to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns an array of ItemListItem.

Example

Example of replacing a Item List Item
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);

Update Item List Items

Operation

itemListClient#updateItemListItems(listId, listItems, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

listItems

Array<ItemListItem>

A list of item list items to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns an array of ItemListItem.

Example

Example of updating a Item List Item
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);

Delete Item List Items

Operation

itemListClient#deleteItemListItems(listId, itemIds, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemIds

Array<string>

The item list item IDs to delete.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a 200 status code.

Example

Example of deleting a Item List Items
await itemListClient.deleteItemListItems('<LIST_ID>', ['ITEM_ID_1', 'ITEM_ID_2'], { accessToken });

List Item List Items

Operation

itemListClient#listItemListItems(itemList, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

options

NumberedPageableClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListItemPage.

Example

Example of getting a Item List Items Page
const itemListItemPage = await itemListClient.listItemListItems('<LIST_ID>');

console.log(itemListItemPage);

Create Item List Item

Operation

itemListClient#createItemListItem(listId, listItem, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

listItem

ItemListItem

The item list item to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListItem.

Example

Example of creating a Item List Item
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);

Get Item List Item

Operation

itemListClient#getItemListItem(listId, itemId, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemId

string

The item list item ID.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListItem.

Example

Example of getting a Item List Item
const itemListItem = await itemListClient.getItemListItem('LIST_ID', 'ITEM_ID');

console.log(itemListItem);

Replace Item List Item

Operation

itemListClient#replaceItemListItem(listId, itemId, listItem, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemId

string

The item list item ID.

listItem

ItemListItem

The item list item to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListItem.

Example

Example of getting a Item List Page
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);

Update Item List Item

Operation

itemListClient#updateItemListItem(listId, itemID, listItem, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemId

string

The item list item ID.

listItem

ItemListItem

The item list item to create.

options

ClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListItem.

Example

Example of updating a Item List item
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);

Delete Item List Items

Operation

itemListClient#createItemListItems(itemList, options);

Parameters

Parameter Type Required? Description

listId

string

The item list ID.

itemId

string

The item list item ID.

options

NarrowedPageableSortableClientCallOptions

Options passed to the HTTP request call to customize the request configuration.

Response

This function returns a ItemListPage.

Example

Example of deleting a Item List Item
await itemListClient.deleteItemListItem('<LIST_ID>', 'ITEM_ID');