get http://staging-apigateway.snapdeal.com/seller-api/categories//attributes
Returns the Attributes for given category. Attributes denote the inputs needed to list a product in that category.
Response Details
Category Attributes are grouped into 4 groups:
- PRODUCT_DETAILS
- PRICING_AND_SHIPPING
- PRODUCT_ATTRIBUTES
- IMAGES
Each group will have a list of attributes with attributeInfo & attributeValidations.
AttributeInfo has the following params:
- id - unique identifier of the attribute
- name - name of the attribute
- displayName - display name of the attribute
- dataType - data type of the attribute; with possible values: INTEGER, LONG, DOUBLE, STRING, BOOLEAN, IMAGE
- mandatory
- helpText - description of the attribute if any
- helpLink - as of now applicable only for image attributes & holds a url of the guideline image
AttributeValidations is a list of validations where the data changes as per the field type with possible values RANGE, SELECT, MAX_LENGTH, INVALID_CHARS
If the type is
- RANGE, it contains
min - minimum value of the attribute
max - maximum value of the attribute - SELECT, it contains
values - list of values to be selected from
freeText - if true, other values than the above provided are also allowed - MAX_LENGTH, it contains
maxLength - max length of the attribute value - INVALID_CHARS,
characters - string represents the disallowed characters
Request
| ParameterName | DataType | ParameterType | Requirement | Description |
|---|---|---|---|---|
| categoryId | int | Path | Mandatory | Id of the category (has to be product type) for which attributes are required |
Response
metadata :
| FieldName | DataType | Description |
|---|---|---|
| requestId | String | Unique ID for the request |
| clientId | String | PartnerI Id |
| responseTime | Long | Response Time |
| requestedURI | String | Requested URI |
| message | String | Error message |
payload : Map<String, List> where Key is Category Attributes and value is List of AttributeMetadata Objects
AttributeMetadata:
| FieldName | DataType | Description |
|---|---|---|
| attribute | Attribute | Category attributes |
| validations | List | List of AttributeValidations |
Attribute :
| FieldName | DataType | Description |
|---|---|---|
| id | Integer | Attribute id |
| name | String | Attribute name |
| displayName | String | displayName |
| dataType | String | dataType |
| mandatory | boolean | mandatory |
| helpText | String | helpText |
| helpLink | String | helpLink |
AttributeValidation : There are total 4 types of attrubte validations.these attrubte validations are depands on categories
| FieldName | DataType | Description |
|---|---|---|
| type | String | Validation Type.value=SELECT |
| freeText | String | freeText |
| values | List<?> | values |
| FieldName | DataType | Description |
|---|---|---|
| type | String | Validation Type.value=RANGE |
| max | Number | max |
| min | Number | min |
| FieldName | DataType | Description |
|---|---|---|
| type | String | Validation Type.value=INVALID_CHARS |
| characters | String | characters |
| FieldName | DataType | Description |
|---|---|---|
| type | String | Validation Type.value=MAX_LENGTH |
| max_length | Integer | max_length |
