Skip to main content
POST
Cancel a batch

Authorizations

Authorization
string
header
required

OAuth 2.0 client_credentials grant (RFC 6749 §4.4) bound to a DPoP keypair (RFC 9449).

Flow (every authenticated /v1 call requires both an access token AND a fresh per-request DPoP proof):

  1. Register a credential via the merchant portal. Anton issues a client_id (ant_oc_<env>_<32hex>) and a client_secret (ant_ocs_<env>_<48hex>, shown ONCE). The portal generates an ES256 or Ed25519 DPoP keypair in your browser; you store the private half.
  2. Mint an access token: POST /oauth/token with Authorization: Basic <client_id:client_secret> and Content-Type: application/x-www-form-urlencoded. Body: grant_type=client_credentials. A DPoP header carrying a proof signed for the token endpoint is required (no ath claim on this proof).
  3. Use the token: send Authorization: DPoP <access_token> plus a fresh DPoP: <proof> header on every /v1 request. The proof JWT MUST carry htm (request method), htu (request URL, no query/fragment), iat (within ±60s), jti (unique within 5 min), and ath (SHA-256 of the access token, base64url).

Tokens expire in 1 hour in production / staging and 8 hours in sandbox. There are no refresh tokens — call /oauth/token again with your secret. Anton's public signing key is published at /.well-known/jwks.json.

OpenAPI 3.0 has no native DPoP scheme; this declaration plus dpopHeader together convey both the access-token Authorization and the per-request proof header.

DPoP
string
header
required

Per-request DPoP proof JWT (RFC 9449). MUST accompany the Authorization: DPoP <access_token> header on every protected operation. The proof is signed by the merchant's private DPoP key and carries htm, htu, iat, jti, and ath claims.

Path Parameters

id
string
required
Pattern: ^bat_[a-zA-Z0-9]+$

Response

Batch cancelled.

A batch upload. Moves through uploaded -> validating -> validated -> confirmed -> processing -> completed | partial | failed. Can be cancelled from any pre-processing state.

id
string
required
Pattern: ^bat_[a-zA-Z0-9]+$
Example:

"bat_01HX8Z9K0M2N3P4Q5R6S7T8UBT"

merchant_id
string
required
Pattern: ^mer_[a-zA-Z0-9]+$
uploaded_by
string
required

User ID of the operator who uploaded this batch.

status
enum<string>
required
Available options:
uploaded,
validating,
validated,
validation_failed,
confirmed,
processing,
completed,
partial,
failed,
cancelled
file_name
string
required
Example:

"payroll_2026_04_15.csv"

file_format
enum<string>
required
Available options:
csv,
xlsx
file_size
integer
required

Bytes.

created_at
string<date-time>
required

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"

updated_at
string<date-time>
required

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"

total_rows
integer
valid_rows
integer
invalid_rows
integer
warning_rows
integer
skipped_rows
integer
processed_rows
integer
summary
object

Validation summary the merchant reviews before confirming.

source_currency
string

Default funding currency used for rows that don't specify their own. Set at confirmation.

Pattern: ^[A-Z]{3}$
Example:

"USD"

total_amount
string

Aggregate destination-side amount across every valid row, populated during validation when all rows share a single destination currency. Absent for mixed-currency batches and legacy batches uploaded before the aggregate was materialized — callers should fall back to the per-currency breakdown in summary.estimated_debits.

Example:

"12345.67"

total_currency
string

Currency of total_amount. Absent for mixed-currency batches.

Pattern: ^[A-Z]{3}$
Example:

"USD"

current_row_index
integer

Resumability checkpoint — highest row index successfully processed.

expires_at
string<date-time>

Deadline for confirming a validated batch.

Example:

"2026-04-15T14:30:00Z"

confirmed_at
string<date-time>

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"

confirmed_by
string
cancelled_at
string<date-time>

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"

cancelled_by
string
processing_started_at
string<date-time>

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"

completed_at
string<date-time>

RFC 3339 / ISO 8601 timestamp in UTC.

Example:

"2026-04-15T14:30:00Z"