Deleting Records
In order to delete a record, you need to specify the record ID and use the DELETE REST resource. DELETE resource can be called using POST and have only an ID parameter.
id: ID of the record being deleted.
The example below will delete a record with ID “001E000000HUJObIAP”:
POST https://<your-portal-domain>/rest/2.0/delete/<record-ID>
-H "Authorization: Bearer <token>"
-H "Content-Type: application/json"
-H "Accept: application/json"
e.g: https://porta.magentrixcloud.com/rest/2.0/delete/001E000000HUJObIAP
-H "Authorization: {token}"
-H "Content-Type: application/json"
If successful, the JSON response will have the "HasError" property set to false and the "Id" property will be populated with the record id. Otherwise, "HasError" will be true and "Errors" property will contain one or more records indicating the reason record deletion failed.
{
"Id":"001E000000HUJObIAP",
"Errors":[],
"HasError":
}