Skip to content

Categories

Get categories

Set cookie: session_id value what we got from authenticate

POST /api/v1/models/product_category

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"fields": ["id", "name"],
"domain": [["id", "in", [1, 7, 9]]]
}

Response:

{
}

Create categories

Set cookie: session_id value what we got from authenticate

PUT /api/v1/models/product_category

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"values": [
{
"name": "Category 1"
},
{
"name": "Category 2"
}
]
}

Response:

[
1,
2
]

Edit categories

Set cookie: session_id value what we got from authenticate

PATCH /api/v1/models/product_category

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"records": [
{
"id": 1,
"values": {
"name": "New Category Name"
}
}
]
}

Response:

[
1
]

Delete categories

Set cookie: session_id value what we got from authenticate

DELETE /api/v1/models/product_category?ids=1,2

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}