Tikin · Docs
API ReferenceServicesBonuses

Subir un lote de bonos

POST
/v1/bonus_batches

El caso masivo, en tres actos — dispersar a cientos no debe ser un solo click:

  1. Subir (este endpoint): el archivo se valida fila por fila; el lote nace validating y pasa a ready o rejected.
  2. Revisar: GET /v1/bonus_batches/{id} — filas, total, errores.
  3. Disparar: POST /v1/bonus_batches/{id}/execute — recién ahí sale dinero.

La Idempotency-Key cubre el cuerpo COMPLETO, incluidos los bytes del archivo: la misma llave con otro archivo es 409.

Authorization

tenantToken
AuthorizationBearer <token>

Tu token de tenant: tk_live_…. El entorno sandbox llega pronto; los tokens tk_test_ quedarán reservados para él. Scopes: read, lookup, transfers, bonuses, payouts, webhooks. Usa el mínimo.

In: header

Header Parameters

Idempotency-Key*string

UUID tuyo. Reintentar con la misma llave es el MISMO pedido (200 en vez de 201, y la respuesta trae el header Idempotent-Replay: true para que tu observabilidad distinga el replay del original); la misma llave con otro cuerpo — bytes de archivos incluidos — es 409.

Formatuuid

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/bonus_batches" \  -H "Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -F file="string" \  -F source_account="0b96a69a-83bf-4bb3-9b52-1bfb05c01fa0"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "validating",  "source_account": "0b96a69a-83bf-4bb3-9b52-1bfb05c01fa0",  "rows": 0,  "rows_rejected": 0,  "total": {    "raw": "string",    "asset": "COPM"  },  "description": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}