Skip to main content
Solved

REST API: how do I attach a payment to an order and return the unpaid balance?

  • August 23, 2024
  • 1 reply
  • 40 views

Forum|alt.badge.img+2

Currently, I doing this PUT method but it doesn’t do anything but return the sales order object:

https://sandbox.com/AcumaticaERP/entity/Default/22.200.001/SalesOrder?$expand=Payments&$select=Payments/AppliedToOrder:

{

    "OrderType": {"value": "WB"},

    "OrderNbr": {"value": "WB00159383"},

    "Payments": [

        {

            "ReferenceNbr": {

                "value": "598095"

            }

        }

    ]        

}

I’m expecting it to return the unpaid balance on the order so I can use this amount to call the same method with the following body:

{

    "OrderType": {"value": "WB"},

    "OrderNbr": {"value": "WB00159383"},

    "Payments": [

        {

            "ReferenceNbr": {

                "value": "787266"

            },

            "AppliedToOrder": {

                "value": 55.5900

            }

        }

    ]        

}

Best answer by jinin

Hi @bpgraves ,

To get the unpaid balance, you can expand the total tab. You will see the unpaid balance.

url: entity/Default/20.200.001//SalesOrder/SO/SO007476?$expand=Totals
 

 

View original
Did this topic help you find an answer to your question?

1 reply

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • Answer
  • August 26, 2024

Hi @bpgraves ,

To get the unpaid balance, you can expand the total tab. You will see the unpaid balance.

url: entity/Default/20.200.001//SalesOrder/SO/SO007476?$expand=Totals
 

 


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