Shopping List
BigCommerce B2B Edition Shopping List
Get Shopping Lists
GET https://api-b2b.bigcommerce.com/api/v3/io/shopping-listRequest
Get a list of shopping lists viewable based on user permissions of a buyer user ID.
A junior buyer can see all of the lists they create and no one else's.
A senior buyer or admin can see all of the companies approved or ready for approval lists. This would include lists sent by junior buyers.
Authentication
- authToken in header
Parameters
- userId in query - integerrequiredB2B Edition buyer user ID (Either userId or customerId must be passed, but not both.)
- limit in query with default of 10 - integerPagination limit default: 10
- offset in query - integerPagination offset default: 0
- channelId in query - numberBigCommerce channel ID
- customerId in query - integerrequiredBigCommerce customer ID (Either userId or customerId must be passed, but not both.)
- createdUserId in query - integerB2B Edition buyer user ID, if the userId has permissions to view all shopping lists of the company, entering this parameter will filter out the shopping lists created by that user.
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/shopping-list \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS",
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 1
}
},
"data": [
{
"id": 1,
"name": "my first shopping list",
"description": "this is my first shopping list",
"status": 0,
"companyId": 1,
"userId": 12,
"createdAt": 1631495936,
"updatedAt": 1631495936,
"channelId": 0,
"channelName": "string"
}
]
}
Create a Shopping List
POST https://api-b2b.bigcommerce.com/api/v3/io/shopping-listRequest
Create a shopping list for a user
Authentication
- authToken in header
Body
object | application/json
namestring
requireddescriptionstring
Description information for shopping liststatusinteger
status of shopping list, (0: approved, 20: deleted, 30: draft, 40: ready for approval)Allowed: 0 | 30 | 40
userIdinteger
B2B Edition buyer user ID (one of userId and customerId must be passed, and only one of them can be passed).customerIdinteger
BigCommerce customer ID(one of userId and customerId must be passed, and only one of them can be passed).channelIdinteger
BigCommerce channel IDitemsarray[object]
example-1
{
"name": "my first shopping list",
"description": "this is my first shopping list",
"status": 0,
"userId": 0,
"channelId": 1,
"items": [
{
"productId": 123,
"variantId": 321,
"quantity": 5
}
]
}
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"shoppingListId": 1
}
}
Get a Shopping List
GET https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/{shoppingListId}Request
Get a shopping list detail information
Authentication
- authToken in header
Parameters
- shoppingListId in path - integerrequiredThe unique ID for a shopping list.
- userId in query - integerB2B Edition buyer user ID, you can enter a user ID to check if this user can view this shopping list.
- sortBy in query - stringthe field to sort byExample: sortOrder
Allowed: quantity | productName | productSku | sortOrder
- orderBy in query - stringdesc or asc for sort byExample: DESC
Allowed: DESC | ASC
- customerId in query - integerBigCommerce customer ID, passing this parameter will obtain the shopping list according to the b2c user.
- offset in query0 - integerPagination offset for shopping list items
- limit in query with default of 250 - integerPagination limit for shopping list items
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/[shoppingListId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS",
"pagination": {
"limit": 0,
"offset": 0,
"totalCount": 0
}
},
"data": {
"id": 1,
"name": "my first shopping list",
"description": "this is my first shopping list",
"status": 0,
"companyId": 1,
"userId": 12,
"createdAt": 1631495936,
"updatedAt": 1631495936,
"channelId": 0,
"channelName": "string",
"items": [
{
"id": 1,
"productId": 123,
"variantId": 321,
"quantity": 5,
"sortOrder": 0,
"optionList": {
"optionId": "string",
Update a Shopping List
PUT https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/{shoppingListId}Request
update a shopping list detail. you can also update shopping list items by update the items field by this API endpoints. note:
- User id for update the shopping list is not required. You can optionally enter this field according to whether you need to judge user permissions.
- The ID field in shopping list items is an optional field. If it is null, you can only change the quantity of this item by product ID, variant ID and option list, these three fields will determine an actual item. If it is not null, the ID field will determine an actual item and you can change product ID, variant ID, and option list by this way.
- Set a zero quantity of shopping list item will delete this item.
- Quantity = 0 will remove item, you can modify multiple items at one time.
Authentication
- authToken in header
Parameters
- shoppingListId in path - integerrequiredThe unique ID for a shopping list.
Body
object | application/json
namestring
name for shopping listExample: my first shopping listdescriptionstring
description information for shopping listExample: this is my first shopping liststatusinteger
status of shopping list, (0: approved, 20: deleted, 30: draft, 40: ready for approval)Allowed: 0 | 30 | 40
userIdinteger
B2B Edition buyer user ID, you can enter a user ID to check if this user can update this shopping list.Example: 12customerIdinteger
BigCommerce customer ID, passing this parameter will obtain the shopping list according to the b2c user.itemsarray[object]
example-1
{
"name": "test",
"description": "develop test",
"status": 0,
"companyId": 155576,
"userId": 223437,
"items": [
{
"id": 75693,
"productId": 107,
"variantId": 73,
"quantity": 0
},
{
"id": 85416,
"productId": 86,
"variantId": 66,
"quantity": 40
},
{
"id": 76533,
"productId": 112,
"variantId": 79,
"quantity": 1
}
]
}
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"id": 1,
"name": "my first shopping list",
"description": "this is my first shopping list",
"status": 0,
"companyId": 1,
"userId": 12,
"createdAt": 1631495936,
"updatedAt": 1631495936
}
}
Delete a Shopping List
DELETE https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/{shoppingListId}Request
Delete a shopping list. Note this will not delete a shopping list item.
Authentication
- authToken in header
Parameters
- shoppingListId in path - integerrequiredThe unique ID for a shopping list.
- userId in query - integerB2B Edition buyer user ID, you can enter a user ID for check if this user can delete this shopping list.
example
curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/[shoppingListId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"shoppingListId": 1
}
}
Delete a Shopping List Item
DELETE https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/{shoppingListId}/items/{itemId}Request
Delete a shopping list item
Authentication
- authToken in header
Parameters
- shoppingListId in path - stringrequired
- itemId in path - stringrequired
example
curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/shopping-list/[shoppingListId]/items/[itemId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {}
}
See something you can improve? Edit this file on GitHub
Did you find what you were looking for?