Create Customer Payment via REST API with Invoices applied

I am creating a series of payments via API and for each of them, I want to be able to apply invoice(s) in the apply sublist. I am using a POST to /record/v1/customerpayment with a body that contains a set of fields that work on their own, but when I include an object for the “apply” field with an array of one “items” I get an error:
“Error while accessing a resource. You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.”

For reference, here is the block that I have included that triggers the failure:

“apply”: {
“items”: [
“apply”: true,
“amount”: 4391,
“doc”: {
“id”: “39659”

I have checked that the invoice refNum of 39659 is one of the options that appears as open on the referenced customer. Is there something obvious I am doing wrong? I am following a similar approach that a user in this thread has stated works for them: – using ‘doc’ to reference an invoice, but I can’t seem to get that to work. Thanks!

Rookie Asked on December 6, 2023 in SuiteTalk.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor