Retrieve activity feed for a given contact

Overview

The get Ortto endpoint of the activities entity is used to retrieve data from one or more activities for a given contact in Ortto’s customer data platform (CDP).

This page provides descriptions of this endpoint’s:


HTTP method and request resource

POST https://api.ap3api.com/v1/person/get/activities

NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:

For example: https://api.eu.ap3api.com/v1/<entity/endpoint>

All other Ortto users will use the default service endpoint (https://api.ap3api.com/).


Path and query parameters

This endpoint takes no additional path and/or query parameters.


Headers

This endpoint requires a custom API key and content type (application/json for the request body) in the header of the request:

  • X-Api-Key: CUSTOM-PRIVATE-API-KEY
  • Content-Type: application/json

Request body

The request body consists of a JSON object whose valid elements are listed in the table below.

Example get activities request body from Ortto’s CDP

json

{ "person_id": "0066accc0f626f3d5b8d9000", "activities": ["act::o", "act::c"], "limit": 100, "offset": 0 }

NOTE: The rate limit for this endpoint is 1 request per second.


Valid request body elements

The following table lists all valid, optional request body elements (arrays, objects, or fields), which are available to this endpoint.

Element

Type

Description

person_id

string

A string identifying the person by their unique ID number.

activities

array

The activities array can contain multiple activity IDs, separated by commas, enabling you to specify which activities to return. Learn how to find the activity IDs.

limit

integer

The limit value determines the number of activities to be returned by Ortto from the request. Both the default and maximum values are 40.

This value also represents the "page" length of activities (for pagination purposes). This element can be used in conjunction with offset to retrieve subsequent pages of activity records. If this limit element is not specified in the request, or an integer value beyond the permitted maximum is specified, then this value is assumed to be 50.

offset

integer

The offset element represents the count of activities in your Ortto account’s CDP for pagination purposes, and is the point from which the next page of activities (defined by the limit member value) is retrieved. The offset value determines how many of the first activities will be skipped in the response.


Response payload

The following JSON object is an example of two activities that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.

NOTE: The response will vary depending on the activity you request, as we return attributes and data specific to each activity.

Example retrieve activities response payload from Ortto’s CDP

json

{ "activities": [ { "id": "00670cf62284ab8e856b0a09", "attr": { "idt::c": "670cf5ea2184750fe6832650", "idt::ei": "670cf5ea43a4cce7d66eb19a", "idt::mi": "10670cf6115e51fca84cfffe", "obj::i": "129e1081", "str::asn": "Introducing new collection", "str::b": "Chrome", "str::burl": "https://www.ortto.com", "str::bv": "Chrome 1", "str::c": "https://www.ortto.com?utm_campaign=introducing-new-collection&utm_content=introducing-new-collection&utm_medium=email&utm_source=ortto", "str::cn": "Introducing new collection", "str::ct": "email", "str::d": "Desktop", "str::p": "Mac", "str::pv": "Mac 10.15", "str::rc": "https://www.ortto.com", "str::s": "Hi John, check out our new collection!", "str::t": "Europe/Lisbon", "str::uc": "introducing-new-collection", "str::um": "email", "str::un": "introducing-new-collection", "str::us": "ortto" }, "created_at": "2024-10-14T10:44:50Z", "field_id": "act::c" }, { "id": "00670cf6205e51fca84cfffe", "attr": { "idt::c": "670cf5ea2184750fe6832650", "idt::ei": "670cf5ea43a4cce7d66eb19a", "idt::mi": "10670cf6115e51fca84cfffe", "str::asn": "Introducing new collection", "str::cn": "Introducing new collection", "str::ct": "email", "str::s": "Hi John, check out our new collection!" }, "created_at": "2024-10-14T10:44:48Z", "field_id": "act::o" } ], "meta": { "total_activities": 2, "field_ids": [ "act::o", "act::c" ], "has_more": false, "retention": { "type": "time", "max_value": 90 } }, "offset": 0, "next_offset": 2 }

How to find activity IDs

To find the activity ID(s) for the activities array, follow these steps:

  1. Navigate to CDP > Activities.
  2. Click on the activity you want to retrieve the ID for.
  3. Copy the activity ID from the URL.
Finding the activity ID in the URL.