Retrieve availability when retrieving abstract products
Edit on GitHubThis document describes how to retrieve availability when retrieving abstract products. To retrieve full information about abstract products, see Retrieve abstract products.
Installation
For detailed information on the modules that provide the API functionality and related installation instructions, see:
Retrieve an abstract product
To retrieve general information about an abstract product, send the request:
GET
/abstract-products/{{abstract_product_sku}}
PATH PARAMETER | DESCRIPTION |
---|---|
{{abstract_product_sku}} | SKU of an abstract product to get information for. |
Request
STRING PARAMETER | DESCRIPTION | EXEMPLARY VALUES |
---|---|---|
include | Adds resource relationships to the request. | abstract-product-availabilities |
GET https://glue.mysprykershop.com/abstract-products/001?include=abstract-product-availabilities
: Retrieve information about the abstract product with SKU 001
with its availability.
Response
Response sample: retrieve information about an abstract product with the details about product availability
{
"data": {
"type": "abstract-products",
"id": "001",
"attributes": {
"sku": "001",
"averageRating": null,
"reviewCount": 0,
"name": "Canon IXUS 160",
"description": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results while framing using Live View Control and enjoy sharing them with friends using the 6.8 cm (2.7”) LCD screen. Combine with a Canon Connect Station and you can easily share your photos and movies with the world on social media sites and online albums like irista, plus enjoy watching them with family and friends on an HD TV. Effortlessly enjoy great shots of friends thanks to Face Detection technology. It detects multiple faces in a single frame making sure they remain in focus and with optimum brightness. Face Detection also ensures natural skin tones even in unusual lighting conditions.",
"attributes": {
"megapixel": "20 MP",
"flash_range_tele": "4.2-4.9 ft",
"memory_slots": "1",
"usb_version": "2",
"brand": "Canon",
"color": "Red"
},
"superAttributesDefinition": [
"color"
],
"superAttributes": {
"color": [
"Red"
]
},
"attributeMap": {
"product_concrete_ids": [
"001_25904006"
],
"super_attributes": {
"color": [
"Red"
]
},
"attribute_variants": []
},
"metaTitle": "Canon IXUS 160",
"metaKeywords": "Canon,Entertainment Electronics",
"metaDescription": "Add a personal touch Make shots your own with quick and easy control over picture settings such as brightness and colour intensity. Preview the results whi",
"attributeNames": {
"megapixel": "Megapixel",
"flash_range_tele": "Flash range (tele)",
"memory_slots": "Memory slots",
"usb_version": "USB version",
"brand": "Brand",
"color": "Color"
},
"url": "/en/canon-ixus-160-1"
},
"links": {
"self": "https://glue.mysprykershop.com/abstract-products/001?include=abstract-product-availabilities"
},
"relationships": {
"abstract-product-availabilities": {
"data": [
{
"type": "abstract-product-availabilities",
"id": "001"
}
]
}
}
},
"included": [
{
"type": "abstract-product-availabilities",
"id": "001",
"attributes": {
"availability": true,
"quantity": "10.0000000000"
},
"links": {
"self": "https://glue.mysprykershop.com/abstract-products/001/abstract-product-availabilities"
}
}
]
}
RESOURCE | ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|---|
abstract-products | sku | String | SKU of the abstract product. |
abstract-products | averageRating | String | Average rating of the product based on customer rating. |
abstract-products | reviewCount | Integer | Number of reviews left by customer for this abstract product. |
abstract-products | name | String | Name of the abstract product. |
abstract-products | description | String | Description of the abstract product. |
abstract-products | attributes | Object | List of attributes and their values. |
abstract-products | superAttributeDefinition | String | Attributes flagged as super attributes that are, however, not relevant to distinguish between the product variants. |
abstract-products | attributeMap | Object | Each super attribute / value combination and the corresponding concrete product IDs are listed here. |
abstract-products | attributeMap.super_attributes | Object | Applicable super attribute and its values for the product variants. |
abstract-products | attributeMap.attribute_variants | Object | List of super attributes with the list of values. |
abstract-products | attributeMap.product_concrete_ids | String | Product IDs of the product variants. |
abstract-products | metaTitle | String | Meta title of the product. |
abstract-products | metaKeywords | String | Meta keywords of the product. |
abstract-products | metaDescription | String | Meta description of the product. |
abstract-products | attributeNames | Object | All non-super attribute / value combinations for the abstract product. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
availability | Boolean | Boolean to inform about the availability |
quantity | Integer | Available stock (all warehouses aggregated) |
Possible errors
CODE | REASON |
---|---|
301 | Abstract product is not found. |
311 | Abstract product SKU is not specified. |
Thank you!
For submitting the form