pmfith
pmfith

Reputation: 909

How can I use the REST API to Remove Hold on a Bill?

I've created a bill using the REST API - but now I want to release it (which exists as an action) - but I'm assuming I have to remove the HOLD before I do that. I don't see that as an action. How would I go about doing that? And if this topic exists somewhere in the documentation, please let me know - I haven't been able to find anything.

Thanks...

Upvotes: 1

Views: 384

Answers (2)

Samvel Petrosov
Samvel Petrosov

Reputation: 7706

You can extend the Bills endpoint and add action to it. You need to add a new action to the Actions node of the Bills endpoint in the extended Web Service Endpoint like below enter image description here Then you can use that action like the below:

curl --request POST 'http://localhost/Acumatica/entity/DefaultExt/22.200.001/Bill/ReleaseFromHold' 
--data-raw '{
   "Entity": {
    "Type": {"value":"Bill"},
    "ReferenceNbr":{"value":"003238"}
   }
}'

Upvotes: 1

samol518
samol518

Reputation: 1404

Since the hold status is still defined using the hold field, you can achieve that result by passing the false value to the Hold field.

{{BaseUrl}}/entity/default/22.200.001/Bill

{
    "id": "589535fc-4a60-ed11-84a8-00e04cc71f57",
    "Hold": {"value": false}
}

Upvotes: 1

Related Questions