Apply a category to a node

POST {{baseUrl}}/v1/nodes/:id/categories

Applies an existing category to a node. Only one category (and its values) may be applied at a time

The following examples will assume that there is a category (ID 9830) that has the following attributes:

  • TextField (Attribute ID 2)
  • Set (Attribute ID 3) with two rows. The Set has a multi-value Textfield (Set Attribute ID 4) that can have a maximum of 3 values

Apply the category and use the default values for its attributes:
{category_id:9830}

Apply the category and change the value of the Textfield:
{category_id:9830,9830_2:new value}

Apply the category and change the value of the Set's Textfield in the second row, for the Set Textfield's third value:
{category_id:9830,9830_3_2_4:[,,new value]}

Request Body

[{"name"=>"category_id", "value"=>"-5065497", "datatype"=>"number"}, {"name"=>"{attribute_key}", "value"=>"reprehenderit id", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{}