Get an onboarding
curl --request GET \
--url https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}"
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}', 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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}",
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}"
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}")
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{
"productCode": "stablecoin-fx-pe",
"productId": "stablecoin-fx",
"country": "PE",
"status": "incomplete",
"missing": [
"tax_id",
"proof_of_address",
"terms"
],
"requirements": [
{
"key": "tax_id",
"label": "Tax ID",
"kind": "field",
"required": true,
"received": true
}
],
"answers": {
"tax_id": "10456789012",
"occupation": "Consultant"
},
"documents": [
{
"type": "proof_of_address",
"fileName": "proof.pdf",
"uploadedAt": "2023-11-07T05:31:56Z"
}
],
"terms": {
"required": true,
"version": "6689343a7bf5dffb",
"url": "https://rio.trade/terms",
"label": "Stablecoin FX terms",
"text": "<string>",
"accepted": true,
"acceptedAt": "2023-11-07T05:31:56Z"
},
"verification": {
"link": "<string>",
"status": "pending"
},
"startedAt": "2023-11-07T05:31:56Z",
"submittedAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": 1,
"message": "User not found"
}
]
}Onboarding
Get an onboarding
The onboarding’s status (incomplete, submitted, approved or rejected), what is still missing, every requirement with whether it has been received, the answers and documents received, the terms and the verification. Poll it, or register a users webhook to be told when the status changes.
GET
/
api
/
users
/
{id}
/
onboarding
/
{productCode}
Get an onboarding
curl --request GET \
--url https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}"
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}', 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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}",
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}"
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://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/users/{id}/onboarding/{productCode}")
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{
"productCode": "stablecoin-fx-pe",
"productId": "stablecoin-fx",
"country": "PE",
"status": "incomplete",
"missing": [
"tax_id",
"proof_of_address",
"terms"
],
"requirements": [
{
"key": "tax_id",
"label": "Tax ID",
"kind": "field",
"required": true,
"received": true
}
],
"answers": {
"tax_id": "10456789012",
"occupation": "Consultant"
},
"documents": [
{
"type": "proof_of_address",
"fileName": "proof.pdf",
"uploadedAt": "2023-11-07T05:31:56Z"
}
],
"terms": {
"required": true,
"version": "6689343a7bf5dffb",
"url": "https://rio.trade/terms",
"label": "Stablecoin FX terms",
"text": "<string>",
"accepted": true,
"acceptedAt": "2023-11-07T05:31:56Z"
},
"verification": {
"link": "<string>",
"status": "pending"
},
"startedAt": "2023-11-07T05:31:56Z",
"submittedAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": 1,
"message": "User not found"
}
]
}Path Parameters
Response
OK
A user's onboarding for one product code.