Delete a Related Record
The various details of how to delete a related record is explained in this section.
HTTP Method | ||||
Endpoint URL | See Endpoint | |||
Resource | /records/{repositoryName}/deleteRelatedRecord | |||
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 | |
relationshipName | Name of the relationship. The relationship name is case sensitive. | query | string | |
targetRepositoryName | Name of the target repository. | query | string | |
childId | Unique ID of the child record. | query | string | |
idExt | Unique ID and extension of the record. | query | string | |
childIdExt | Unique ID and extension of the child record. | query | string | |
Media Type | application/json | |||
Request Model |
{ "repositoryName": "string", "relationshipName": "string", "targetRepositoryName": "string", "childId": "string", "childIdExt": "string", "deleteRelRecords": false, "id": "string", "idExt": "string" } |
|||
Response Model |
{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ], "success": true } |
|||
Request Example | Deleting a record where the product ID is
31 from repository name "Customer" having relationship with product ID
32 from repository named "address".
{ "repositoryName": "customer", "id": "31", "idExt": "31", "relationshipName": "officeaddress", "targetRepositoryName": "address", "childId": "32", "childIdExt": "32" } |
|||
Response Example | The response returns the message that the record is successfully deleted.
{ "responseMessages": [ { "code": "SVC-11032", "message": "Record(s) deleted successfully.", "type": "Info" } ], "records": [], "success": true } |
|||
Success Response | Example:
Code: 200 successful operation |
|||
Error Response |
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 . |
Copyright © Cloud Software Group, Inc. All rights reserved.