Delete a Record

The various details of how to delete a record is explained in this section.

Warning: You cannot delete a record with the EffectiveDate attribute and when the record state is UNCONFIRMED.
HTTP Method
Endpoint URL See Endpoint
Resource /records/{repositoryName}/deleteRecord
Request Parameters Specify the following parameters:
Name Description Type Data Type
Required
repositoryName Name of the repository. path string
id Unique ID of the record. query string
idExt Unique ID and extension of the record. query string
Optional
deleteRelRecords Set to true if you want to delete all related records. query boolean
workItemId Unique ID of the work item. query string
Note: Either request body or query parameters are required. If both are specified, the body parameters are used.
Media Type application/json
Request Model
{
  "repositoryName": "string",
  "id": "string",
  "idExt": "string",
  "workItemId": "string",
  "deleteRelRecords": false
}
Response Model
{
  "responseMessages": [
    {
      "code": "string",
      "message": "string",
      "type": "string"
    }
  ],
  "success": true
}
Request Example Deleting a record having product ID record1 and ID extension record1 in the repository named "Company".
Endpoint:http://localhost:8080
Resource:/eml/rest/records/Company/deleteRecord
Response Example The response returns the message that all the records matching the criteria are deleted successfully.
{
   "responseMessages": [   {
      "code": "SVC-11032",
      "message": Record(s) deleted successfully.",
      "type": "Info"
   }],
   "records": [],
   "success": true
}
Success Response Example:

Code: 200 successful operation

Error Response
Attention: The response is displayed for validation error.
If the response is unsuccessful, either of the following error code is displayed:

Example:

Code: 400 Bad request

OR

Code: 404 Record not found

OR

Code: 500 Invalid Request

For error code response, see Error Handling .