Retrieve people’s subscription statuses (subscriptions)
The subscriptions Ortto endpoint of the person entity is used to retrieve subscription statuses from one or more person records in Ortto’s customer data platform (CDP).
This page provides descriptions of this endpoint’s:
- the response payload.
HTTP method and request resource
POST https://api.ap3api.com/v1/person/subscriptionsNOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/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/jsonfor the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEYContent-Type: application/jsonRequest body
The request body consists of a JSON object whose valid elements are listed in the table below.
The following JSON object is an example of field and object data that Ortto can recognize to get data from one or more person records in your Ortto account’s CDP.
Example subscription status request body from Ortto’s CDP
json
{ "people": [ { "email": "chris@example.com" } ] }Valid request body elements
The following table lists all valid request body elements (arrays, objects, or fields), which are available to this endpoint.
Element
Type
Required
Description
people
arrayof objectsRequired
The
peoplearray consists of an array of objects, where each object contains data associated with the person whose subscription status you wish to retrieve.
peoplemust contain at least one of the optional objects:person_id,external_id.The API will defer to
person_idfirst (if set), thenexternal_id. You will receive an error if none of the strings are provided.
stringOptional (at least one string required)
The email address of the person whose subscription statuses you wish to retrieve.
person_id
stringOptional (at least one string required)
A string identifying the person by their unique ID number.
external_id
stringOptional (at least one string required)
A string identifying the person by their external ID number.
Response payload
The response payload consists of a JSON object whose elements are listed in the table below.
The following JSON object is an example of people’s data that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.
Example subscription status response payload from Ortto’s CDP
json
{ "people": [ { "person_status": "merged", "person_id": "00624536230993474f078a00", "subscriptions": [ { "audience_id": "625f7213a914327aa1999b43", "audience_name": "Weekly updates", "member_from": "2022-04-20T02:38:11Z", "subscribed": true, "subscribed_from": "2022-04-20T02:38:11Z", "sms_opted_in": false }, { "audience_id": "6241681069639ee210f8a298", "audience_name": "Subscribers", "member_from": "2022-03-31T05:03:31Z", "subscribed": true, "subscribed_from": "2022-03-31T05:03:31Z", "sms_opted_in": false }, { "audience_id": "6241681069639ee210f8a29a", "audience_name": "Engaged subscribers", "member_from": "2022-03-31T12:56:14Z", "subscribed": true, "subscribed_from": "2022-03-31T12:56:15Z", "sms_opted_in": false } ], "email_permissions": true, "sms_permissions": false } ] }Response payload elements
The following table lists all elements (arrays, objects, or fields) in the response from a request to this endpoint.
Element
Type
Description
people
arrayof objectsThe
peoplearray consists of an array of objects, where each object contains data associated with the person specified in the response. Each of these objects can contain:*
person_statusandperson_idobjects*
subscriptionsarrays*
email_permissionsandsms_permissionsbooleans.
person_status
stringIdentifies the person’s data as having been merged into your customer data platform (CDP).
person_id
stringA string identifying the person by their unique ID number.
subscriptions
arrayof objectsAn array of fields identifying the audiences the person is a member of, and their email and SMS subscription status for those audiences.
audience_id
stringThe unique identification number for the audience.
audience_name
stringThe name of the audience in your Ortto account (note, this is not the public audience name).
member_from
stringThe date and time the person became a member of the audience. Format is ISO 8601.
subscribedboolean
If
true, the person is subscribed to the audience. Otherwise,false.
subscribed_from
stringThe date and time the person became a subscriber of the audience. Format is ISO 8601.
unsubscribed_from
stringThe date and time the person became unsubscribed from the audience. Format is ISO 8601.
sms_opted_inboolean
If
true, the person is opted-in to SMS to the audience. Otherwise,false.
sms_opted_out_from
stringThe date and time the person became opted-out from SMS for the audience. Format is ISO 8601.
email_permissions
booleanIf
true, the person is subscribed to all email. Otherwise,false.
sms_permissions
booleanIf
true, the person is opted-in to all SMS. Otherwise,false.