Verificar si la cuenta puede operar
Verifica si una cuenta determinada está actualmente habilitada para operar.
GET
/v1/broker/operations/is-allowed/{account-id}Request
Headers
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
Authorization | string | Sí | Token de acceso en formato Bearer ACCESS_TOKEN |
Path Parameters
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
account-id | integer | Sí | Número de cuenta a verificar. |
No aplica: Query Parameters, Body.
Response
2XX Éxito
| Campo | Tipo | Descripción |
|---|---|---|
account_id | integer | Número de cuenta que fue verificado. |
allowed | boolean | Indica si la cuenta está actualmente habilitada para operar. |
Códigos de error
| Status | Descripción |
|---|---|
401 | Unauthorized — token de acceso inválido o faltante |
403 | Forbidden — el token no tiene permiso para acceder a este recurso |
500 | Internal Server Error |
Estructura del error:
{
"code": "INTERNAL_ERROR",
"description": "An unexpected error occurred"
}
Ejemplo de código
- cURL
- JavaScript
- Python
- Node.js
curl -X GET https://b2b.allaria.dev/v1/broker/operations/is-allowed/70104 \
-H "Authorization: Bearer ACCESS_TOKEN"
const accountId = 70104;
const response = await fetch(
`https://b2b.allaria.dev/v1/broker/operations/is-allowed/${accountId}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' }
}
);
const data = await response.json();
console.log(data);
import requests
account_id = 70104
response = requests.get(
f'https://b2b.allaria.dev/v1/broker/operations/is-allowed/{account_id}',
headers={ 'Authorization': 'Bearer ACCESS_TOKEN' }
)
data = response.json()
print(data)
const axios = require('axios');
const accountId = 70104;
const response = await axios.get(
`https://b2b.allaria.dev/v1/broker/operations/is-allowed/${accountId}`,
{ headers: { Authorization: 'Bearer ACCESS_TOKEN' } }
);
console.log(response.data);
2XX Éxito
{
"account_id": 70104,
"allowed": true
}