Send a batch of documents

post
https://api.wafeq.com/ae/v1/batches

Send up to 500 documents of one taxpayer in one call.

Wafeq e-invoicing ASP accepts the batch at once, then handles each document in
the background as its own queued submission (Prefer: respond-async) under its
own Idempotency-Key: the same checks, billing, delivery, FTA report and
webhooks, and the same answer. A document that fails its checks doesn't stop
the others.

Follow the batch with GET /batches/{batch_id} or the batch.completed
webhook, then read each document's answer with GET /batches/{batch_id}/items.
A refusal of the whole batch keeps nothing: send the same batch again with the
same key. Live mode needs an active subscription, and enough document credits
for the batch's new documents. Sandbox is free.

Body Params
documentsarray of objectsrequiredlength between 1 and 500

1 to 500 documents of the taxpayer, of any of the four types. Each document needs its own key and its own number.

Headers
stringrequiredlength between 1 and 128

The batch's own key. After a timeout, send the same batch again with the same key: you get the batch as it is now, and nothing is sent twice. A different batch with this key gets 409.

string | null
stringrequired

Taxpayer ID (txpay_…). Required with an organization API key (pk_…) for this taxpayer-specific operation, even for one taxpayer. Not a TIN. Optional with a taxpayer access token, which already names its taxpayer.

string | null

Grant ID (tgr_…) to act through, with an organization API key. The request then has exactly that grant's scopes and fails once the grant is revoked. Without it, the key acts through all of the organization's active grants on the taxpayer.

Response
idempotency_key_reused).