curl --request POST \
--url https://thirdparty.qonto.com/v2/cash_flow_categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20"
}
'import requests
url = "https://thirdparty.qonto.com/v2/cash_flow_categories"
payload = {
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Suppliers', type: 'CATEGORY_TYPE_OUTFLOW', vat_rate: '20'})
};
fetch('https://thirdparty.qonto.com/v2/cash_flow_categories', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Suppliers',
'type' => 'CATEGORY_TYPE_OUTFLOW',
'vat_rate' => '20'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://thirdparty.qonto.com/v2/cash_flow_categories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/cash_flow_categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_category": {
"id": "3786f44c-a2e1-472e-870d-4cdb152b33fa",
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20",
"subcategories": []
}
}Create a cash flow category
Creates a new top-level cash flow category in the authenticated organization’s catalog.
curl --request POST \
--url https://thirdparty.qonto.com/v2/cash_flow_categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20"
}
'import requests
url = "https://thirdparty.qonto.com/v2/cash_flow_categories"
payload = {
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Suppliers', type: 'CATEGORY_TYPE_OUTFLOW', vat_rate: '20'})
};
fetch('https://thirdparty.qonto.com/v2/cash_flow_categories', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Suppliers',
'type' => 'CATEGORY_TYPE_OUTFLOW',
'vat_rate' => '20'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://thirdparty.qonto.com/v2/cash_flow_categories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/cash_flow_categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Suppliers\",\n \"type\": \"CATEGORY_TYPE_OUTFLOW\",\n \"vat_rate\": \"20\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_category": {
"id": "3786f44c-a2e1-472e-870d-4cdb152b33fa",
"name": "Suppliers",
"type": "CATEGORY_TYPE_OUTFLOW",
"vat_rate": "20",
"subcategories": []
}
}Scope:
cash_flow_category.write
The category’s color and icon are assigned automatically by Qonto and are not part of this contract. To add subcategories to the new category, use Create a cash flow subcategory.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.
Body
Display name of the new category. Must be non-empty.
Direction of the category:
CATEGORY_TYPE_INFLOW: money coming inCATEGORY_TYPE_OUTFLOW: money going out
CATEGORY_TYPE_INFLOW, CATEGORY_TYPE_OUTFLOW Deprecated. Optional VAT rate, as a decimal string (for example 20 or 5.5).
Response
Returns the created cash flow category. Its subcategories array is always empty.
A cash flow category. Categories carry a stable id that the
cashflow_category.id field on transactions refers to, letting you
reconcile categories against an external chart of accounts.
Show child attributes
Show child attributes
Was this page helpful?