Executes the Update Discount Offered action for the Invoices data object.

Updates discount offered on a posted AP invoice line and distributes it across the line's open and on-hold invoice line detail rows, as Vista AP Payment Control does. Optionally also sets discount taken and the header discount date.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The code of the subscriber that you are making this request for.

Body Params

Updates discount offered on a posted AP invoice line and distributes it across the line's open and on-hold invoice line detail rows, as Vista AP Payment Control does. Optionally also sets discount taken and the header discount date.

integer
required
1 to 255

AP company. Key to ap/invoices(APCo, Mth, APTrans).

date
required
^([0-9]{4})-(1[0-2]|0[1-9])-01$

Invoice batch month. Format YYYY-MM-01.

integer
required

Posted AP transaction ID.

integer
required

Invoice line to update. Key to ap/invoices LineItems(APLine).

date

Optional header discount date (bAPTH.DiscDate). Format YYYY-MM-DD. Omit to leave unchanged.

string
required
^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$

Discount offered amount for the invoice line (bAPTL.Discount). The connector writes it to the line's open and on-hold non-retainage bAPTD rows, split in proportion to each row's Amount with the rounding difference on the highest APSeq, as Vista AP Payment Control does. By default retainage rows, released or not, never receive a discount (see AllowReleasedRetainage). Each share is written to bAPTD.DiscOffer.

__custom_fields
object

Custom field values when defined on APTH, APTL, or APTD.

boolean
Defaults to false

When true and the line has no open or on-hold non-retainage detail, the discount goes to the line's released retainage rows instead (same split and rounding). Vista's discount distribution never does this, but a user can key a discount onto released retainage in the AP Payment Workfile. Unreleased retainage never receives a discount. Omit or false to match Vista: the action fails with NO_DISCOUNTABLE_DETAIL.

boolean
Defaults to false

When true, also sets bAPTD.DiscTaken to the same distributed share as DiscOffer, so the AP Payment Workfile takes the discount on Fill Grid (matches Vista AP Entry, and the Change Disc Taken option in AP Payment Control). Omit or false to leave DiscTaken unchanged.

Headers
string
required

Used to authorize access to the Direct API.

Responses

401

You have not provided a proper X-Application-Key in the header of this request.

403

The X-Application-Key provided is valid but the key does not have access to this resource.

404

The object with the given ID was not found OR a subscriber with the given URL was not found.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json