curl --request PUT \
--url https://api.exowpee.com/v1/catalog/categories/{category} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/categories/{category}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/categories/{category}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/categories/{category}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/categories/{category}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/categories/{category}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/categories/{category}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"image_url": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>",
"vat_rate_id": "<string>",
"vat_rate": {},
"taxes": "<array>",
"is_taxable": true
}{
"message": "<string>",
"errors": {}
}Edit a category
Changes a category’s title, order, image or tax settings.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/categories/{category} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/categories/{category}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/categories/{category}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/categories/{category}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/categories/{category}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/categories/{category}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/categories/{category}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"handle": "<string>",
"title": "<string>",
"image_url": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>",
"vat_rate_id": "<string>",
"vat_rate": {},
"taxes": "<array>",
"is_taxable": true
}{
"message": "<string>",
"errors": {}
}categories.update
Conditions
- When is_taxable or vat_rate_id is sent, the caller also needs the category_taxes.update permission. tax_ids is not accepted here and is ignored; additional taxes are set with the category taxes action.
- The handle must stay unique within the organization (the category’s own handle does not conflict).
- On update every field is optional; omitted fields keep their stored value.
- A tax change is refused when it would make a stored price of an item of this category impossible to calculate that could be calculated before.
- The vat_rate_id rule is the same as on creation.
- When an image is sent it replaces the previous one; the previous file is deleted after the change is committed.
- A change of is_taxable or vat_rate_id rewrites the category’s tax configuration for the current fiscal profile, which changes how items inheriting from the category are taxed; the list of additional taxes is left as it is.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the category (27-character KSUID string).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: vat_rate_id, is_taxable, id, handle, title, image_url, sort_order, created_at, updated_at, organization_id.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: vat_rate, taxes.
Response
Resource (only with response=resource).
Identifier of the category (27-character KSUID string).
URL-friendly identifier of the category, unique within the organization. Generated from the title (with a numeric suffix on conflict) when not sent at creation.
Display name of the category.
Public URL of the category image; null when the category has no image.
Display position of the category; lower values come first.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Identifier of the organization the record belongs to.
Identifier of the VAT rate set on the category for the company's current fiscal profile; null when none is set or no configuration exists.
VAT rate object (id, country_code, fiscal_status, name, code, rate, treatment, is_default, is_active). Only returned when selected with ?include=vat_rate.
Additional taxes applied to items of this category, in the order they are applied. Only returned when selected with ?include=taxes.
Whether items of this category are taxed in the company's current fiscal profile. null when no tax configuration exists yet for that profile (items are then treated as untaxed and unconfigured).