The Optional Fields object (opt
) is a Key/Value Pair that allows you to include up to 10 custom fields for use in Reporting. The Optional Fields are not returned as part of the CalcTaxes
response, but Optional Field 1 - Optional Field 10 can be included on reports generated in the Customer Portal.
Optional Fields can be used in both the Invoice and the Line Item. The 10 available Key/Value pairs can be spread across both the invoice and each line item individually. For example:
The Optional Fields at the Invoice level are applied to all Line Items.
To use the Optional Fields:
key
) to a number between 1 and 10 val
)val
) does not need to be the same across all Line Items even if the Key (key
) is the sameopt
) is not mandated by REST v2, but it is recommended to set Keys 1-5 on the Invoice and Keys 5-10 on the LineItemThis example demonstrates using Optional Fields on both the Invoice and the LineItems.
Taxes (txs
and summ
) are returned as normal. No Optional Fields (opt
) are returned in the CalcTaxes
response.