Upsert a participant document
curl --request PUT \
--url https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"fileId": 456
}'import requests
url = "https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}"
payload = { "fileId": 456 }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileId: 456})
};
fetch('https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}', 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://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fileId' => 456
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}"
payload := strings.NewReader("{\n \"fileId\": 456\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fileId\": 456\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileId\": 456\n}"
response = http.request(request)
puts response.read_body{
"document": {
"documentId": "document_123",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"fileId": 456,
"status": "SUBMITTED"
},
"incorporationValidation": {
"isComplete": false,
"missingRequirements": [
{
"code": "PARTICIPANT_DOCUMENT_REQUIRED",
"path": "participants.participant_123.documents.PASSPORT_SCAN",
"message": "Participant participant_123 requires a PASSPORT_SCAN document",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"displayName": "Jane Founder"
}
],
"invalidRequirements": [
{
"code": "PARTICIPANT_DOCUMENT_REQUIRED",
"path": "participants.participant_123.documents.PASSPORT_SCAN",
"message": "Participant participant_123 requires a PASSPORT_SCAN document",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"displayName": "Jane Founder"
}
]
}
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}Documents
Upsert a participant document
Assign a customer-scoped Commenda file to one participant document slot. This request creates or replaces the typed participant document in one transaction without changing the reusable file. Repeating the request with the same fileId is safe.
PUT
/
partner
/
incorporation
/
{incorporationId}
/
participants
/
{participantId}
/
documents
/
{documentKind}
Upsert a participant document
curl --request PUT \
--url https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"fileId": 456
}'import requests
url = "https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}"
payload = { "fileId": 456 }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileId: 456})
};
fetch('https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}', 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://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fileId' => 456
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}"
payload := strings.NewReader("{\n \"fileId\": 456\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fileId\": 456\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileId\": 456\n}"
response = http.request(request)
puts response.read_body{
"document": {
"documentId": "document_123",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"fileId": 456,
"status": "SUBMITTED"
},
"incorporationValidation": {
"isComplete": false,
"missingRequirements": [
{
"code": "PARTICIPANT_DOCUMENT_REQUIRED",
"path": "participants.participant_123.documents.PASSPORT_SCAN",
"message": "Participant participant_123 requires a PASSPORT_SCAN document",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"displayName": "Jane Founder"
}
],
"invalidRequirements": [
{
"code": "PARTICIPANT_DOCUMENT_REQUIRED",
"path": "participants.participant_123.documents.PASSPORT_SCAN",
"message": "Participant participant_123 requires a PASSPORT_SCAN document",
"participantId": "participant_123",
"documentKind": "PASSPORT_SCAN",
"displayName": "Jane Founder"
}
]
}
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}Assigns a customer-scoped Commenda file to one participant document slot.
Use this endpoint after uploading a customer file with the Commenda OS Partner API. Commenda creates or replaces the typed participant document in one transaction without changing the reusable file. There is no separate file registration call.
If you are starting from a passport scan, utility bill, or other local file, first follow Upload files for incorporation to upload the file and get a
file.fileId.
The slot is replacement-based by participantId and documentKind. Calling this endpoint again with a different fileId replaces the file for that participant document. Calling it again with the same fileId is safe.
The documentKind path value comes from the incorporation requirements. Current values include PASSPORT_SCAN and UTILITY_BILL.
{
"fileId": 456
}
Authorizations
Path Parameters
Incorporation identifier returned by create or list endpoints.
Incorporation-specific participant identifier returned by register, list, or read endpoints.
Typed document requirement to satisfy for this participant. Type of document linked to an incorporation participant.
Available options:
PASSPORT_SCAN, UTILITY_BILL Body
application/json
Existing customer-scoped Commenda file id to assign to the participant document slot.
Example:
456
Was this page helpful?