Create a product–category link
Files a product under a category node.
product and category are required. The pair (product, category) must be unique; filing the same product under the same category node twice is rejected with 400 Bad Request carrying a non_field_errors entry.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The body of a product–category link create or full update request.
The identifier of the product to link.
The identifier of the category node to link.
Whether this is the product's main category. Optional.
The created product–category link.
A product–category link.
The unique identifier of the link.
The identifier of the linked product.
The identifier of the linked category node.
Whether this is the product's main category. Defaults to null (unset).
The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
POST /api/v1/remote/1/product_category/ 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?

