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?
Page 1 / 1
Hi @larryly
You can make an API call (Salesinvoice) to update the notes in Acumatica after sending the invoice to the client.
@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.
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": {}
}
@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.
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.