API reference
List all SKU lists
How to fetch a collection of SKU lists via API
To fetch a collection of SKU lists, send a GET request to the /api/sku_lists endpoint.

Request

GET https://yourdomain.commercelayer.io/api/sku_lists

Example

Request
Response
The following request fetches a collection of SKU lists:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/sku_lists/' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:
1
{
2
"data": [
3
{
4
"id": "xYZkjABcde",
5
"type": "sku_lists",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde"
8
},
9
"attributes": {
10
"name": "Personal list",
11
"slug": "personal-list-1",
12
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
13
"image_url": "https://img.yourdomain.com/skus/xYZkjABcde.png",
14
"manual": false,
15
"sku_code_regex": "^(A|B).*quot;,
16
"created_at": "2018-01-01T12:00:00.000Z",
17
"updated_at": "2018-01-01T12:00:00.000Z",
18
"reference": "ANY-EXTERNAL-REFEFERNCE",
19
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
20
"metadata": {
21
"foo": "bar"
22
}
23
},
24
"relationships": {
25
"skus": {
26
"links": {
27
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/skus",
28
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/skus"
29
}
30
},
31
"sku_list_items": {
32
"links": {
33
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/sku_list_items",
34
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/sku_list_items"
35
}
36
},
37
"bundles": {
38
"links": {
39
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/bundles",
40
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/bundles"
41
}
42
}
43
},
44
"meta": {
45
"mode": "test"
46
}
47
},
48
{
49
"other": "... 9 sku_lists (first page)"
50
}
51
],
52
"meta": {
53
"record_count": 140,
54
"page_count": 14
55
},
56
"links": {
57
"first": "https://yourdomain.commercelayer.io/api/sku_lists?page[number]=1&page[size]=10",
58
"next": "https://yourdomain.commercelayer.io/api/sku_lists?page[number]=2&page[size]=10",
59
"last": "https://yourdomain.commercelayer.io/api/sku_lists?page[number]=14&page[size]=10"
60
}
61
}
Copied!
Remember that when you fetch a list of resources you get paginated result.

Sortable attributes

The list of SKU lists can be sorted by the following attributes:
  • name
  • slug
  • id
  • created_at
  • updated_at
  • reference
  • reference_origin