Skip to main content
Solved

API Help for Payment (AR302000) Screen


StevenRatner
Varsity I
Forum|alt.badge.img

Hi-

I'm trying to add a PUT request to my payment screen (AR302000). However, when I test it using Postman, I encounter the following error, and I'm a bit stuck on where to find the issue and fix it. Here's the error message and the JSON data. If anyone could assist me in identifying what's wrong, I'd greatly appreciate it.

Thanks a bunch!

Error:

 

JSON:

{
    "Type": {
        "value": "PMT"
    },
    "ReferenceNbr": {
        "value": "PAY0001"
    },
    "Status": {
        "value": "Balanced"
    },
    "ApplicationDate": {
        "value": "2023-12-28T00:00:00+00:00"
    },
    "PaymentRef": {
        "value": "nugsl - INTEGRATED_ATM - 2023-12-28"
    },
    "CustomerID": {
        "value": "C0001660"
    },
    "PaymentMethod": {
        "value": "ATM"
    },
    "CashAccount": {
        "value": "INTATMDSWC"
    },
    "Description": {
        "value": "API Test."
    },
    "PaymentAmount": {
        "value": 1400
    },
    "BranchID": {
        "value": "01-DSWC"
    },
    "DocumentsToApply": [
        {
            "DocLineNbr": {
                "value": "1"
            },
            "DocType": {
                "value": "INV"
            },
            "ReferenceNbr": {
                "value": "000041"
            },wn
            "AmountPaid": {
                "value": 1400

 

ACU:

 

            }
        }
    ]
}aBC

 

 

Best answer by Dmitrii Naumov

Hi @StevenRatner 

  1. I don’t think you need the DocLineNbr unless you have ‘Apply by lines’ feature turned on, which I don’t think you have here. 
  2. Check if there is already not released payment that is applied to that invoice. It’s not allowed to have more than one not released payment applied to the same invoice. 
  3. I’m not sure about sending RefernceNbr for payment. You do this only in case you don’t have Auto Numbering for payments, which I think is pretty rare. So, you should remove it if you are creating a new payment and not updating an existing one. (or unless you have manual numbering for payments)
View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+6
  • Captain II
  • 556 replies
  • January 2, 2024

Can you try removing the DocLineNbr element from your JSon in the DocumentsToApply array? You shouldn’t need that for adding documents and I’m wondering if including the field is making ACM try to locate a record to update vs inserting a new record.


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • 632 replies
  • Answer
  • January 2, 2024

Hi @StevenRatner 

  1. I don’t think you need the DocLineNbr unless you have ‘Apply by lines’ feature turned on, which I don’t think you have here. 
  2. Check if there is already not released payment that is applied to that invoice. It’s not allowed to have more than one not released payment applied to the same invoice. 
  3. I’m not sure about sending RefernceNbr for payment. You do this only in case you don’t have Auto Numbering for payments, which I think is pretty rare. So, you should remove it if you are creating a new payment and not updating an existing one. (or unless you have manual numbering for payments)

StevenRatner
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • 75 replies
  • January 2, 2024

@Dmitrii Naumov - Thanks for the help!  Your suggestions worked and I was able to get the API to work correctly. Much appreciated


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings