Theme
Tax: TaxCode, TaxRate, TaxAgency and TaxService
Tax codes go on transaction lines. Non-US companies, such as a Canadian sandbox company, need a TaxCodeRef on each invoice, credit memo and bill line. A tax code groups one or more tax rates, and each rate is collected for a tax agency.
| Entity | What the API allows | Not supported |
|---|---|---|
| TaxCode | Read, query | Create, update, delete. "Use the taxservice resource to create a tax code." |
| TaxRate | Read, query. All fields are read-only. | Create, update, delete. "Use the TaxService resource to create a tax rate." |
| TaxAgency | Create, read, query | Update and delete are not documented. |
| TaxService | Create only (taxservice/taxcode): a tax code with new or existing rates | Read, query, update, delete |
Business rules
- Change data capture (CDC) does not cover TaxAgency, TaxCode or TaxRate.
- Folder 3 only reads. It stores the codes that later folders put on each line:
sales_tax_code_id: the first active code with sales rates;purchase_tax_code_id: the first active code with purchase rates.
- Folder 3b writes, and its writes are permanent: the API has no delete or deactivate for TaxAgency, TaxCode or TaxRate.
- It is skipped unless
allow_permanent_tax_writesistrue. - Skipping uses
pm.execution.skipRequest, so it needs a Postman version that supports it.
- It is skipped unless
- "QuickBooks companies based in the US will only display system-created tax agencies."
- US companies with automated sales tax: "Apps can create TaxCode objects and assign them to sales transactions but will be overridden by AST-assigned tax codes."
Postman folders: 3. Tax (TaxCode, TaxRate, TaxAgency) and 3b. Tax set-up writes (permanent, opt-in). Intuit reference: TaxCode · TaxRate · TaxAgency · TaxService.
The TaxCode object
Fields the collection uses. The full attribute list is in Intuit's reference.
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | String | Goes into TaxCodeRef.value on transaction lines. | |
Name | String | Tax code name. | |
Active | Boolean | The test only picks active codes. | |
TaxGroup | Boolean | true for a group of rates; false for the US pseudo-codes TAX and NON. | |
SalesTaxRateList | Object | Sales rates, in TaxRateDetail[]. "Required when TaxGroup is set to true." | |
PurchaseTaxRateList | Object | Purchase rates, in TaxRateDetail[]. "Required when TaxGroup is set to true." |
Query tax codes
Lists the company's tax codes. The test stores:
tax_code_id: the first row'sId;sales_tax_code_id: the first active code whoseSalesTaxRateList.TaxRateDetailis not empty;purchase_tax_code_id: the first active code whosePurchaseTaxRateList.TaxRateDetailis not empty.
Returns
QueryResponse.TaxCode[]. The test needs at least one row.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/query?query=select * from TaxCode MAXRESULTS 100 |
| Intuit operation | GET/v3/company/<realmID>/query?query=<selectStatement> |
| Accept | application/json |
| Postman | 3. Tax › Query tax codes |
| Stores | tax_code_id, sales_tax_code_id, purchase_tax_code_id |
Sample query
text
select * from TaxCode MAXRESULTS 100Read a tax code
Retrieves one TaxCode object. The test checks that TaxCode.Id is returned.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/taxcode/{{tax_code_id}} |
| Intuit operation | GET/v3/company/<realmID>/taxcode/<taxcodeId> |
| Accept | application/json |
| Postman | 3. Tax › Read tax code |
Query tax rates
Lists tax rates and stores the first row's Id in tax_rate_id. The test needs at least one row.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/query?query=select * from TaxRate MAXRESULTS 20 |
| Intuit operation | GET/v3/company/<realmID>/query?query=<selectStatement> |
| Accept | application/json |
| Postman | 3. Tax › Query tax rates |
| Stores | tax_rate_id |
Read a tax rate
Retrieves one TaxRate object. The test checks that TaxRate.Id is returned.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/taxrate/{{tax_rate_id}} |
| Intuit operation | GET/v3/company/<realmID>/taxrate/<taxrateId> |
| Accept | application/json |
| Postman | 3. Tax › Read tax rate |
Query tax agencies
Lists tax agencies. TaxAgency is filterable only by Id. The test checks the status only, since a company can have no agencies.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/query?query=select * from TaxAgency |
| Intuit operation | GET/v3/company/<realmID>/query?query=<selectStatement> |
| Accept | application/json |
| Postman | 3. Tax › Query tax agencies |
Create a tax agency
Permanent; opt-in (folder 3b). Creates the agency that the new tax rate below is collected for.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
DisplayName | * Required | String | QBOC-TEST {{run_id}} Agency. |
Returns
The new TaxAgency object. The response also has read-only fields such as TaxTrackedOnSales (default true) and TaxTrackedOnPurchases (default false). The test stores TaxAgency.Id in tax_agency_id.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/taxagency?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/taxagency |
| Content type | application/json |
| Postman | 3b. Tax set-up writes › Create tax agency |
| Stores | tax_agency_id |
Request body
json
{
"DisplayName": "QBOC-TEST {{run_id}} Agency"
}Returns (abridged)
json
{
"TaxAgency": {
"Id": "7",
"DisplayName": "QBOC-TEST mi4x2k Agency",
"TaxTrackedOnSales": true,
"TaxTrackedOnPurchases": false
},
"time": "2026-12-01T02:08:00.000-08:00"
}Create a tax code (TaxService)
Permanent; opt-in (folder 3b). Creates a tax code with one new 5% sales rate, collected for the agency above.
- "A single tax rate may not be listed twice in the list of tax rates associated with a new tax code."
- "TaxAgency objects referenced by TaxRate objects created with the TaxService resource must already exist."
- The response is not wrapped in an entity envelope, and
RateValuecomes back with a%suffix.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
TaxCode | * Required | String | Name of the new tax code: QBOC-TEST {{run_id}}. |
TaxRateDetails | * Required | Array | One entry per rate. Each entry is either an existing rate (TaxRateId only) or a new rate (TaxRateName, RateValue, TaxAgencyId). |
TaxRateDetails[]. | * Conditionally required (new rate) | String | QT{{run_id}}. |
TaxRateDetails[]. | * Conditionally required (new rate) | String, 0–100 | "5". |
TaxRateDetails[]. | * Conditionally required (new rate) | String | {{tax_agency_id}}. |
TaxRateDetails[]. | * Conditionally required (existing rate) | String | Not sent here. |
TaxRateDetails[]. | Optional | String | Sales (the default) or Purchase. |
Returns
The new tax code's id and its rates. The test stores TaxCodeId in new_tax_code_id.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/taxservice/taxcode?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/taxservice/taxcode |
| Content type | application/json |
| Postman | 3b. Tax set-up writes › Create tax code with a new rate (TaxService) |
| Stores | new_tax_code_id |
Request body
json
{
"TaxCode": "QBOC-TEST {{run_id}}",
"TaxRateDetails": [
{
"TaxRateName": "QT{{run_id}}",
"RateValue": "5",
"TaxAgencyId": "{{tax_agency_id}}",
"TaxApplicableOn": "Sales"
}
]
}Returns (abridged)
json
{
"TaxCode": "QBOC-TEST mi4x2k",
"TaxCodeId": "12",
"TaxRateDetails": [
{
"TaxRateId": "21",
"RateValue": "5%"
}
]
}Read the new tax code
Reads the tax code that TaxService created, as an ordinary TaxCode object. The test checks that TaxCode.Id is returned.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/taxcode/{{new_tax_code_id}} |
| Intuit operation | GET/v3/company/<realmID>/taxcode/<taxcodeId> |
| Accept | application/json |
| Postman | 3b. Tax set-up writes › Read new tax code |