Estimate Vendor Credit Usage

GET

Estimate the usage of vendor credits on an invoice of a given amount

Path parameters

entityIdstringRequired

Entity ID or Entity ForeignID

counterpartyIdstringRequired

Counterparty Entity ID or Counterparty Entity ForeignID

Query parameters

amountdoubleRequired

The amount of the invoice to calculate vendor credit usage for.

currencyenumOptional

The currency of the invoice to calculate vendor credit usage for. Defaults to USD.

excludedInvoiceIdslist of stringsOptional

List of invoice IDs to exclude from the calculation. If not provided or an empty list, no invoices will be excluded. This is useful for recalculating vendor credit usage on invoices that already have vendor credits applied.

includedVendorCreditIdslist of stringsOptional

List of vendor credit IDs to include in the calculation. If not provided, all applicable vendor credits will be included, while an empty list will not include ANY vendor credits. This is useful for recalculating vendor credit usage on invoices that have a fixed list of applied vendor credits (e.g. a SCHEDULED or PENDING invoice).

Response

The vendor credit usage estimate

remainingAmountdouble

Remaining amount on the invoice after vendor credits are applied in major units.

currencyenum

Currency code for the amount. Defaults to USD.

vendorCreditslist of objects

Vendor credits that will be applied to the invoice. The objects returned represent the states each vendor credit will be in AFTER they are applied to the invoice, not their current states.