Get questions
Returns the list of questionnaire questions that must be completed when submitting the onboarding. Query this endpoint before building the body for Submit onboarding.
GET
/v1/questionsRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Not applicable: Path Parameters, Body.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Onboarding type. Allowed values: INDIVIDUAL, BUSINESS |
company | string | Yes | Company. Allowed values: ALLARIA, ALLARIAMAS |
Response
2XX Success
| Field | Type | Description |
|---|---|---|
text | string | Question text. Used as name in the questions array of Submit onboarding |
choices | array[string] | Available answer options |
Error Codes
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing token |
403 | Forbidden — unauthorized client |
422 | Validation Error — submitted parameters are invalid |
500 | Internal Server Error — internal server error |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET "https://b2b.allaria.dev/v1/questions?type=INDIVIDUAL&company=ALLARIA" \
-H "Authorization: Bearer ACCESS_TOKEN"
const params = new URLSearchParams({
type: 'INDIVIDUAL',
company: 'ALLARIA'
});
const response = await fetch(`https://b2b.allaria.dev/v1/questions?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://b2b.allaria.dev/v1/questions',
headers={
'Authorization': 'Bearer ACCESS_TOKEN'
},
params={
'type': 'INDIVIDUAL',
'company': 'ALLARIA'
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.get(
'https://b2b.allaria.dev/v1/questions',
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN'
},
params: {
type: 'INDIVIDUAL',
company: 'ALLARIA'
}
}
);
console.log(response.data);
2XX Success
[
{
"text": "¿Cuál es el origen de sus fondos?",
"choices": [
"Salario",
"Ahorro",
"Inversiones",
"Herencia",
"Otro"
]
},
{
"text": "¿Es una persona expuesta políticamente (PEP)?",
"choices": [
"Sí",
"No"
]
}
]