Get all attributes in a category
GET /api/category_attribute/v1/{categoryId}
returns all attributes belonging to the specified category.
Request schema
Method |
URL |
GET |
/api/category_attribute/v1/{categoryId} |
*indicates required parameters
Field |
Value Type |
Description |
*Authorization |
String |
Enter: Bearer access token. |
*Upc-Selected-Company |
Integer |
Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies . |
*CategoryId |
Integer |
ID of the category for which you want to view all attributes. |
X-User-Id |
Text |
Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required. |
Response schema
Response body
200 response
Field |
Value Type |
Description |
No field name |
Array of category attributes |
The array contains all category attributes belonging to the specified category. Every category has the following parameters:
id - Category attribute ID categoryId - ID of the category the attributes belong toname - Category attribute name valueType - Category attribute value type (one of: STRING, FLOAT, DATE, INTEGER, LOV, CHECKBOX) listOfValue - Contains the list of item values created for a drop-down if the value type is LOV, otherwise this is null.
|
Sample response body
[
{
"id": 9524,
"categoryId": 1271,
"name": "Fill weight",
"valueType": "FLOAT",
"listOfValue": null
},
{
"id": 9525,
"categoryId": 1271,
"name": "Materials - new",
"valueType": "LOV",
"listOfValue": [
{
"id": 3153,
"attributeId": 9533,
"itemIndex": 1,
"itemValue": "80% Brushed Poly Flannel"
},
{
"id": 3154,
"attributeId": 9533,
"itemIndex": 2,
"itemValue": "75% Brushed Poly Flannel2"
}
]
}
]