Get Child Records

GET {{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID/child-relationships/:RELATIONSHIP_NAME

Get child records for a specified record and child relationship name. Relationships are connections between records. On a record detail page, each record in a related list has a child relationship to the parent record.

Request Params

KeyDatatypeRequiredDescription
fieldsnullSpecifies the fields to return. If this property is specified, the response is a union of fields and optionalFields.
If the context user doesn’t have access to a field, an error is returned.

If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter.

Specify names in the format ObjectApiName.FieldName. You can get any field that has a named relationship to this record. There is no limit to the number of fields you can specify. | | optionalFields | null | | A collection of optional field names. If a field is accessible to the context user, it’s included in the response. If a field isn’t accessible to the context user, it isn’t included in the response, but it doesn’t cause an error. Specify names in the format ObjectApiName.FieldName. You can get any field that has a named relationship to this record. There is no limit to the number of fields you can specify. | | page | null | | The page offset from which to begin returning records. The default value is 0, which returns records from the first page. For example, for page=2 and pageSize=10, the first record returned is the 21st record in the list. | | pageSize | null | | The maximum number of child records to return on a page. The default value is 5. | | pageToken | null | | A token that represents the page offset. |

RESPONSES

status: OK

{"count":1,"currentPageToken":"1;5;001B000000UnQ2wIAF;Contacts;Contact.Id,Contact.Name;","currentPageUrl":"/services/data/v58.0/ui-api/records/001B000000UnQ2wIAF/child-relationships/Contacts?fields=Contact.Id%2CContact.Name\u0026page=1\u0026pageSize=5","nextPageToken":null,"nextPageUrl":null,"previousPageToken":null,"previousPageUrl":null,"records":[{"apiName":"Contact","childRelationships":{},"eTag":"c3d33add9008aed557a1efa68173aa9b","fields":{"AccountId":{"displayValue":null,"value":"001B000000UnQ2wIAF"},"Id":{"displayValue":null,"value":"003B00000097MToIAM"},"Name":{"displayValue":null,"value":"Jack Rogers"}},"id":"003B00000097MToIAM","lastModifiedById":"005B0000003TOI6IAO","lastModifiedDate":"2017-08-18T14:46:22.000Z","recordTypeId":"012000000000000AAA","recordTypeInfo":null,"systemModstamp":"2017-08-18T14:46:22.000Z","weakEtag":1503067582000}]}