Newer Version Available
Get Field Values from a Standard Object Record
You use the GET method of the sObject Rows resource to retrieve field values from a record.
You can specify the fields you want to retrieve with the optional fields parameter. If you specify fields that don’t exist or are inaccessible to you by field-level security, a 400 error response is returned.
If you don’t use the fields parameter, the request retrieves all standard and custom fields from the record. These retrieved fields are the same as the fields returned by an sObject Describe request for the object. Fields that are inaccessible to you by field-level security are not returned in the response body.
In the following example, the Account Number and Billing Postal Code are retrieved from an Account.
- Example for retrieving values from fields on an Account object
-
1/services/data/v51.0/sobjects/Account/001D000000INjVe?fields=AccountNumber,BillingPostalCode - Example request body
- None required
- Example response body
-
1{ 2 "AccountNumber" : "CD656092", 3 "BillingPostalCode" : "27215", 4}