Wishlist

Create and manage customer wishlists and wishlist items.

Additional Information

Get All Wishlists

GET /wishlists

Request

Returns a list of wishlists. Optional filter parameters can be passed in.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • customer_id in query - integer
    All wishlists relating to the customer.
  • page in query with default of 1 - integer
    The page number of results to return. 1 is the default and starts from record 0. Use in conjunction with the limit query parameter to request a specific set of records.
  • limit in query with default of 50 - integer
    The number of items to return per page. Default is 50 and maximum is 250.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/wishlists' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

Body

object | application/json
  • data
    array[object]

  • meta
    object

example

{
"data": [
{
"id": 1,
"customer_id": 4,
"name": "My Wish List",
"is_public": false,
"token": "02d55481-13eb-4d1e-9d79-9062b518570d",
"items": []
},
{
"id": 2,
"customer_id": 11,
"name": "Christmas",
"is_public": false,
"token": "02d55481-13eb-4d1e-9d79-9062b518570d",
"items": [
{
"id": 1,
"product_id": 167
},
{
"id": 2,
"product_id": 174
},
{
"id": 3,
"product_id": 184
}
]
},
{

Create a Wishlist

POST /wishlists

Request

Creates a wishlist and wishlist item. More than one item can be added in the POST.

Required Fields

  • name
  • customer_id

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • customer_id
    integer
    required

    The customer id.
    Example: 12
  • is_public
    boolean

    Whether the wishlist is available to the public.
  • name
    string

    The title of the wishlist.
    Example: School Shopping
  • items
    array[object]

    Array of wishlist items.

example

{
"customer_id": 12,
"is_public": false,
"name": "School Shopping",
"items": [
{
"product_id": 12,
"variant_id": 152
}
]
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 30,
"customer_id": 10,
"name": "Christmas List",
"is_public": true,
"token": "d2d55481-13eb-4d1e-9d79-9062b518570d",
"items": [
{
"id": 44,
"product_id": 77,
"variant_id": 1
},
{
"id": 45,
"product_id": 80,
"variant_id": 1
},
{
"id": 46,
"product_id": 81,
"variant_id": 1
},
{
"id": 47,
"product_id": 86,
"variant_id": 1
},
{
"id": 48,
"product_id": 88,

Get a Wishlist

GET /wishlists/{wishlist_id}

Request

Returns a single wishlist.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • wishlist_id in path - integer
    required
    ID of the Wishlist.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/wishlists/[wishlist_id]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 30,
"customer_id": 10,
"name": "Christmas List",
"is_public": true,
"token": "d2d55481-13eb-4d1e-9d79-9062b518570d",
"items": [
{
"id": 44,
"product_id": 77,
"variant_id": 1
},
{
"id": 45,
"product_id": 80,
"variant_id": 1
},
{
"id": 46,
"product_id": 81,
"variant_id": 1
},
{
"id": 47,
"product_id": 86,
"variant_id": 1
},
{
"id": 48,
"product_id": 88,

Update a Wishlist

PUT /wishlists/{wishlist_id}

Request

Updates a wishlist.

Use this endpoint to update existing wishlist items, change the wishlistʼs name and whether the wishlist is available publicly. To add or delete a wishlist item, see Wishlist Items.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • wishlist_id in path - integer
    required
    ID of the Wishlist.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • customer_id
    integer
    required

    The customer ID. A read-only value.
  • is_public
    boolean

    Whether the wishlist is available to the public.
  • name
    string

    The title of the wishlist.
  • items
    array[object]
    required

    Array of wishlist items.

example

{
"customer_id": 0,
"is_public": true,
"name": "string",
"items": [
{
"id": 12,
"product_id": 55,
"variant_id": 22
}
]
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 30,
"customer_id": 10,
"name": "Christmas List",
"is_public": true,
"token": "d2d55481-13eb-4d1e-9d79-9062b518570d",
"items": [
{
"id": 44,
"product_id": 77,
"variant_id": 1
},
{
"id": 45,
"product_id": 80,
"variant_id": 1
},
{
"id": 46,
"product_id": 81,
"variant_id": 1
},
{
"id": 47,
"product_id": 86,
"variant_id": 1
},
{
"id": 48,
"product_id": 88,

Delete a Wishlist

DELETE /wishlists/{wishlist_id}

Request

Deletes a wishlist.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • wishlist_id in path - integer
    required
    ID of the Wishlist.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/wishlists/[wishlist_id]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?