POST v1/payments/{id}/apply

Applies payment unapplied amount to specified open invoices.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Provide payment id to be used for apply

integer

Required

Body Parameters

Array of invoices the payment is being applied to

Collection of AppliedToTxn
NameDescriptionTypeAdditional information
TxnId

The transaction unique id the payment/credit was applied to.

integer

Required

Amount

The amount of the payment/credit that was applied to the transaction.

decimal number

Required

DateApplied

Read-only. The date and time (in company time zone) when this payment/credit was applied to the transaction.

date

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "txnId": 1,
    "amount": 2.0,
    "dateApplied": "2024-04-23T18:16:20.9706032-04:00"
  },
  {
    "txnId": 1,
    "amount": 2.0,
    "dateApplied": "2024-04-23T18:16:20.9706032-04:00"
  }
]

application/xml, text/xml

Sample:
<ArrayOfAppliedToTxn xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Accounting">
  <AppliedToTxn>
    <Amount>2</Amount>
    <DateApplied>2024-04-23T18:16:20.9706032-04:00</DateApplied>
    <TxnId>1</TxnId>
  </AppliedToTxn>
  <AppliedToTxn>
    <Amount>2</Amount>
    <DateApplied>2024-04-23T18:16:20.9706032-04:00</DateApplied>
    <TxnId>1</TxnId>
  </AppliedToTxn>
</ArrayOfAppliedToTxn>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.