Scenario
User would like to create a Customer Payment that will automatically apply the Invoices (via REST requests)
Solution
This sample REST request shows how to create the Apply To sublist on the Invoices, by specifying the line number, amount, the apply boolean and the document number (Invoice Internal ID)
HTTP method: POST
URL: {{COMPANY_URL}}/services/rest/record/v1/customerpayment/
Sample REST Request:
Spoiler Spoiler Warning ▲▼
{
"account": {
"id": "2"
},
"customer": {
"id": "1"
},
"payment": 45,
"apply": {
"items": [
{
"doc": {
"apply": true,
"id": "3772",
"line":"0"
},
"due": 45,
"amount": 45
}
]
}
}
Note: A customer payment applies it to the appropriate invoice or cash sale only, decreasing the amount due and tracking income.
Here are the SuiteAnswers Articles used.
Do you have another way on how to use Customer Payment in REST Web Services? Feel free to share them here!
If you find this information useful, let us know by reacting or commenting on this post! Thank you!