List APIs (2.0.0)

Download OpenAPI specification:Download

List refers to the collection of desired products saved by customers to their user account, signifying interest in the products without immediate intent to purchase. List APIs let merchants create and manage different types of lists, such as wish list, save for cart, or any other custom list, that lets shoppers save items for future reference. fabric list APIs are used for multi tenant service. A basic workflow includes creating a list, adding items to the list, updating and deleting list by listId.

List Controller

Create list

Creates a list. When you create a list, a list ID is generated automatically that can be mapped later to add items to the list, and to update and delete the list. After creating a list, you can add items to the list by using POST/{listId}/items endpoint.

SecurityAuthorization or context
Request
Request Body schema: application/json
listId
string
name
required
string
userId
required
string
listType
string
notes
string
object
count
integer <int32> >= 0

Number of items added to the list.

createdAt
string <date-time>
updatedAt
string <date-time>
Responses
200

List Created

400

Bad Request

404

List Not Found

500

Internal Server Error

post/
Request samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Add items to a specific list

Add array of items to a specific list by list ID.

SecurityAuthorization or context
Request
path Parameters
listId
required
string

ID of the list to which items are to be added

Example: 62fa3796841ea417fa71d2a9
Request Body schema: application/json
Array
sku
string

SKU

itemId
string

Id of the item to be added to the list

quantity
integer <int32>

Number of items added to the list

Responses
200

ListDetails Created

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/{listId}/items
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
[
  • {
    }
]

Get items of a specific list

Retrieves items from a specific list by list ID.

SecurityAuthorization or context
Request
path Parameters
listId
required
string

Id of the list from which items are to be retrieved.

Responses
200

returns items

400

Bad Request

404

Object Not Found!

500

Internal Server Error

get/{listId}/items
Response samples
application/json
[
  • {
    }
]

Get list detail by Id

Retrieves details of a list by its ID.

SecurityAuthorization or context
Request
path Parameters
listId
required
string

ID of the list whose details are to be retrieved.

Responses
200

List object found

400

Bad Request

404

Object Not Found!

500

Internal Server Error

get/{listId}
Response samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete list by Id

Deletes list by Id. If items are added to the list, records of the added items are deleted if a list is deleted.

SecurityAuthorization or context
Request
path Parameters
listId
required
string
Example: 62fa3796841ea417fa71d2a9
Responses
200

List object Deleted

400

Bad Request

404

Object Not Found!

500

Internal Server Error

delete/{listId}
Response samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update list by Id

Updates list details by its Id. Updating a list does not does not update item details. To add or delete items to or from a list, use POST/{listId}/items endpoint.

SecurityAuthorization or context
Request
path Parameters
listId
required
string

Id of the list that is updated.

Example: 62fa3796841ea417fa71d2a9
Request Body schema: application/json
listId
string
name
required
string
userId
required
string
listType
string
notes
string
object
count
integer <int32> >= 0

Number of items added to the list.

createdAt
string <date-time>
updatedAt
string <date-time>
Responses
200

List object Updated

400

Bad Request

404

Object Not Found!

500

Internal Server Error

patch/{listId}
Request samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "listId": "5349b4ddd2781d08c09890f4",
  • "name": "Wishlist",
  • "userId": null,
  • "listType": "Wish list",
  • "notes": "Add items to your wishlist to purchase later",
  • "attributes": {
    },
  • "count": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get lists by userId

Retrieves lists created for a specific user, by user ID.

SecurityAuthorization or context
Request
path Parameters
userId
required
string
Responses
200

return Lists

400

Bad Request

404

Object Not Found!

500

Internal Server Error

get/user/{userId}
Response samples
application/json
[
  • {
    }
]