API del operador
Datos del merchant autenticado (moneda, idioma, productos)
get
/v1/merchantDatos del merchant autenticado: código, moneda de la operación, productos habilitados y marca (brand).
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/merchant'
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/merchant')
if (!res.success) throw new Error(`${res.error.code}: ${res.message}`)
console.log(res.data)Respuestas#
200Éxito
| Campo | Descripción |
|---|---|
successtrueobligatorio | — |
messagestringobligatorio | — |
statusCodenumberobligatorio | — |
dataobjectobligatorio | — |
data.codestringobligatorio | Código del merchant (el mismo del encabezado X-Merchant-Id) |
data.namestringobligatorio | — |
data.currencystringobligatorio | Moneda de la operación: un merchant opera en una sola moneda |
data.langstring | nullobligatorio | Idioma predeterminado del merchant (se usa cuando el launch no envía lang) |
data.products"slots" | "live"[]obligatorio | Productos habilitados |
data.wallet_configuredbooleanobligatorio | Si el callback de billetera (walletUrl) está configurado |
data.brandstringobligatorio | Marca (código del grupo del merchant, la misma en todas las monedas) |
Ejemplo de respuesta
{
"success": true,
"message": "OK",
"statusCode": 200,
"data": {
"code": "minha-bet",
"name": "Minha Bet",
"currency": "BRL",
"lang": "pt",
"products": [
"slots"
],
"wallet_configured": true,
"brand": "minha-marca"
}
}| 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 |
| 503 | AUTH_UNAVAILABLE |
Formato de los errores y significado de cada código en Errores.