Newer Version Available
Delete Records Using sObject Relationships
Deletes records based on the specified object, record ID, and relationship field
name.
- URI
- /services/data/vXX.X/sobjects/sObject/id/relationship_field_name
- Formats
- JSON, XML
- HTTP Method
- DELETE
- Authentication
- Authorization: Bearer token
- Parameters
-
Parameter Description sObject The name of the object. For example, Account.
id The identifier of the record. For example, 001R0000005hDFYIA2.
relationship_field_name The name of the field that contains the relationship. For example, Opportunities.
- Response Body
- A response body isn’t returned for a deletion via DELETE.
- Error Responses
- If the fields parameter is used with fields that don’t exist or aren’t visible to the consumer by field-level security, a 400 error response is returned. For other error messages, see Status Codes and Error Responses.
- Examples
- For examples of using sObject Relationships to delete a relationship record, see Traverse Relationships with Friendly URLs.