For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a product–category link

Fully updates a product–category link.

product and category are both required. If the new (product, category) pair already exists on another link, the request is rejected with 400 Bad Request.

put
/product_category/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the product–category link.

Body

The body of a product–category link create or full update request.

productintegerRequired

The identifier of the product to link.

categoryintegerRequired

The identifier of the category node to link.

is_mainboolean · nullableOptional

Whether this is the product's main category. Optional.

Responses
200

The updated product–category link.

application/json

A product–category link.

pkintegerRead-onlyOptional

The unique identifier of the link.

productintegerOptional

The identifier of the linked product.

categoryintegerOptional

The identifier of the linked category node.

is_mainboolean · nullableOptional

Whether this is the product's main category. Defaults to null (unset).

put/product_category/{id}/
PUT /api/v1/remote/1/product_category/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "product": 100,
  "category": 5,
  "is_main": true
}
{
  "pk": 42,
  "product": 100,
  "category": 5,
  "is_main": true
}

Last updated

Was this helpful?