Operator API
Authenticated merchant details (currency, language, products)
get
/v1/merchantDetails of the authenticated merchant: code, operation currency, enabled products and brand (brand).
Authentication#
Request signed with HMAC-SHA256: headers X-Merchant-Id, X-Timestamp, X-Nonce and X-Signature. See Authentication.
Example#
# TALOS_API_HOST (without /v1), TALOS_MERCHANT and TALOS_SECRET are provided by 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' // signed client (see Authentication)
const res = await talos('GET', '/v1/merchant')
if (!res.success) throw new Error(`${res.error.code}: ${res.message}`)
console.log(res.data)Responses#
200Success
| Field | Description |
|---|---|
successtruerequired | — |
messagestringrequired | — |
statusCodenumberrequired | — |
dataobjectrequired | — |
data.codestringrequired | Merchant code (the same as the X-Merchant-Id header) |
data.namestringrequired | — |
data.currencystringrequired | Operation currency: a merchant operates in a single currency |
data.langstring | nullrequired | Merchant default language (used when the launch has no lang) |
data.products"slots" | "live"[]required | Enabled products |
data.wallet_configuredbooleanrequired | Whether the wallet callback (walletUrl) is configured |
data.brandstringrequired | Brand (merchant group code, the same in every currency) |
Response example
{
"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 | Code (error.code) |
|---|---|
| 401 | MISSING_AUTH_HEADERSINVALID_MERCHANTMERCHANT_BLOCKEDREQUEST_EXPIREDINVALID_SIGNATURENONCE_REUSEDIP_NOT_ALLOWED |
| 422 | Body or query does not match the schema |
| 429 | RATE_LIMITED |
| 503 | AUTH_UNAVAILABLE |
Error format and the meaning of each code in Errors.