Skip to main content

Update Product Attribute

Updates an existing product attribute.

HTTP Request

PATCH/api/products/attributes/:id

Authorization

Authorization

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

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the product attribute

Request Body

FieldTypeRequiredDescription
nameStringNoName of the product attribute (unique)
descriptionStringNoDescription of the product attribute(nullable)

Example Requests

1import requests
2
3# Update a specific product attribute
4response = requests.patch('http://www.example.com/api/products/attributes/456',
5  headers={'Authorization': 'Token <your_api_key>'},
6  json={
7    "description": "some new description"
8  }
9)
10
11print(response.json())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the product attribute
nameStringName of the attribute(unique)
descriptionObjectDescription of the attribute
created_atString (ISO 8601)Timestamp when product attribute was created
updated_atString (ISO 8601)Timestamp when product attribute was last updated

Example Response

{
"id": 5,
"name": "size",
"description": "width and height",
"created_at": "2025-12-24T16:14:44.180013Z",
"updated_at": "2025-12-24T16:15:05.503898Z"
}