curl --request PATCH \
--url https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Conservative growth"
}
'import requests
url = "https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{id}"
payload = { "name": "Conservative growth" }
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: 'Conservative growth'})
};
fetch('https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{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/v1/thirdparty/cash_flow_scenarios/{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' => 'Conservative growth'
]),
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/v1/thirdparty/cash_flow_scenarios/{id}"
payload := strings.NewReader("{\n \"name\": \"Conservative growth\"\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/v1/thirdparty/cash_flow_scenarios/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Conservative growth\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{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\": \"Conservative growth\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_scenario": {
"id": "6c1e9a72-4d3b-4f8e-8a1c-2b6d7e9f0a3b",
"name": "Conservative growth",
"color": "SCENARIO_COLOR_PURPLE",
"parent_id": "019259fb-8731-767a-b8fd-9206aa052e3d",
"is_main": false
}
}Update a cash flow scenario
OAuth scope: cash_flow_category.write
Updates the name and/or color of the cash flow scenario identified by id. Only the fields provided in the request body are modified; omitted fields are left unchanged. Reparenting a scenario is not supported.
curl --request PATCH \
--url https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Conservative growth"
}
'import requests
url = "https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{id}"
payload = { "name": "Conservative growth" }
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: 'Conservative growth'})
};
fetch('https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{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/v1/thirdparty/cash_flow_scenarios/{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' => 'Conservative growth'
]),
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/v1/thirdparty/cash_flow_scenarios/{id}"
payload := strings.NewReader("{\n \"name\": \"Conservative growth\"\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/v1/thirdparty/cash_flow_scenarios/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Conservative growth\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v1/thirdparty/cash_flow_scenarios/{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\": \"Conservative growth\"\n}"
response = http.request(request)
puts response.read_body{
"cash_flow_scenario": {
"id": "6c1e9a72-4d3b-4f8e-8a1c-2b6d7e9f0a3b",
"name": "Conservative growth",
"color": "SCENARIO_COLOR_PURPLE",
"parent_id": "019259fb-8731-767a-b8fd-9206aa052e3d",
"is_main": false
}
}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
UUID of the cash flow scenario.
"6c1e9a72-4d3b-4f8e-8a1c-2b6d7e9f0a3b"
Body
New display name. Must be non-empty and unique for the organization when provided.
New color key used to display the scenario. SCENARIO_COLOR_GREY is reserved for the main scenario and cannot be assigned here.
SCENARIO_COLOR_ORANGE, SCENARIO_COLOR_GREEN, SCENARIO_COLOR_RED, SCENARIO_COLOR_PURPLE, SCENARIO_COLOR_CYAN, SCENARIO_COLOR_YELLOW, SCENARIO_COLOR_PEACH, SCENARIO_COLOR_PURPLE_LIGHT, SCENARIO_COLOR_PINK Response
Returns the updated cash flow scenario.
A cash flow scenario. Scenarios group per-category monthly targets under a
named projection. Every organization has exactly one main scenario
(is_main: true), which cannot be deleted. Additional scenarios can be
created, updated, and deleted.
Show child attributes
Show child attributes
Was this page helpful?