curl --request GET \
--url https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}', 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-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "c5fdf2e4-1b9b-6108-aece-69991d5h4905",
"onboarding_document_id": "7d3b9a1e-2f4c-4e8a-9b1d-5c6e7f8a9b0c",
"type": "CNH_DIGITAL",
"file_type": "CNH_FRONT",
"file_name": "CNH_FRONT_a1b2c3d4.pdf",
"content_type": "application/pdf",
"file_size_bytes": 125430,
"created_at": "2023-06-15T14:30:00.000Z",
"download_url": "https://storage.rinne.com.br/bucket/path/to/file?signature=...",
"download_url_expires_at": "2023-06-15T15:30:00.000Z"
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Authentication required to access this resource",
"status": 401,
"details": {
"reason": "Invalid API key"
},
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Company with ID '123' not found",
"status": 404,
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"status": 500,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Get onboarding document with download URL
Retrieves a single onboarding document with a signed download URL for an affiliation belonging to the authenticated company. The signed URL expires after 1 hour. Use this endpoint to download onboarding documents that were uploaded during the KYC/onboarding process.
curl --request GET \
--url https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}', 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-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/affiliations/{affiliationId}/onboarding-documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "c5fdf2e4-1b9b-6108-aece-69991d5h4905",
"onboarding_document_id": "7d3b9a1e-2f4c-4e8a-9b1d-5c6e7f8a9b0c",
"type": "CNH_DIGITAL",
"file_type": "CNH_FRONT",
"file_name": "CNH_FRONT_a1b2c3d4.pdf",
"content_type": "application/pdf",
"file_size_bytes": 125430,
"created_at": "2023-06-15T14:30:00.000Z",
"download_url": "https://storage.rinne.com.br/bucket/path/to/file?signature=...",
"download_url_expires_at": "2023-06-15T15:30:00.000Z"
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Authentication required to access this resource",
"status": 401,
"details": {
"reason": "Invalid API key"
},
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Company with ID '123' not found",
"status": 404,
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"status": 500,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Authorizations
Company API key for authentication
Path Parameters
The affiliation ID
The onboarding document ID
Response
Onboarding document with signed download URL
A document an affiliation sent, with a signed download URL
This send of the document to the affiliation's provider, not the document's own id
(onboarding_document_id). GET /v1/affiliations/{affiliationId}/onboarding-documents/{documentId} (and its
/v1/merchants/{merchantId} twin) accepts either this id or the onboarding_document_id.
"c5fdf2e4-1b9b-6108-aece-69991d5h4905"
The document sent, as the company's onboarding documents list it (GET /v1/onboarding-documents,
or its /v1/merchants/{merchantId} twin); several affiliations that sent one document share it
"7d3b9a1e-2f4c-4e8a-9b1d-5c6e7f8a9b0c"
The document's type in Rinne's vocabulary; file_type is the name the provider received
CNH_FRONT, CNH_BACK, CNH_DIGITAL, RG_FRONT, RG_BACK, RNE_FRONT, RNE_BACK, RNM_FRONT, RNM_BACK, ID_DOCUMENT_FRONT, ID_DOCUMENT_BACK, SELFIE, ARTICLES_OF_INCORPORATION, POWER_OF_ATTORNEY, PROOF_OF_ADDRESS, PROOF_OF_INCOME, FINANCIAL_STATEMENT, OTHER "CNH_DIGITAL"
The document's type as the provider received it (e.g., CNH_FRONT, SELFIE, CONTRATO_SOCIAL)
"CNH_FRONT"
Generated filename in storage; empty for another organization's file shared with this one, which exposes nothing of it
"CNH_FRONT_a1b2c3d4.pdf"
MIME type of the document; null for another organization's shared file
"application/pdf"
File size in bytes; null for another organization's shared file
125430
When the document was stored
"2023-06-15T14:30:00.000Z"
Signed URL for downloading the document (expires after 1 hour)
"https://storage.rinne.com.br/bucket/path/to/file?signature=..."
When the download URL expires
"2023-06-15T15:30:00.000Z"

