---
title: "Create an e-invoice file template"
method: POST
path: "/v1/einvoice/templates"
tags: ["E-Invoicing"]
---

# Create an e-invoice file template

`POST /v1/einvoice/templates`

Creates an e-invoice file templates for your billing documents, including invoices, credit memos, and debit memos. 

Zuora provides default e-invoice file templates, so you can just customize them as needed. For example, some country specific fields like HSN (Harmonized System of Nomenclature) might be stored on product rate plan charges.

**Note**: This operation is available only if you have the <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/e-invoicing/e-invoicing-overview" target="_blank">E-Invoicing</a> feature in **Early Adopter** phase enabled.

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Request body

- CreateEInvoiceFileTemplateRequest
  - `content` string, required — The content of the e-invoice file template, which must be encoded in Base64 format.
  - `country` string, required — The short name of a country or region where you must comply with e-invoicing requirements. For example, `IN` for India. For the full list of country names and codes, see <a href="https://docs.zuora.com?resourceId=view-countries-or-regions" target="_blank">View countries or regions</a>.
  - `documentType` 'Invoice' | 'CreditMemo' | 'DebitMemo', required — The type of billing documents, which the e-invoice file template is intended for.
  - `name` string, required — The name of the e-invoice file template.
  - `provider` 'Sovos', required — The name of an e-invoicing service provider that assists in generating e-invoice files.

## Response `200`

OK

- GetEInvoiceFileTemplateResponse
  - `content` string — The content of the e-invoice file template, which must be encoded in Base64 format.
  - `country` boolean — The short name of a country or region where you must comply with e-invoicing requirements. For example, `IN` for India. For the full list of country names and codes, see <a href="https://docs.zuora.com?resourceId=view-countries-or-regions" target="_blank">View countries or regions</a>.
  - `documentType` 'Invoice' | 'CreditMemo' | 'DebitMemo' — The type of billing document for which the e-invoice file template is intended.
  - `id` string — The unique ID of the e-invoice file template.
  - `name` string — The name of the e-invoice file template.
  - `provider` 'Sovos' — The name of the e-invoicing service provider that assists in generating e-invoice files for billing documents.
  - `templateNumber` string — The unique number of the e-invoice file template.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
