Update an insurance contract
curl --request PATCH \
--url https://thirdparty.qonto.com/v2/insurance_contracts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"insurance_contract": {
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/insurance_contracts/{id}"
payload = { "insurance_contract": {
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
} }
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({
insurance_contract: {
name: 'ProLiability Plan 2024',
contract_id: '12345',
origin: 'insurance_hub',
provider_slug: 'axa',
type: 'business_liability',
status: 'active',
troubleshooting_url: 'https://patner.com/troubleshoot',
service_url: 'https://partner.com/service',
expiration_date: '2025-12-31',
start_date: '2024-12-31',
renewal_date: '2025-12-31',
payment_frequency: 'month',
price: {value: '99.99', currency: 'EUR'}
}
})
};
fetch('https://thirdparty.qonto.com/v2/insurance_contracts/{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/insurance_contracts/{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([
'insurance_contract' => [
'name' => 'ProLiability Plan 2024',
'contract_id' => '12345',
'origin' => 'insurance_hub',
'provider_slug' => 'axa',
'type' => 'business_liability',
'status' => 'active',
'troubleshooting_url' => 'https://patner.com/troubleshoot',
'service_url' => 'https://partner.com/service',
'expiration_date' => '2025-12-31',
'start_date' => '2024-12-31',
'renewal_date' => '2025-12-31',
'payment_frequency' => 'month',
'price' => [
'value' => '99.99',
'currency' => 'EUR'
]
]
]),
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/insurance_contracts/{id}"
payload := strings.NewReader("{\n \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\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/insurance_contracts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/insurance_contracts/{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 \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"insurance_contract": {
"id": "888e4567-e89b-12d3-a456-426614174123",
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
}
}Insurance Contracts
Update an insurance contract
OAuth scope: insurance_contract.write
Updates the insurance contract identified by the id path parameter.
PATCH
/
v2
/
insurance_contracts
/
{id}
Update an insurance contract
curl --request PATCH \
--url https://thirdparty.qonto.com/v2/insurance_contracts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"insurance_contract": {
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/insurance_contracts/{id}"
payload = { "insurance_contract": {
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
} }
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({
insurance_contract: {
name: 'ProLiability Plan 2024',
contract_id: '12345',
origin: 'insurance_hub',
provider_slug: 'axa',
type: 'business_liability',
status: 'active',
troubleshooting_url: 'https://patner.com/troubleshoot',
service_url: 'https://partner.com/service',
expiration_date: '2025-12-31',
start_date: '2024-12-31',
renewal_date: '2025-12-31',
payment_frequency: 'month',
price: {value: '99.99', currency: 'EUR'}
}
})
};
fetch('https://thirdparty.qonto.com/v2/insurance_contracts/{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/insurance_contracts/{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([
'insurance_contract' => [
'name' => 'ProLiability Plan 2024',
'contract_id' => '12345',
'origin' => 'insurance_hub',
'provider_slug' => 'axa',
'type' => 'business_liability',
'status' => 'active',
'troubleshooting_url' => 'https://patner.com/troubleshoot',
'service_url' => 'https://partner.com/service',
'expiration_date' => '2025-12-31',
'start_date' => '2024-12-31',
'renewal_date' => '2025-12-31',
'payment_frequency' => 'month',
'price' => [
'value' => '99.99',
'currency' => 'EUR'
]
]
]),
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/insurance_contracts/{id}"
payload := strings.NewReader("{\n \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\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/insurance_contracts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/insurance_contracts/{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 \"insurance_contract\": {\n \"name\": \"ProLiability Plan 2024\",\n \"contract_id\": \"12345\",\n \"origin\": \"insurance_hub\",\n \"provider_slug\": \"axa\",\n \"type\": \"business_liability\",\n \"status\": \"active\",\n \"troubleshooting_url\": \"https://patner.com/troubleshoot\",\n \"service_url\": \"https://partner.com/service\",\n \"expiration_date\": \"2025-12-31\",\n \"start_date\": \"2024-12-31\",\n \"renewal_date\": \"2025-12-31\",\n \"payment_frequency\": \"month\",\n \"price\": {\n \"value\": \"99.99\",\n \"currency\": \"EUR\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"insurance_contract": {
"id": "888e4567-e89b-12d3-a456-426614174123",
"name": "ProLiability Plan 2024",
"contract_id": "12345",
"origin": "insurance_hub",
"provider_slug": "axa",
"type": "business_liability",
"status": "active",
"troubleshooting_url": "https://patner.com/troubleshoot",
"service_url": "https://partner.com/service",
"expiration_date": "2025-12-31",
"start_date": "2024-12-31",
"renewal_date": "2025-12-31",
"payment_frequency": "month",
"price": {
"value": "99.99",
"currency": "EUR"
}
}
}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 insurance contract to update
Body
application/json
JSON payload containing the fields to update.
Insurance contract data provided by Partner
Show child attributes
Show child attributes
Response
Returns the updated insurance contract.
Insurance contract data provided by Partner
Show child attributes
Show child attributes
Was this page helpful?
⌘I