# Document type

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/transactions/cert-doc-type/

# 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 will not 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/).

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

[Previous](/avatax-dm-combined-erp/sales-tax-badge/transactions/cert-tax-calc-date)

[Next](/avatax-dm-combined-erp/sales-tax-badge/transactions/cert-header-level-dest-address)