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

Partially update a product–category link

Updates one or more fields of a product–category link. Only the fields included in the request body are changed.

If the resulting (product, category) pair already exists on another link, the request is rejected with 400 Bad Request.

patch
/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 partial update request. Only the fields included are changed.

productintegerOptional

The identifier of the product to link.

categoryintegerOptional

The identifier of the category node to link.

is_mainboolean · nullableOptional

Whether this is the product's main category.

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).

patch/product_category/{id}/
PATCH /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: 17

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

Last updated

Was this helpful?