REST v2 allows you to specify the level of detail returned as part of the CalcTaxes response.
There are two available levels of detail set on the Invoice:
dtl
): displays the tax details per line itemsumm
): displays a summary of all taxes returned. InvoiceMode (invm
) must be enabledReturnDetail and/or ReturnSummary must be set to true
.
Setting the ReturnDetail flag (dtl
) displays or hides the detailed taxes object (txs
) for each LineItem in the CalcTaxes response. InvoiceMode (invm
) has no impact on the ReturnDetail flag.
InvoiceMode Value | ReturnDetail Value | CalcTaxes Response Result |
---|---|---|
true or false | true (default) | Enables return of tax details txs object |
false | Disables return of tax details txs object |
Bundled tax calculations return summarized detailed results when more than one bundle item returns the same tax type.
Setting the ReturnSummary flag (summ
) displays or hides the summary taxes object (summ
) for the entire Invoice in the CalcTaxes response.
InvoiceMode Value | ReturnSummary Value | CalcTaxes Response Result |
---|---|---|
true | false (default) | Disables return of tax summary summ object |
true | Enables return of tax summary summ object | |
false | true or false | Tax summary summ object not returned |
Taxable measure is returned as part the detailed taxes. It is the basis for calculation of rate-based taxes. Simple transactions result in a taxable measure equal to the sale price. However, tax-on-tax, caps, thresholds, tiers, and taxable amount modifiers can all result in taxable measures that are greater than or less than the sale price. For rate-based taxes, Tax Amount = Taxable Measure * Rate.
Taxable measure is adjusted by any factor that changes the tax calculation. Examples:This example demonstrates both the Detail taxes (txs
) and Summary taxes (summ
) returned in the CalcTaxes response.
In this sample request:
true
This is the only combination of fields to return both the Detail and Summary taxes together.
Detailed taxes (txs
) and Summarized taxes (summ
) are both returned.
This example demonstrates the Detail taxes (txs
) returned in the CalcTaxes response, but the Summary taxes (summ
) suppressed.
In this sample request:
true
false
The following additional scenarios return the same results:
true
but ReturnSummary set to false
false
but ReturnDetail set to true