curl --request POST \
--url https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>' \
--data '
{
"declined_note": "Contact your manager please"
}
'import requests
url = "https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline"
payload = { "declined_note": "Contact your manager please" }
headers = {
"X-Qonto-Idempotency-Key": "<x-qonto-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Qonto-Idempotency-Key': '<x-qonto-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({declined_note: 'Contact your manager please'})
};
fetch('https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline', 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/requests/{request_type}/{id}/decline",
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([
'declined_note' => 'Contact your manager please'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>"
],
]);
$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/requests/{request_type}/{id}/decline"
payload := strings.NewReader("{\n \"declined_note\": \"Contact your manager please\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qonto-Idempotency-Key", "<x-qonto-idempotency-key>")
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/requests/{request_type}/{id}/decline")
.header("X-Qonto-Idempotency-Key", "<x-qonto-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declined_note\": \"Contact your manager please\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qonto-Idempotency-Key"] = '<x-qonto-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"declined_note\": \"Contact your manager please\"\n}"
response = http.request(request)
puts response.read_body{
"request_virtual_card": {
"id": "be160c90-058e-487a-b775-5b5cad3992aa",
"request_type": "virtual_card",
"initiator_id": "8fdb86eb-8e49-4be8-ab60-658b680629af",
"approver_id": null,
"note": "personal needs",
"declined_note": "Contact your manager please",
"status": "declined",
"payment_monthly_limit": "500.00",
"currency": "EUR",
"processed_at": null,
"created_at": "2021-10-11T14:28:28Z"
}
}Decline a request
OAuth scope: request_review.write
Declines the pending request identified by the id path parameter. This request will change status from status = pending to status = declined.
You can get the list of all the requests via the GET /v2/requests endpoint.
In the Qonto web-ap, requests can be listed and declined in the “Requests” tab.
curl --request POST \
--url https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>' \
--data '
{
"declined_note": "Contact your manager please"
}
'import requests
url = "https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline"
payload = { "declined_note": "Contact your manager please" }
headers = {
"X-Qonto-Idempotency-Key": "<x-qonto-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Qonto-Idempotency-Key': '<x-qonto-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({declined_note: 'Contact your manager please'})
};
fetch('https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline', 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/requests/{request_type}/{id}/decline",
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([
'declined_note' => 'Contact your manager please'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>"
],
]);
$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/requests/{request_type}/{id}/decline"
payload := strings.NewReader("{\n \"declined_note\": \"Contact your manager please\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qonto-Idempotency-Key", "<x-qonto-idempotency-key>")
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/requests/{request_type}/{id}/decline")
.header("X-Qonto-Idempotency-Key", "<x-qonto-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declined_note\": \"Contact your manager please\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/requests/{request_type}/{id}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qonto-Idempotency-Key"] = '<x-qonto-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"declined_note\": \"Contact your manager please\"\n}"
response = http.request(request)
puts response.read_body{
"request_virtual_card": {
"id": "be160c90-058e-487a-b775-5b5cad3992aa",
"request_type": "virtual_card",
"initiator_id": "8fdb86eb-8e49-4be8-ab60-658b680629af",
"approver_id": null,
"note": "personal needs",
"declined_note": "Contact your manager please",
"status": "declined",
"payment_monthly_limit": "500.00",
"currency": "EUR",
"processed_at": null,
"created_at": "2021-10-11T14:28:28Z"
}
}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.
Learn more in Idempotent Requests.
"123e4567-e89b-12d3-a456-426614174000"
Path Parameters
UUID of the request to be processed.
Type of a request to be declined.
flash_cards, virtual_cards, transfers, multi_transfers Body
"Contact your manager please"
Response
Returns the declined request.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Was this page helpful?