Adjust applied amounts
POST/api/v3/transaction/:transaction_id/_action/changeAppliedAmounts
Use this to adjust how much of a payment or credit is applied to specific invoices, or which invoices a payment or credit is applied to.
On every REST API request, you need to specify all of the invoices the payment is applied to. Any existing applications of the payment will be overwritten by the applications in this REST API request (e.g. if an invoice previously had this payment applied to it, and you don't specify that invoice in this request, the payment application will be removed from that invoice).
To unapply the payment entirely, specify an empty applied_to
array.
Note: You can only adjust how payments and credits are applied.
Request
- application/json
Body
applied_to
object
0
object
1
object
Responses
- 200
- 400
- 401
Action completed successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": true
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}