Hi community,
Where I work we have been using the REST API quite a lot to automate redundant tasks in Acumatica and tie some of our in house software in to it. However, I do not have a lot of experience using “Actions” aside from the “Release” button and so have come to you for help.
Objective:
Add a PO Receipt to an existing Bill.
The Bill has already been created and is on “Hold”. I have added the “AddPOReceipt” action to my extended web service endpoint. When I POST to “AddPOReceipt” endpoint I get a 204 response to which I follow up with a GET to check the status of the request and I get a 200 response. When I look at the bill there is no receipt added to it though. What am I doing wrong?
myurl = "https://4iiii.acumatica.com/entity/ManleyEndpoint/17.200.001/Bill/AddPOReceipt"
jsonUpdate = {
'entity': {
'Type': {'value': 'Bill'},
'ReferenceNbr': {'value': '006357'},
},
'parameters': {
'ReceiptNbr': {'value': '003341'},
'ReceiptType': {'value': 'Receipt'},
'Selected': {'value': 1},
}
}
response = requests.post(url=myurl, json=jsonUpdate, headers=headers, cookies=cookies)