Gets a record based on the specified object, record ID, and relationship field. The fields and field values of the record are returned in the response body. If there are multiple related records, you can retrieve the complete set of associated records.
If there’s no record associated with a relationship field, a 404 error response is returned. If the relationship field normally resolves to multiple records and no relationship set exists, a 200 response is returned. 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.
The response body is the contents of the record associated with the relationship field. Here’s an example of a request and JSON response body for a simple relationship traversal that returns the Distributor__c record associated with a relationship field on custom object Merchandise__c.