# Request config examples

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

Guide: Communications

# Request config examples

## Example 1: All config options enabled

**View request**:

In this example, all of the Request Config configuration options are set to `true`. Line Item Reference (`ref`) and General Ledger Reference (`glref`) are included on the line item (`itms`).

```
{
  "cfg": {
    "retnb": true,
    "retext": true,
    "incrf": true
  },
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "bill": {"pcd": 534300
      },
      "cust": 1,
      "lfln": false,
      "date": "2022-04-15T12:00:00Z",
      "itms": [{  "ref": "Line Item 1",  "chg": 0,  "line": 10,  "sale": 1,  "tran": 13,  "serv": 6,  "glref": "General Ledger Reference"}
      ],
      "invm": false,
      "dtl": true,
      "summ": false,
      "acct": "Account Reference",
      "custref": "Customer Reference",
      "invn": "Invoice Number Reference",
      "bcyc": "Bill Cycle Reference",
      "ccycd": "USD"
    }
  ]
}
```

**View response**:

Nonbillable tax (`bill` =`false`) Tax Type ID (`tid`) 232 is returned in the response. Each detailed tax result (`txs`) returns the extended tax data. Reporting information (`incrf`) is also included. Notice also that the General Ledger Reference (`glref`) isn’t returned on the line item (`itms`).

```
{
  "inv": [
    {
      "itms": [{  "ref": "Line Item 1",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "GROSS RECEIPTS TAXES",      "cid": 3,      "name": "Statutory Gross Receipts (Wireless)",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534300,      "taxpcd": 534300,      "rate": 0.0252,      "sur": false,      "tax": 0.00042001,      "lvl": 1,      "tid": 75,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E911 (Wireless)",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534200,      "taxpcd": 534300,      "rate": 0.4,      "sur": false,      "tax": 0.4,      "lvl": 1,      "tid": 44,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "COMMUNICATIONS SERVICES TAX",      "cid": 10,      "name": "Communications Service Tax",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534300,      "taxpcd": 534300,      "rate": 0.0587,      "sur": false,      "tax": 0.00097835,      "lvl": 3,      "tid": 64,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "COMMUNICATIONS SERVICES TAX",      "cid": 10,      "name": "Communications Service Tax",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534200,      "taxpcd": 534300,      "rate": 0.0492,      "sur": false,      "tax": 0.00082002,      "lvl": 1,      "tid": 64,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Fed USF Cellular",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "taxpcd": 534300,      "rate": 0.184,      "sur": false,      "tax": 0,      "lvl": 0,      "tid": 55,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "REGULATORY CHARGES",      "cid": 6,      "name": "FCC Regulatory Fee (Wireless)",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "taxpcd": 534300,      "rate": 0.016667,      "sur": false,      "tax": 0.016667,      "lvl": 0,      "tid": 170,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    },    {      "bill": false,      "cmpl": true,      "tm": 0,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecommunications Relay Surcharge (Cellular)",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "taxpcd": 534300,      "rate": 0.02289,      "sur": false,      "tax": 0,      "lvl": 0,      "tid": 232,      "usexm": false,      "notax": false,      "trans": 13,      "svc": 6,      "chg": 0    }  ]}
      ],
      "incrf": {"acct": "Account Reference","custref": "Customer Reference","invn": "Invoice Number Reference","bcyc": "Bill Cycle Reference","ccycd": "USD","ccydesc": "US Dollar"
      }
    }
  ]
}
```

## Example 2: All config options disabled

**View request**:

In this example, all of the Request Config configuration options are set to`false`.

```
{
  "cfg": {
    "retnb": false,
    "retext": false,
    "incrf": false
  },
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "bill": {"pcd": 534300
      },
      "cust": 1,
      "lfln": false,
      "date": "2022-04-15T12:00:00Z",
      "itms": [{  "ref": "Line Item 1",  "chg": 0,  "line": 10,  "sale": 1,  "tran": 13,  "serv": 6,  "glref": "General Ledger Reference"}
      ],
      "invm": false,
      "dtl": true,
      "summ": false,
      "acct": "Account Reference",
      "custref": "Customer Reference",
      "invn": "Invoice Number Reference",
      "bcyc": "Bill Cycle Reference",
      "ccycd": "USD"
    }
  ]
}
```

**View response**:

Nonbillable tax (`bill` =`false`) Tax Type ID (`tid`) 232 isn’t returned in the response. The detailed tax results (`txs`) don’t include the extended tax data. Reporting Information (`incrf`) isn’t returned.

```
{
  "inv": [
    {
      "itms": [{  "ref": "Line Item 1",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "GROSS RECEIPTS TAXES",      "cid": 3,      "name": "Statutory Gross Receipts (Wireless)",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534300,      "rate": 0.0252,      "sur": false,      "tax": 0.00042001,      "lvl": 1,      "tid": 75    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E911 (Wireless)",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": 0.4,      "lvl": 1,      "tid": 44    },    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "COMMUNICATIONS SERVICES TAX",      "cid": 10,      "name": "Communications Service Tax",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534300,      "rate": 0.0587,      "sur": false,      "tax": 0.00097835,      "lvl": 3,      "tid": 64    },    {      "bill": true,      "cmpl": true,      "tm": 0.016667,      "calc": 1,      "cat": "COMMUNICATIONS SERVICES TAX",      "cid": 10,      "name": "Communications Service Tax",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 534200,      "rate": 0.0492,      "sur": false,      "tax": 0.00082002,      "lvl": 1,      "tid": 64    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Fed USF Cellular",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "rate": 0.184,      "sur": false,      "tax": 0,      "lvl": 0,      "tid": 55    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "REGULATORY CHARGES",      "cid": 6,      "name": "FCC Regulatory Fee (Wireless)",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "rate": 0.016667,      "sur": false,      "tax": 0.016667,      "lvl": 0,      "tid": 170    }  ]}
      ]
    }
  ]
}
```

## Example 3: No tax extended data

**View request**:

In this example, only the `retext` Request Config configuration option is set to `true`. The transaction returns no taxes. The Bill To location (`bill`) is set to an unsupported country.

```
{
  "cfg": {
    "retext": true
  },
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "bill": {"ctry": "ALA"
      },
      "cust": 1,
      "lfln": false,
      "date": "2022-04-15T12:00:00Z",
      "itms": [{  "ref": "Line Item 1",  "chg": 100,  "line": 0,  "sale": 1,  "tran": 14,  "serv": 15}
      ],
      "invm": false,
      "dtl": true,
      "summ": false,
      "acct": "Account Reference",
      "custref": "Customer Reference",
      "invn": "Invoice Number Reference",
      "bcyc": "Bill Cycle Reference",
      "ccycd": "USD"
    }
  ]
}
```

**View response**:

No taxes are returned but the no tax extended data information is returned. The Billable flag (`bill`) is `false`) even though `retext` is `false`. The Tax Name (`name`) reflects`"NO TAX"`. The Reporting PCode (`pcd`) and Taxing PCode (`taxpcd`) both return the Unsupported Country PCode (`5190000`).

```
{
  "inv": [
    {
      "itms": [{  "ref": "Line Item 1",  "txs": [    {      "bill": false,      "name": "NO TAX",      "pcd": 5190000,      "taxpcd": 5190000,      "tax": 0,      "tid": 0,      "usexm": false,      "notax": true,      "trans": 14,      "svc": 15,      "chg": 100    }  ]}
      ]
    }
  ]
}
```