You are viewing the Resources for the older version of JourneyApps (V3). JourneyApps V4 is the new default for all new apps since July 1, 2016.

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
Note: Replace object-type with the type of object that you wish to retrieve (as defined in your app's Data Model) and object-id with the ID of the specific object. Replace format with the response data format (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:

Previous Section Next Section