# Submit the document

Source: https://developer.avalara.com/products/e-invoicing/integration-guides/elr/rkz5197923133334/

Guide: E-Invoicing and Live Reporting

# Submit the document

Submit a document to Avalara E-Invoicing and Live Reporting using the SubmitDocument endpoint.

**Endpoint**: `POST /einvoicing/documents`

Submit a document to E-Invoicing and Live Reporting (ELR).

Provide users with a clear and guided process to submit documents. Users must be able to:

-   Manually submit a document at any time, regardless of its current status
-   Configure conditions for automatic submission based on the document status in the source system. For example, when the document status is Approved or Posted.

This approach ensures that document submission is predictable, auditable, and aligned with internal approval workflows.

**Headers**

Name

Description

**avalara-version**

API version.

**X-Avalara-Client**

Provided by Avalara.

**Request body**

Key

Description

**metadata**

Payload metadata that defines how ELR process the document. Example:

```
{ "workflowId":"partner-einvoicing", "dataFormat":"ubl-invoice",
              "dataFormatVersion":"2.1", "countryCode":"GB",
              "countryMandate":"GB-B2B-PEPPOL" }
```

Use the [GetMandates](https://developer.avalara.com/api-reference/e-invoicing/v1.5/methods/Mandates/GetMandates/) endpoint to retrieve valid `countryMandate` and `countryCode` values.

**data**

This is a UBL 2.1 document. Use the [GetDataInputFields](https://developer.avalara.com/api-reference/e-invoicing/v1.6/methods/Mandates/GetMandateDataInputFields/) endpoint to get the required data fields.

```
 urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 PEPPOL-GB{{documentNumber}} {{documentDate}} 2026-02-04 380 Please note we have a new phone number: 22 22 22 22 2017-12-01 EUR SEK 4025:123:4343 0150abc  2017-12-01 2017-12-31   framework no 1    See section Activation Management  See section Activation Management   SupplierOfInvoice   Lancaster House, Trafalgar Pl 1st Floor Brighton BN1 4FU  GB    GB987123654  VAT    SupplierOfInvoice GB987123654      See section Activation Management  CustomerOfInvoice   Hovedgatan 32 Po box 878 London 456 34  GB    GB987123654  VAT    CustomerOfInvoice GB987123654   Lisa Johnson 23434234 lj@buyer.se     2023-04-01  9483759475923478  Delivery street 2 Building 56 Stockholm 21234 Södermalm  Gate 15   SE      Delivery party Name     30 Snippet1  IBAN32423940 AccountName  BIC324098     Payment within 10 days, 2% discount   true CG Cleaning 20 200 1000  S 25  VAT     false 95 Discount 200  S 25  VAT     1225.00  4900.0 1225  S 25  VAT     1000.0 0  E 0 Reason for tax exempt  VAT      9324.00   5900 5900 7125 200 200 1000 6125.00   1 Testing note on line level 10 4000.00 Konteringsstreng  true CG Cleaning 1 1 100   false 95 Discount 101   Description of item item name  97iugug876   NO   09348023   S 25.0  VAT     410 1  false 40 450     2 Testing note on line level 10 1000.00 Konteringsstreng  2017-12-01 2017-12-05   124   Description of item item name  97iugug876   86776   E 0.0  VAT    AdditionalItemName AdditionalItemValue    200 2    3 Testing note on line level 10 900.00 Konteringsstreng  2017-12-01 2017-12-05   124   true CG Charge 1 1 100   false 95 Discount 101   Description of item item name  97iugug876   86776   S 25.0  VAT    AdditionalItemName AdditionalItemValue    100   
```

## Example request

```
curl --location '/einvoicing/documents' \
--header 'avalara-version: 1.5' \
--header 'X-Avalara-Client: ProvidedToYouByAvalara' \
--form 'metadata="{ \"workflowId\":\"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"GB\", \"countryMandate\": \"GB-B2B-PEPPOL\"}";type=application/json' \
--form 'data=" urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 PEPPOL-GB{{documentNumber}} {{documentDate}} 2026-02-04 380 Please note we have a new phone number: 22 22 22 22 2017-12-01 EUR SEK 4025:123:4343 0150abc  2017-12-01 2017-12-31   framework no 1    See section Activation Management  See section Activation Management   SupplierOfInvoice   Lancaster House, Trafalgar Pl 1st Floor Brighton BN1 4FU  GB    GB987123654  VAT    SupplierOfInvoice GB987123654      See section Activation Management  CustomerOfInvoice   Hovedgatan 32 Po box 878 London 456 34  GB    GB987123654  VAT    CustomerOfInvoice GB987123654   Lisa Johnson 23434234 lj@buyer.se     2023-04-01  9483759475923478  Delivery street 2 Building 56 Stockholm 21234 Södermalm  Gate 15   SE      Delivery party Name     30 Snippet1  IBAN32423940 AccountName  BIC324098     Payment within 10 days, 2% discount   true CG Cleaning 20 200 1000  S 25  VAT     false 95 Discount 200  S 25  VAT     1225.00  4900.0 1225  S 25  VAT     1000.0 0  E 0 Reason for tax exempt  VAT      9324.00   5900 5900 7125 200 200 1000 6125.00   1 Testing note on line level 10 4000.00 Konteringsstreng  true CG Cleaning 1 1 100   false 95 Discount 101   Description of item item name  97iugug876   NO   09348023   S 25.0  VAT     410 1  false 40 450     2 Testing note on line level 10 1000.00 Konteringsstreng  2017-12-01 2017-12-05   124   Description of item item name  97iugug876   86776   E 0.0  VAT    AdditionalItemName AdditionalItemValue    200 2    3 Testing note on line level 10 900.00 Konteringsstreng  2017-12-01 2017-12-05   124   true CG Charge 1 1 100   false 95 Discount 101   Description of item item name  97iugug876   86776   S 25.0  VAT    AdditionalItemName AdditionalItemValue    100  
";type=application/xml'
```

## Example response

**Response body**

```
{
  "id": "3d044034-86d5-46e0-a58e-164deaa2f0eb"
}
```

**Response header**

Name

Value

Date

Thu, 05 Feb 2026 16:39:41 GMT

Content-Type

application/json; charset=utf-8

Content-Length

45

Connection

keep-alive

content-security-policy

```
default-src 'self' *.fullstory.com file: data: blob: filesystem: *.avalara.io *.avalara.com *.vimeocdn.com *.vimeo.com *.youtube.com; script-src 'self' 'unsafe-inline' 'nonce-45ad3bc4-3a78-4dbf-8865-9d642a89b774' 'strict-dynamic' *.avalara.com *.fullstory.com iph.zoominsoftware.io *.siteintercept.qualtrics.com www.googletagmanager.com; style-src 'self' 'nonce-45ad3bc4-3a78-4dbf-8865-9d642a89b774' *.avalara.com *.avalara.io https://fonts.googleapis.com; img-src 'self' *.avalara.com *.avalara.io data: *.vimeocdn.com *.vimeo.com *.youtube.com; font-src 'self' *.avalara.com *.avalara.io https://fonts.gstatic.com; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; script-src-attr 'none'; upgrade-insecure-requests; require-trusted-types-for 'script'
```

cross-origin-opener-policy

same-origin

cross-origin-resource-policy

same-origin

origin-agent-cluster

?1

referrer-policy

no-referrer

strict-transport-security

max-age=31536000; includeSubDomains

X-Content-Type-Options

nosniff

x-dns-prefetch-control

off

x-download-options

noopen

x-frame-options

SAMEORIGIN

x-permitted-cross-domain-policies

none

x-xss-protection

0

etag

W/"2d-u9RwyuXQUZw3CIjzVJP9e+SCVRs"

x-correlation-id

fe6b1885-e1d7-4e7f-a52c-8e9753c538bf

x-avalara-uid

fe6b1885-e1d7-4e7f-a52c-8e9753c538bf