Solved

Acumatica endpoints how to add a note to invoice?


Userlevel 3
Badge

Hi all,

 

I want to write a program to fetch invoice via Acumatica openAPI and send to clients. My problem is after send invoice to clients, I want to add a note to the invoice in the Acumatica. I checked openAPI and can not find any endpoints related to modify invoice. I only found a /Invoice/{actionName} endpoint maybe can do that. Also I can’t find any action like add a note. Does anyone have any idea on this?

 

 

 

icon

Best answer by jinin 3 May 2022, 10:26

View original

5 replies

Userlevel 6
Badge +3

Hi @larryly 

You can make an  API call (Salesinvoice) to update the notes in Acumatica after sending the invoice to the client.

 

 

 

Url :entity/Test/20.200.001/SalesInvoice
Method:PUT

Request:

{

    "ReferenceNbr": {

        "value": "AR009875"

    },  "Type": {

        "value": "Invoice"

    },

    "note": {

        "value": "Invoice Released"

    }

}

 

 

Userlevel 3
Badge

@jinin Thank you. It works.    I also found a same API under Invoice. But it is only for creating invoices, not for updating records like it is descriptive.   Thank you again.

 

 

Userlevel 5
Badge +1

You have to add the Customer ID as well. Acumatica’s API often forces you to provide multiple keys, even if one really should do (ReferenceNbr should be enough, but it isnt). The API does tell you this. You can see in your Postman screenshot it says CustomerID cannot be empty.

I tested doing the update with the following JSON and it worked.

    {

        "note": {

            "value": "test"

        },

        "Amount": {

            "value": 874.0000

        },

        "Balance": {

            "value": 874.0000

        },

        "BillingPrinted": {

            "value": true

        },

        "BillToContactOverride": {

            "value": false

        },

        "Customer": {

            "value": "10008"

        },

        "CustomerOrder": {},

        "Description": {},

        "Hold": {

            "value": false

        },

        "LinkARAccount": {

            "value": "11000"

        },

        "LocationID": {

            "value": "MAIN"

        },

        "PostPeriod": {

            "value": "012021"

        },

        "ReferenceNbr": {

            "value": "000004"

        },

        "ShipToContactOverride": {

            "value": false

        },

        "Status": {

            "value": "Open"

        },

        "TaxTotal": {

            "value": 0.0000

        },

        "Terms": {

            "value": "DEFTERMS"

        },

        "Type": {

            "value": "Invoice"

        },

        "custom": {}

    }

 

Userlevel 3
Badge

@rosenjon Thanks for the details. I think the invoiceNbr is enough for updating notes. I tried on Postman and python. Both are working.  Check out which endpoint you were testing. the Invoice and SalesInvoice is different. Invoice looks like connect to AR301000, SalesInvoice should be connect to SO303000.  That’s why I said I cannot update notes on my last post. I think SalesInvoice is more flexible. Also I will not to use both endpoints. I will create new endpoints to link to SO303000. 

 

 

 

Userlevel 5
Badge +1

Got it. I was mostly offering help for the error that was in the screenshot you posted “Customer ID cannot be empty”. It is possible that once the Invoice is created, you no longer get this error when you do an update, in which case my comment may not be relevant. Acumatica’s API is kind of “REST-like”, as opposed to RESTful, so there are some weird things that aren’t necessarily predictable until you actually test with Postman.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved