Skip to main content
POST
Upload files and plan a platform payouts run

Authorizations

Authorization
string
header
required

Authentication Method: HTTP Bearer token.

The runtime requires the literal Bearer prefix — a bare token in the Authorization header is rejected with 401 unauthorized.

Header Format: Authorization: Bearer YOUR_API_KEY

Your API key is a JWT. Live keys operate on live data (livemode: true); test keys operate on isolated test data (livemode: false).

Get your key at: app.gigstack.pro/settings?tab=api

Errors: credential failures are answered by the authentication layer with a raw { "message": … } body, not the standardized envelope — 401 for a missing, malformed or expired token, 403 for a revoked key or a plan without API access. See the Unauthorized and AuthForbidden responses.

Headers

Idempotency-Key
string
required

Your identifier for this upload, 8-128 characters of A-Z a-z 0-9 . _ : -. Checked before the files are read. Reusing it with the same files returns the run it first created; reusing it with different files is 409 idempotency_key_reused.

Required string length: 8 - 128
Pattern: ^[A-Za-z0-9._:-]{8,128}$

Body

multipart/form-data

The two files a run is built from. Each is read by its extension (the MIME type is ignored): .csv / .txt as comma-separated text, .xlsx / .xls / .xlsm as a workbook, of which only the first sheet is read. The first row is the header. Headers are matched ignoring case, accents and repeated spaces; extra columns are ignored.

movements_file
file
required

One row per payout to a provider. Max 5 MB, max 50,000 rows. Required columns: ID del proveedor, Nombre del proveedor, Correo electrónico, RFC, Fecha del movimiento (YYYY-MM-DD or DD/MM/YYYY), Tipo de movimiento (free text such as Pago semanal or Servicio), Subtotal (MXN, at least 0.01). Also accepted: Provider ID or Driver ID for the id; Nombre del conductor, Razón social or Nombre for the name (the more specific one wins when several are present); Correo or Email for the e-mail.

commissions_file
file
required

One row per provider per month with the platform commission. Max 5 MB, max 50,000 rows. Required columns: the same provider columns as the movements file (ID del proveedor, Nombre del proveedor, Correo electrónico, RFC, with the same alternatives), Mes (YYYY-MM) and Comisión (MXN). Comisión Total and a few legacy export spellings are also accepted for the amount.

Response

Retry of an earlier request with the same Idempotency-Key and the same file contents (or a run created before file fingerprints existed): the run it created, in whatever status it is now. Nothing is planned again. planning means the first request is still working; poll GET /platform-payouts/{id}.

Standardized success envelope emitted by sendSuccessResponse.

success
enum<boolean>
required
Available options:
true
Example:

true

data
object
required

A platform payouts run: the files it was planned from, the plan totals, and the stamping progress. Amounts are MXN in pesos (not cents). Timestamps are epoch milliseconds.

timestamp
integer<int64>
required

Server time in epoch milliseconds (Luxon.now().toMillis()).

Example:

1767225600000

message
string

Human-readable summary. Present only when the handler supplies one.

Example:

"Operation completed successfully"