SData web service for Delete
This article describes how to delete a resource with the Web API.
Deleting
To delete a resource, you send a DELETE HTTP request on the following URL:.
http://myserver:myport/api1/x3/erp/MYENDPOINT/MYCLASS('MYKEY')?representation=MYREPR.$edit
where:
myserver:myportis your server name and port number. For examplelocalhost:8124if the SAFE X3 web server is installed locally.MYENDPOINTis the name of your Sage X3 endpoint.MYCLASSis the name of the class that you want to query. It may be a standard class likeBPCUSTOMERor a custom class that you have implemented (see the class dictionaries documentation).MYKEYis the value of the primary key of the resource. If the key is composite, the components are separated by a tilde (~).MYREPRis the name of the representation that you want to query. It may be a standard representation likeBPCUSTOMERor a custom one (see the representation dictionaries documentation).
Note MYREPR must be a representation for MYCLASS. Otherwise you will get an error. A future version of the Web API will allow you to pass only MYREPR but this version (api1) requires both parameters.
Status code
If successful, the request will return an HTTP status of 200.
Otherwise it will return an HTTP error status (4xx or 5xx).
Testing interactively
As described in the overview, you can test interactively with a tool like Postman.