Start an onboarding
curl --request POST \
--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.post(url, headers=headers)
print(response.text)const options = {method: 'POST', 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 => "POST",
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("POST", 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.post("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::Post.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": 2,
"message": "Invalid input data"
}
]
}{
"errors": [
{
"code": 1,
"message": "User not found"
}
]
}Onboarding
Start an onboarding
Opens the user’s onboarding for a product code (see GET /api/users/products). Calling it again for the same code changes nothing and returns the onboarding as it stands. The user’s one verification link serves this onboarding too.
POST
/
api
/
users
/
{id}
/
onboarding
/
{productCode}
Start an onboarding
curl --request POST \
--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.post(url, headers=headers)
print(response.text)const options = {method: 'POST', 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 => "POST",
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("POST", 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.post("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::Post.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": 2,
"message": "Invalid input data"
}
]
}{
"errors": [
{
"code": 1,
"message": "User not found"
}
]
}Path Parameters
Response
OK
A user's onboarding for one product code.