API del operador
Lista los proveedores disponibles
get
/v1/providersProveedores de los productos habilitados, con el conteo de juegos activos.
Autenticación#
Solicitud firmada con HMAC-SHA256: encabezados X-Merchant-Id, X-Timestamp, X-Nonce y X-Signature. Consulta Autenticación.
Ejemplo#
# TALOS_API_HOST (sin /v1), TALOS_MERCHANT y TALOS_SECRET los entrega TALOS
TS=$(($(date +%s) * 1000))
NONCE=$(openssl rand -hex 16)
REQ_PATH='/v1/providers'
BODY=''
SIG=$(printf '%s' "$TS.$NONCE.GET.$REQ_PATH.$BODY" | openssl dgst -sha256 -hmac "$TALOS_SECRET" | sed 's/^.* //')
curl -X GET "$TALOS_API_HOST$REQ_PATH" \
-H "X-Merchant-Id: $TALOS_MERCHANT" \
-H "X-Timestamp: $TS" \
-H "X-Nonce: $NONCE" \
-H "X-Signature: $SIG"import { talos } from './talos' // cliente firmado (ver Autenticación)
const res = await talos('GET', '/v1/providers')
if (!res.success) throw new Error(`${res.error.code}: ${res.message}`)
console.log(res.data)Respuestas#
200Éxito
| Campo | Descripción |
|---|---|
successtrueobligatorio | — |
messagestringobligatorio | — |
statusCodenumberobligatorio | — |
dataobject[]obligatorio | — |
data[].codestringobligatorio | — |
data[].namestringobligatorio | — |
data[].type"slot" | "live"obligatorio | — |
data[].gamesnumberobligatorio | Juegos activos del proveedor |
Ejemplo de respuesta
{
"success": true,
"message": "OK",
"statusCode": 200,
"data": [
{
"code": "minha-bet",
"name": "Minha Bet",
"type": "slot",
"games": 0
}
]
}| HTTP | Código (error.code) |
|---|---|
| 401 | MISSING_AUTH_HEADERSINVALID_MERCHANTMERCHANT_BLOCKEDREQUEST_EXPIREDINVALID_SIGNATURENONCE_REUSEDIP_NOT_ALLOWED |
| 422 | Cuerpo o query fuera del schema |
| 429 | RATE_LIMITED |
| 500 | LIST_PROVIDERS_FAILED |
| 503 | AUTH_UNAVAILABLE |
Formato de los errores y significado de cada código en Errores.