# Document code

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/qaf0282295094633/

Guide: Communications

# Document code

**Element type: Required**

**Enpoints/models used:** [Invoice](https://developer.avalara.com/api-reference/communications/v2/models/Invoice/)

Your integration must provide a method for specifying a unique document code used on transactions. This code can be a maximum of 150 bytes and is required when`"commit": true`.

Specifying a document code is done using the `doc` field in the [Invoice](https://developer.avalara.com/api-reference/communications/v2/models/Invoice/) model.

**View example**:

```
"inv": [
  {
    "doc": "StreamingContent1",
    "cmmt": false,
    "cust": 0,
    "date": "2021-01-01T12:00:00Z",
    "invm": true,
    "dtl": true,
    "summ": true,
    "acct": "Broadcaster",
    "custref": "Customer1234",
    "invn": "Invoice1234",
    "bcyc": "202010",
    "bpd": {
        "month": "10",
        "year": "2020"
    },
    "opt": [
        {
            "key": "1",
            "val": "StreamingSamples"
        }
    ],
    "bill": {
      ...
    },
    "itms": [
      {
        ...
      }
    ]
  }
] 
```