Search code examples
acumatica

How can I delete a record from a custom grid / table using the REST API?


I don't see any examples in the Acumatica help or in the training on how to actually remove / delete a record from a custom screen / table using the REST (Contract-based) API. How would one go about doing this? Is it a PUT with different syntax? I did see a Stack Overflow case on deleting detail records - I tried this method and it didn't work for me.

Acumatica REST API - Delete SalesOrderDetail

That also refers to a header/detail setup, which I don't have (only grid details). Any help would be appreciated. Thanks...


Solution

  • You can simply send a DELETE request with the id or the key of your record. That will result in the deletion of the specified record.

    curl --location --request DELETE 'https://ACUMATICA_URL/entity/Default/20.200.001/ShippingBox/d9ec53fa-b454-4cf0-b398-817b3b1a84aa'
    
    curl --location --request DELETE 
    'http://<Base endpoint URL>/entity/Default/20.200.001/ShippingBox/TEST'
    

    You can find more information at the following links:

    Remove a Record by Key Fields

    Remove a Record by ID