Skip to main content
POST
/
api
/
v1
/
invoice_batches
Create invoice batch
curl --request POST \
  --url https://staging.app.yofacturo.es/api/v1/invoice_batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "invoice_batch": {
    "invoices": [
      {
        "external_invoice_id": "<string>",
        "issuer_nif": "<string>",
        "number_serie": "<string>",
        "issuer_name": "<string>",
        "invoice_type": "<string>",
        "operation_description": "<string>",
        "operation_date": "2023-12-25",
        "due_date": "2023-12-25",
        "rectified_invoice_id": 123,
        "has_unidentified_recipient": true,
        "recipient_legal_name": "<string>",
        "recipient_document_type": "<string>",
        "recipient_document_number": "<string>",
        "recipient_billing_address": "<string>",
        "recipient_billing_postal_code": "<string>",
        "recipient_billing_city": "<string>",
        "contact_id": 123,
        "invoiceable_serie_id": 123,
        "payment_method": "<string>",
        "payment_method_info": "<string>",
        "operation_type": "<string>",
        "recipient_country_code": "<string>",
        "footer_note": "<string>",
        "total_reimbursable_expenses_amount": 123,
        "paid": true,
        "lines": [
          {
            "position": 123,
            "concept": "<string>",
            "units": 123,
            "unit_price": 123,
            "discount_percent": 123,
            "notes": "<string>",
            "tax_type": "<string>",
            "tax_regime": "<string>",
            "tax_operation_key": "<string>",
            "tax_exemption_code": "<string>",
            "tax_rate": 123,
            "income_tax_withholding_rate": 123
          }
        ]
      }
    ],
    "external_batch_id": "<string>"
  }
}
'
{
  "data": {
    "id": 123,
    "external_batch_id": "batch-f4ac4fcf-2db2-4dc5-9f6b-9a0f9f38ec10",
    "status": "received",
    "invoices_count": 1,
    "received_at": "2026-03-26T10:30:00Z",
    "processed_at": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.yofacturo.es/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string<uuid>
required

UUID key used to make POST invoice_batches idempotent.

Body

application/json
invoice_batch
object
required

Response

Batch created. Response may include per-invoice validation errors for partial success.

data
object
required
errors
object

Map external_invoice_id to validation errors.