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"
}
}'
import requests
import json
url = "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-issue"
headers = {
"Content-Type": "application/json",
"api_key": "YOUR_API_KEY"
}
data = {
"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"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-issue", {
method: "POST",
headers: {
"Content-Type": "application/json",
"api_key": "YOUR_API_KEY"
},
body: JSON.stringify({
"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"
}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"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"
}
}`)
req, err := http.NewRequest("POST", "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-issue", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("api_key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-issue')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['api_key'] = 'YOUR_API_KEY'
request.body = '{
"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"
}
}'
response = http.request(request)
puts response.body
{
"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"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v2/documents/invoice-issue
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
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
API Key for authentication. Provide your API key in the header.
Body
organizationId identifies the organization. The v1 endpoint keeps the ICO. All v1 fields are supported unchanged.
Responses
optional message to help user understand error code
APP_UNAUTHENTICATEDAPP_INCORRECT_INPUT_DATASAVE_DATA_ERROR_CODE