The JourneyApps API (V1) → 4. Retrieving a Single Object
Retrieving a Single Object
This function allows you to retrieve a single object of the given type and with the given ID.
Relative URL | HTTP Request Method |
---|---|
/api/v1/object-type/object-id.format | GET |
json
or xml
), or leave it out.
Parameters
This function does not take any parameters.
Response
The response includes the single object requested. The format of the object is the same as for Retrieving All Objects.
Example
Retrieving Related Objects
You can optionally retrieve related objects that the object belongs to in one operation.
Parameters
Specify the relationship names for the related objects you want to retrieve as a comma-separated list in a parameter named embed
.
Example
Let's say our Data Model allows for task
objects that belong to category
objects, so that each category has many tasks. When we're retrieving a task, we can embed the related category that it belongs to as follows:
The response features the task
object with the category
object that it belongs to embedded inside it: