curl --request POST \
--url https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'Qonto-Partner-Id: <api-key>' \
--form file='@example-file' \
--form file_type=organization-deposit-certificate \
--form stakeholder_id=a3818b4d-4240-4098-bae4-87124b5add31import requests
url = "https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"file_type": "organization-deposit-certificate",
"stakeholder_id": "a3818b4d-4240-4098-bae4-87124b5add31"
}
headers = {
"Authorization": "Bearer <token>",
"Qonto-Partner-Id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('file_type', 'organization-deposit-certificate');
form.append('stakeholder_id', 'a3818b4d-4240-4098-bae4-87124b5add31');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Qonto-Partner-Id': '<api-key>'}
};
options.body = form;
fetch('https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files', 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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"Qonto-Partner-Id: <api-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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Qonto-Partner-Id", "<api-key>")
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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files")
.header("Authorization", "Bearer <token>")
.header("Qonto-Partner-Id", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Qonto-Partner-Id"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"registration_file": {
"id": "d7344200-97d7-44b7-8fc5-9e5fb2f8831b",
"filename": "document.pdf",
"filesize_bytes": 981723,
"url": "https://example-s3-url",
"created_at": "2021-08-17T12:31:32.689Z",
"file_type": "organization-deposit-certificate",
"stakeholder_id": "<string>"
}
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "unauthorized",
"detail": "You must authenticate to perform API requests"
}
]
}{
"errors": [
{
"code": "not_found",
"detail": "The record identified by <uuid> could not be found."
}
]
}{
"errors": [
{
"code": "<error-code>",
"detail": "<relevant-detail>",
"source": {
"pointer": "<ie /data/attributes/attr_name>"
}
}
]
}Create a file
Creates a single file for the authenticated partner. For details on file upload restrictions and limitations, please refer to the File Uploads documentation.
Supported only for registrations in company creation flow (legal_flow = company_creation).
curl --request POST \
--url https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'Qonto-Partner-Id: <api-key>' \
--form file='@example-file' \
--form file_type=organization-deposit-certificate \
--form stakeholder_id=a3818b4d-4240-4098-bae4-87124b5add31import requests
url = "https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"file_type": "organization-deposit-certificate",
"stakeholder_id": "a3818b4d-4240-4098-bae4-87124b5add31"
}
headers = {
"Authorization": "Bearer <token>",
"Qonto-Partner-Id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('file_type', 'organization-deposit-certificate');
form.append('stakeholder_id', 'a3818b4d-4240-4098-bae4-87124b5add31');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Qonto-Partner-Id': '<api-key>'}
};
options.body = form;
fetch('https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files', 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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"Qonto-Partner-Id: <api-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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Qonto-Partner-Id", "<api-key>")
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-sandbox.staging.qonto.co/register/registrations/{registrationId}/files")
.header("Authorization", "Bearer <token>")
.header("Qonto-Partner-Id", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty-sandbox.staging.qonto.co/register/registrations/{registrationId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Qonto-Partner-Id"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\norganization-deposit-certificate\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"stakeholder_id\"\r\n\r\na3818b4d-4240-4098-bae4-87124b5add31\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"registration_file": {
"id": "d7344200-97d7-44b7-8fc5-9e5fb2f8831b",
"filename": "document.pdf",
"filesize_bytes": 981723,
"url": "https://example-s3-url",
"created_at": "2021-08-17T12:31:32.689Z",
"file_type": "organization-deposit-certificate",
"stakeholder_id": "<string>"
}
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "unauthorized",
"detail": "You must authenticate to perform API requests"
}
]
}{
"errors": [
{
"code": "not_found",
"detail": "The record identified by <uuid> could not be found."
}
]
}{
"errors": [
{
"code": "<error-code>",
"detail": "<relevant-detail>",
"source": {
"pointer": "<ie /data/attributes/attr_name>"
}
}
]
}Authorizations
Bearer authorization header: Bearer <token>.
To get your <token>, please sign up to the Developer Portal.
API Key authorization header: Qonto-Partner-Id: <partner_id>.
To get your <partner_id> please, sign up to the Developer Portal.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Path Parameters
id of the Registration resource
Body
You have to specify multipart form data in order to attach the file to the request.
organization-deposit-certificate, organization-proof-of-address, organization-by-laws, organization-kbis, organization-registration-application-proof, organization-capital-deposit-statement, organization-partnership-agreement, organization-power-of-attorney, stakeholder-proof-of-identity, stakeholder-residence-permit "organization-deposit-certificate"
Only applicable to and required for stakeholder-proof-of-identity and stakeholder-residence-permit file types.
"a3818b4d-4240-4098-bae4-87124b5add31"
Response
Returns the file created.
Show child attributes
Show child attributes
Was this page helpful?