Shopping

Get Shopping Lists

GET /shoppinglists

Request

Get all shopping lists. Equivalent Storefront GraphQL API Query: shoppingLists. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • offset in query with default of 0 - string
    Pagination offset
  • limit in query with default of 20 - string
    Pagination limit
  • isShowAll in query with default of 1 - string
    If show all
  • orderBy in query with default of -created_at - string
    Order by

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v2/shoppinglists \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"list": [
{
"id": 441,
"name": "shopping list name",
"status": 0,
"description": "Shopping list desc",
"updatedAt": 1622601337,
"createdAt": 1622601337,
"totalCount": 0,
"customerInfo": {
"firstName": "Jo",
"lastName": "Sweet",
"userId": 7831,
"email": "example@example.com"
}
}
],
"pagination": {
"totalCount": 1,
"offset": 0,
"limit": 20
}
}
}

Create Shopping List

POST /shoppinglists

Request

Create a shopping list. Equivalent Storefront GraphQL API Mutation: shoppingListsCreate. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Body

object | application/json
  • name
    string
    required

    >= 1 characters
  • description
    string
    required

    >= 1 characters
  • status
    string
    required

    0: Approved 20: Deleted 30: Draft 40: Ready for approval

    Allowed: 0 | 20 | 30 | 40

    >= 1 characters

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"shopplistId": 442
}
}

Update Shopping List

PUT /shoppinglists

Request

Update a shopping list. Equivalent Storefront GraphQL API Mutation: shoppingListsUpdate. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Body

object | application/json
  • name
    string
    required

    Shopping list name
    >= 1 characters
  • description
    string
    required

    Description of this shopping list
    >= 1 characters
  • status
    number
    required

    0: Approved 20: Deleted 30: Draft 40: Ready for approval

  • id
    string
    required

    Shopping list’s ID
    >= 1 characters

example

{
"name": "string",
"description": "string",
"status": 0,
"id": "string"
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"shoplistId": 1
}
}

Get Shopping List ID and Name

GET /shoppinglists/lists

Request

This endpoint is deprecated.

Get all the shopping lists that contains both ID and name.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • status in query - string
    0:Approved 20:Deleted 30:Draft 40:Ready for approval

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v2/shoppinglists/lists \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"list": [
{
"id": 443,
"name": "shopping list name1622602668636"
},
{
"id": 441,
"name": "shopping list name"
}
]
}
}

Add shopping List Items

POST /shoppinglists/items

Request

Add items to an existed shopping list. Equivalent Storefront GraphQL API Mutation: shoppingListsItemsCreate. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Body

object | application/json
  • id
    string
    required

    Shopping list ID
    >= 1 characters
  • items
    array[object]
    required

example-1

{
"id": "string",
"items": [
{
"productId": "string",
"variantId": "string",
"qty": "string",
"optionList": [
{
"option_id": "string",
"option_value": "string"
}
]
}
],
"checkAddStatus": true
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {}
}

Update Shopping List Items

PUT /shoppinglists/items

Request

Update shopping lists items. Equivalent Storefront GraphQL API Mutation: shoppingListsItemsUpdate. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Body

object | application/json
  • shoppinglistId
    string
    required

    Shopping list ID field
    >= 1 characters
  • itemId
    string
    required

    Shopping list item ID field
    >= 1 characters
  • qty
    string
    required

    Quantity of product in shopping list
    >= 1 characters
  • optionList
    array[object]
    required

    Product option of shopping list item
  • variantId
    string
    required

    Product SKU ID
    >= 1 characters
  • sortOrder
    integer

    The sort order for item

example

{
"shoppinglistId": "string",
"itemId": "string",
"qty": "string",
"optionList": [
{
"option_id": "string",
"option_value": "string"
}
],
"variantId": "string",
"sortOrder": 0
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {}
}

Get Shopping List Items Extension

GET /shoppinglists/items-extension

Request

Get a shopping list detail information. Equivalent Storefront GraphQL API Query: shoppingList. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • id in query - string
    Shopping list ID
  • offset in query with default of 0 - string
    Pagination offset
  • limit in query with default of 100 - string
    Pagination limit
  • sortBy in query - string
    the field to sort by
    Example: sort_order

    Allowed: product_name | quantity | product_sku | updated_at | created_at | sort_order

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v2/shoppinglists/items-extension \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"name": "shopping list name",
"description": "Shopping list desc",
"status": 0,
"isOwner": "1",
"products": [
{
"itemId": 1558,
"productId": "107",
"baseSku": "DPB",
"variantSku": "d1-1",
"qty": 5,
"basePrice": 34.95,
"productUrl": "/sample-dustpan-brush/",
"optionsList": [
{
"option_id": "attribute[145]",
"option_value": "95"
}
],
"variantId": "130",
"primaryImage": {
"urlThumbnail": "https://cdn11.bigcommerce.com/s-1i6zpxpe3g/products/107/images/351/dustpan1.1554505753.220.290.jpg?c=2"

Delete Shopping List Item

DELETE /shoppinglists/{shoppingListId}/items/{itemId}

Request

Delete shopping list item using shoppingListId and itemId. Equivalent Storefront GraphQL API Mutation: shoppingListsItemsDelete. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • shoppingListId in path - string
    required
    Shopping list ID
  • itemId in path - string
    required
    Item id

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v2/shoppinglists/[shoppingListId]/items/[itemId]' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {}
}

Delete Shopping List

DELETE /shoppinglists/{shoppingListId}

Request

Delete a shopping list. Equivalent Storefront GraphQL API Mutation: shoppingListsDelete. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • shoppingListId in path - string
    required
    Shopping list ID

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v2/shoppinglists/[shoppingListId]' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {}
}

Duplicate a Shopping List

POST /shoppinglists/duplicate

Request

Duplicate a shopping list. Equivalent Storefront GraphQL API Mutation: shoppingListsDuplicate. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Body

object | application/json
  • sampleShoppingListId
    number
    required

  • name
    string
    required

    >= 1 characters
  • description
    string
    required

    >= 1 characters

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"shoppingListId": "443"
}
}
Did you find what you were looking for?