Skip to main content

Get All Attribute Values

List all attribute values with optional sorting, and pagination.

HTTP Request

GET/api/products/attributes/:attribute_id/values

Authorization

Authorization

  • Required: Yes
  • Permission: Staff or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
attribute_idIntegerYesUnique ID of the attribute

Query Parameters

ParameterTypeDefaultDescription
limitIntegerNumber of results to return per page (default is 10)
offsetIntegerNumber of results to skip before returning results (default is 0)
searchStringSearch term to filter results by `id`, `value`
orderingStringField to order results by (`id`, `value`, `created_at`, `updated_at`)

Example Requests

1import requests
2
3# List attribute values for a specific attribute
4response = requests.get('http://www.example.com/api/products/attributes/123/values',
5  headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())

Status Codes

CodeDescription
200Attribute values retrieved successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — attribute does not exist
500Internal server error

Response Fields

FieldTypeDescription
idIntegerUnique ID of the attribute value
valueStringThe value of the attribute
created_atString (ISO 8601)Timestamp when attribute value was created
updated_atString (ISO 8601)Timestamp when attribute value was last updated