Retrieve individual records using the get sObject rows endpoints in REST API.
Record Types
You can use REST API to retrieve many types of records. This table shows the record types that are most relevant to Marketing Cloud.
| Record Type | API Name |
|---|---|
| Contact records | Contact |
| Lead records | Lead |
| Campaigns | Campaign |
| Marketing segments | MarketSegment |
| Flows | FlowRecord |
| Content workspaces | ManagedContentSpace |
| Content items | ManagedContent |
Prerequisite
Before you send a request to REST API, obtain a bearer token. For more information, see Connect to REST-based APIs.
Send the Request
To retrieve a record, send a GET request to /services/data/{apiVersion}/sobjects/OBJECT_API_NAME/RECORD_ID. Replace OBJECT_API_NAME with the API name of the type of object that you want to retrieve, and replace RECORD_ID with the record ID.
GET /services/data/{apiVersion}/sobjects/OBJECT_API_NAME/RECORD_ID HTTP/1.1
Host: YOUR_SUBDOMAIN.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN
If the request is successful, the response body varies depending on the object type of the record that you retrieved. This example shows a response body for a Flow record.
{
"attributes": {
"type": "FlowRecord",
"url": "/services/data/{apiVersion}/sobjects/FlowRecord/2aF1Q000000PAvMUAW"
},
"Id": "2aF1Q000000PAvMUAW",
"OwnerId": "0051Q00000boglcQAA",
"IsDeleted": false,
"Name": "2023 Running Shoe Model Clearance Flow",
"CreatedDate": "2024-01-18T22:20:35.000+0000",
"CreatedById": "0051Q00000boglcQAA",
"LastModifiedDate": "2024-01-18T22:20:35.000+0000",
"LastModifiedById": "0051Q00000boglcQAA",
"SystemModstamp": "2024-01-18T22:20:35.000+0000",
"LastViewedDate": "2024-01-19T17:52:59.000+0000",
"LastReferencedDate": "2024-01-19T17:52:59.000+0000",
"FlowDefinition": "3001Q000000Dnpq",
"AssociatedRecordId": "7011Q000001SXgxQAG",
"Description": null,
"SegmentId": null,
"Type": "Segment",
"ProgressStatus": "Draft",
"ScheduledStartDate": "2024-01-18T22:20:35.000+0000",
"ErrorCode": null,
"ErrorDetails": null,
"FlowCategory": null,
"FlowSubcategory": null,
"IsPaused": false,
"FlowType": "SegmentTrig"
}