Retrieve a SKU list
How to fetch a specific SKU list via API
To fetch a single SKU list, send a GET
request to the /api/sku_lists/:id
endpoint, where id
is the ID of the resource that you want to retrieve.
Request
GET https://yourdomain.commercelayer.io/api/sku_lists/:id
Example
The following request fetches the SKU list identified by the id "xYZkjABcde":
curl -g -X GET \
'https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token'
On success, the API responds with a 200 OK
status code, returning a single resource object:
{
"data": {
"id": "xYZkjABcde",
"type": "sku_lists",
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde"
},
"attributes": {
"created_at": "2018-01-01T12:00:00.000Z",
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"image_url": "https://img.yourdomain.com/skus/xYZkjABcde.png",
"manual": false,
"metadata": {
"foo": "bar"
},
"name": "Personal list",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"sku_code_regex": "^(A|B).*$",
"slug": "personal-list-1",
"updated_at": "2018-01-01T12:00:00.000Z"
},
"relationships": {
"attachments": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/attachments",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/attachments"
}
},
"bundles": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/bundles",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/bundles"
}
},
"customer": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/customer",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/customer"
}
},
"links": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/links",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/links"
}
},
"sku_list_items": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/sku_list_items",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/sku_list_items"
}
},
"skus": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/skus",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/skus"
}
},
"versions": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/relationships/versions",
"related": "https://yourdomain.commercelayer.io/api/sku_lists/xYZkjABcde/versions"
}
}
},
"meta": {
"mode": "test"
}
}
}
Last updated