Updates a category.
PUT vs PATCH
PUT is used to fully update an existing resource. It replaces the entire resource with the data provided.
🔸 Any fields not included in the request body will be overwritten to null or their default value.
🔹 Use PUT when you are sending the complete updated object.PATCH is used to partially update a resource. It modifies only the specified fields without affecting others.
🔸 Fields not included in the PATCH request body will be left unchanged.
🔹 Use PATCH when you only need to update a few fields.✅ Tip: Always double-check which method to use based on your update logic. Use PUT carefully to avoid unintentionally nulling out data.
Endpoint URL
https://{{base_url}}/api/v2/category
Authentication and rate limits
Item | Details |
---|---|
Authentication method | OAuth 2.0 Bearer token |
Rate limit | Rate Limit |
Requests Example
curl --request PUT \
--url "https://{{base_url}}/api/v2/category/{id}" \
--header "Authorization: Bearer $BEARER_TOKEN" \
--header "Content-Type: application/json" \
--data-raw "$JSON"
Request Syntax
{
"company": integer,
"category": "string",
"subcategories": ["string",...]
}
Body Parameters
- id (integer) --
[REQUIRED] The ID of the category.
The id parameter is passed as part of the request url/category/$id
.
To lookup a specific category ID, see the List Category API. - company (integer) --
[REQUIRED]
The ID of the specific company your API is calling. For accounts with only one company, the default value is1
.
To lookup a specific company ID, see the List Company API. - category (string) --
[REQUIRED]
The name of the category.
Max characters =50
The name of the category must be unique per account. - subcategories (list of strings) --
The list of subcategory names.
Max characters =50
per subcategory
The name of each subcategory must be unique per category.