Introduction
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Endpoints
获取认证详情
requires authentication
This endpoint allows users to fetch inquiry data from the Persona API by passing the inquiry ID as a URL parameter. It sends a GET request to the Persona API and returns the corresponding inquiry data.
Example request:
curl --request GET \
--get "https://kyc.rockflow.ai/fetch-inquiry/inq_123456789" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://kyc.rockflow.ai/fetch-inquiry/inq_123456789"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
// The actual response data from Persona API
}
}
Example response (500):
{
"error": "Unable to fetch data from Persona API",
"message": "Request exception message"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
下载认证报告
requires authentication
This endpoint allows authenticated users to download the inquiry report PDF for a given inquiry ID.
Example request:
curl --request GET \
--get "https://kyc.rockflow.ai/report/inq_Ehc2VLuRXqLirNK8Y1eiQyWxe" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://kyc.rockflow.ai/report/inq_Ehc2VLuRXqLirNK8Y1eiQyWxe"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
file The PDF file containing the inquiry report.
Example response (400):
{
"error": "Invalid inquiry ID"
}
Example response (401):
{
"error": "Unauthenticated."
Example response (500):
{
"error": "Unable to download report"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.