InvoicingIssue new invoice V2 (e-invoice aware)

Issue new invoice V2 (e-invoice aware)

Issues a new invoice. organizationId identifies the organization - unlike v1 it is not the company identification number (ICO). The v1 endpoint is unchanged. invoiceCreationMode selects what the call creates: PDF (classic numbered invoice only), EINVOICE_DRAFT (Peppol draft without a number, finalize later via POST /v2/documents/invoice-finalize) or EINVOICE_FINALIZE_AND_SEND (draft, finalize and send over Peppol in one call - the response then contains deliveryId). When no mode is sent the organization defaults decide. From 2027-01-01 the e-invoice path is mandatory and the mode is ignored. VAT regime: invoice-level taxCategoryCode plus per-item taxCategoryCode / taxRuleReason (a line code overrides the invoice code, so one document can mix a standard-rated line with a reverse-charge / exempt line) and per-item additionalProperties. Lines of one VAT category + rate share a single TaxSubtotal: its exemption reason is the first line reason and a differing per-line reason is repeated on the line as a BIS additional item property (BT-127). A VAT payer 0 % line needs a category (e.g. AE, E, K, Z, G). A plain PDF issuance allows an undeclared 0 % rate. The response contains documentId, invoiceNumber, issueMode, peppolStatus and deliveryId (after send).

curl -X POST "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-issue" \
  -H "Content-Type: application/json" \
  -H "api_key: YOUR_API_KEY" \
  -d '{
  "data": {
    "organizationId": "example_string",
    "type": "issued_invoice",
    "issueDate": "2024-12-25",
    "dueDate": "2024-12-25",
    "deliveryDate": "2024-12-25",
    "taxPointDate": "2024-12-25",
    "number": "example_string",
    "originalNumber": "example_string",
    "emailRecipients": [
      "user@example.com"
    ],
    "orderReference": "example_string",
    "customerReference": "example_string",
    "telephoneNumber": "+1-555-0123",
    "email": "user@example.com",
    "website": "example_string",
    "reverseCharge": true,
    "accountingSettings": {
      "numericCodeId": "example_string",
      "expenditureCenterId": "example_string",
      "accountingItemId": "example_string",
      "cashRegisterId": "example_string",
      "projectId": "example_string",
      "activityId": "example_string",
      "approvalProcessId": "example_string",
      "orderId": "example_string",
      "classificationVatId": "example_string",
      "classificationKvVatId": "example_string",
      "accountingSoftwareAgendaId": "example_string",
      "debitAccountingAccountId": "example_string"
    },
    "taxCategoryCode": "S",
    "customVatReverseChargeText": "example_string",
    "items": [
      {
        "name": "John Doe",
        "unitPriceWithoutVat": 29.99,
        "vatRate": 3.14,
        "quantity": 3.14,
        "unit": "example_string",
        "note": "example_string",
        "debitAccountingAccountId": "example_string",
        "accountingItemId": "example_string",
        "expenditureCenterId": "example_string",
        "orderId": "example_string",
        "activityId": "example_string",
        "skuCode": "example_string",
        "ossServiceType": "BA",
        "discount": {
          "discountPercent": 10
        },
        "itemType": "advance_payment",
        "isTaxExempt": true,
        "isReverseCharge": true,
        "additionalProperties": {},
        "unitPriceWithVat": 29.99,
        "totalPriceWithVat": 29.99,
        "taxRuleReason": "example_string",
        "vatexCode": "VATEX-EU-AE",
        "taxCategoryCode": "S"
      }
    ],
    "customer": {
      "ico": "example_string",
      "icDph": "example_string",
      "name": "John Doe",
      "taxIdentificationNumber": "example_string",
      "vatPayer": true,
      "streetName": "John Doe",
      "propertyRegistrationNumber": "example_string",
      "postalCode": "example_string",
      "buildingNumber": "example_string",
      "municipality": "example_string",
      "country": "USA",
      "countryCode": "USA",
      "contactEmail": "user@example.com",
      "nonCorporateEntity": true,
      "registerNumberText": "example_string",
      "vatRegistrationType": "§4",
      "deliveryAddress": {},
      "paymentIban": "example_string"
    },
    "paymentInfo": {
      "iban": "example_string",
      "variableSymbol": "example_string"
    },
    "note": "example_string",
    "noteAboveItems": "example_string",
    "language": "english",
    "currency": "example_string",
    "paid": true,
    "ossSettings": {
      "countryCode": "de",
      "ossEvidentaryResource": "A",
      "ossServiceType": "BA"
    },
    "paymentType": "transfer",
    "discount": {
      "discountPercent": 3.14
    },
    "internalNote": "example_string",
    "servesAsDeliveryNote": true,
    "invoiceCreationMode": "PDF"
  }
}'
{
  "data": {
    "documentId": "example_string",
    "invoiceNumber": "example_string",
    "issueMode": "classic",
    "peppolStatus": "example_string",
    "deliveryId": "example_string",
    "peppolSendSkipped": true,
    "bisValidationErrors": [
      {}
    ]
  },
  "success": true,
  "message": "example_string",
  "code": "APP_UNAUTHENTICATED"
}
POST
/v2/documents/invoice-issue
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: api_key)
api_keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
dataobject

organizationId identifies the organization. The v1 endpoint keeps the ICO. All v1 fields are supported unchanged.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
api_keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
dataobject

organizationId identifies the organization. The v1 endpoint keeps the ICO. All v1 fields are supported unchanged.

Responses

dataobject
successboolean
messagestring

optional message to help user understand error code

codestring
Allowed values:APP_UNAUTHENTICATEDAPP_INCORRECT_INPUT_DATASAVE_DATA_ERROR_CODE