curl --request PATCH \
--url https://thirdparty.qonto.com/v2/cash_flow_categories/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW"
}
'import requests
url = "https://thirdparty.qonto.com/v2/cash_flow_categories/{id}"
payload = {
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Cloud services', type: 'CATEGORY_TYPE_OUTFLOW'})
};
fetch('https://thirdparty.qonto.com/v2/cash_flow_categories/{id}', 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://thirdparty.qonto.com/v2/cash_flow_categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Cloud services',
'type' => 'CATEGORY_TYPE_OUTFLOW'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/cash_flow_categories/{id}"
payload := strings.NewReader("{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://thirdparty.qonto.com/v2/cash_flow_categories/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/cash_flow_categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_category": {
"id": "3786f44c-a2e1-472e-870d-4cdb152b33fa",
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW",
"subcategories": []
}
}Update a cash flow category
OAuth scope: cash_flow_category.write
Updates a category or subcategory in the authenticated organization’s catalog. Only fields included in the request body are changed. The type field applies only to top-level categories and is ignored for subcategories. Default categories cannot be edited.
The request fails with invalid_id for a malformed ID, empty_name or name_too_long for an invalid name, invalid_type for an unsupported category direction, name_already_used when the name already exists, or default_category_not_editable for a default category. It returns category_not_found when the ID does not belong to the authenticated organization.
curl --request PATCH \
--url https://thirdparty.qonto.com/v2/cash_flow_categories/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW"
}
'import requests
url = "https://thirdparty.qonto.com/v2/cash_flow_categories/{id}"
payload = {
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Cloud services', type: 'CATEGORY_TYPE_OUTFLOW'})
};
fetch('https://thirdparty.qonto.com/v2/cash_flow_categories/{id}', 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://thirdparty.qonto.com/v2/cash_flow_categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Cloud services',
'type' => 'CATEGORY_TYPE_OUTFLOW'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/cash_flow_categories/{id}"
payload := strings.NewReader("{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://thirdparty.qonto.com/v2/cash_flow_categories/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/cash_flow_categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Cloud services\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_category": {
"id": "3786f44c-a2e1-472e-870d-4cdb152b33fa",
"name": "Cloud services",
"type": "CATEGORY_TYPE_OUTFLOW",
"subcategories": []
}
}Authorizations
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Path Parameters
ID of the category or subcategory to update
Body
New display name. Must be non-empty and within the category name length limit.
New direction for a top-level category. Ignored for subcategories.
CATEGORY_TYPE_INFLOW: money coming inCATEGORY_TYPE_OUTFLOW: money going out
CATEGORY_TYPE_INFLOW, CATEGORY_TYPE_OUTFLOW Response
Returns the updated category or subcategory.
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?