# Document type

Source: https://developer.avalara.com/vat-ecom/transactions/certification-requirements/document-type/

**Element type:** Required

**Endpoints/models used:** [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Your integration must provide a way for users to enter a document type, which specifies the type of document to create. A document type ending with `Invoice` is a permanent transaction that will be recorded in AvaTax. A document type ending with `Order` is a temporary estimate that won't be preserved.

This value should be optional for users. If they omit this value, the API will default to creating a `SalesOrder`.

Document types are added to your application using the type field in the [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/).

[![Closed](https://avalara-devdocs-prod.mcoutput.com/vat-ecom/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
{  "type": "SalesInvoice",  "companyCode": "DEFAULT",  "date": "2024-07-16",  "code": "MyDocumentCode",  "customerCode": "ABC",  "purchaseOrderNo": "123456789",  "commit": true,  "currencyCode": "USD",  "description": "Yarn",  ...,} 
```