(Quick Reference)
Service: Show an attribute
Description: This web service return an existing attribute of the specified id in JSON format
URL:
https://BASE_URL/api/VERSION/attributes/{id}
URL with external_id:
https://BASE_URL/api/VERSION/attributes/reference/{id}
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The ID of the desired attribute | Long/String | Yes | 123 |
Success Output
Success case: response.status=200
{
"id": 1,
"reference": "color",
"name": "couleur",
"type": "COLOR",
"attributeValues": [
{
"id": 1,
"value": "vert",
"href": "/api/v1.0/attributeValues/1"
},
{
"id": 4,
"value": "Bleu",
"href": "/api/v1.0/attributeValues/4"
},
{
"id": 6,
"value": "Rouge",
"href": "/api/v1.0/attributeValues/6"
},
{
"id": 8,
"value": "Noir",
"href": "/api/v1.0/attributeValues/8"
},
{
"id": 14,
"value": "violet",
"href": "/api/v1.0/attributeValues/14"
},
{
"id": 15,
"value": "orange",
"href": "/api/v1.0/attributeValues/15"
},
{
"id": 16,
"value": "blanc",
"href": "/api/v1.0/attributeValues/16"
},
{
"id": 17,
"value": "rose",
"href": "/api/v1.0/attributeValues/17"
}
],
"organization": "entity1",
"dateCreated": "2016-01-18T15:40:12Z",
"lastUpdated": "2016-08-22T13:24:40Z"
}
Failure Output
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The attribute with the id 199 doesn't exist."
}
Failure case:response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}