Communications REST v2 allows you to control the response output via the Request Config object (cfg
).
There are several configuration options available:
retnb
: Return non-billable taxesretext
: Return extended data in the responseincrf
: Return reporting information in the responseThe retnb
flag allows you to control if non-billable taxes are returned in the response. If this field is not provided, it defaults to the account-level setting.
true
: Return non-billable taxes. Setting retnb
to true
overrides the account-level settingfalse
: Don't return non-billable taxesThe retext
flag indicates if you want to see a number of extended fields in the detailed tax result:
taxpcd
): PCode representing taxing jurisdictionusexm
): Flag indicating if the tax has been exempted by the user via Exemptions (exms
)notax
): Flag indicating that the transaction processed successfully but returned no taxestrans
): Transaction type use to calculate tax. For bundles, this field shows the specific bundled item transaction typesvc
): Service type use to calculate tax. For bundles, this field shows the specific bundled item transaction typechg
): Charge used to calculate tax. For bundles, this field shows the percentage of the charge applied to the bundled item. For tax inclusive calls, this field shows the calculated chargebill
): Always returns false
name
): Always returns "NO TAX"
pcd
) and Taxing PCode (taxpcd
): Reporting PCode and Taxing PCode are always the same value pcd
) and Taxing PCode (taxpcd
) are both set to the Unsupported Country PCode (5190000
)tax
): Always returns 0
tid
): Always returns 0
usexm
): Always returns false
notax
): Always returns true
trans
): Transaction type use to calculate tax. For bundles, this field shows the specific bundled item transaction typesvc
): Service type use to calculate tax. For bundles, this field shows the specific bundled item transaction typechg
): Charge used to calculate tax. For bundles, this field shows the percentage of the charge applied to the bundled item. For tax inclusive calls, this field shows the calculated chargeThe incrf
flag enables the return of the Reporting Information object (incrf
) in the CalcTaxes
response.
Populate some or all of these reporting information fields on the invoice (inv
) to see the information in the response and in Explorer Reporting:
acct
)custref
)invn
)bcyc
)ccycd
)All of the reporting information fields populated on the invoice (inv
), as well as the Currency Description (ccydesc
) are returned in Reporting Information object (incrf
).
Reporting fields are available for use on the line item (itms
). Just like on the invoice, populate these reporting information fields on the invoice (itms
) to see the information in the response and in Explorer Reporting:
ref
)glref
)glref
) isn't returned in the response, but can be found in Explorer ReportingIn 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
).
Non-billable 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 that the General Ledger Reference (glref
) is not returned on the line item (itms
).
In this example, all of the Request Config configuration options are set to false
.
Non-billable tax (bill
= false
) Tax Type ID (tid
) 232 is not returned in the response. The detailed tax results (txs
) don’t include the extended tax data. Reporting Information (incrf
) is not returned.
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.
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
).