Create an insurance contract
curl --request POST \
--url https://thirdparty.qonto.com/v2/insurance_contracts \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("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/insurance_contracts")
.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")
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 \"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
Create an insurance contract
OAuth scope: insurance_contract.write
Creates a single insurance contract for the authenticated organization. This endpoint supports various types of insurance contracts, and includes critical information, such as the policy provider, pricing, and current status.
POST
/
v2
/
insurance_contracts
Create an insurance contract
curl --request POST \
--url https://thirdparty.qonto.com/v2/insurance_contracts \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("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/insurance_contracts")
.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")
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 \"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.
Body
application/json
Insurance contract data provided by Partner
Show child attributes
Show child attributes
Response
Returns the insurance contract created.
Insurance contract data provided by Partner
Show child attributes
Show child attributes
Was this page helpful?
⌘I