This document provides details of the Profile API.
We recommend that you read both the Data API Introduction page and the Ometria data architecture pages before integrating with Ometria.
Profile Methods
Profile objects
Fetch list of profiles
Path
GET /profiles/
Description
Return profiles as a JSON array
Request Parameters
limit | Number of records to fetch. Max 250. |
type | integer (default: "10") |
in | query |
offset | Index of first record to fetch |
type | integer |
in | query |
updateSince | Only return profiles that have been updated since this date* |
type | string (date) |
in | query |
*This does not return profiles that have entered or exited a dynamic segment in that time.
Response
200 OK Profile |
List of profile objects |
403 Forbidden | API key is not authorised to access this resource |
404 Not Found | List with specified ID was not found |
Response Example (200 OK)
[
{
"@type": "profile",
"country": null,
"customer_id": "55555",
"date_of_birth": "1984-04-22",
"dates": {
"acquired": "2014-11-01T15:34:35+00:00",
"first_purchase": "2015-02-01T05:44:55+00:00",
"first_seen": "2014-12-01T05:44:55+00:00",
"last_purchase": "2015-02-01T05:44:55+00:00",
"last_seen": "2015-02-01T05:44:55+00:00"
},
"email": "bob22@example.com",
"firstname": null,
"gender": "m",
"id": "2695-c473e2-4aaf58",
"identities": [
{
"id": "bob22@example.com",
"type": "email"
}
],
"lastname": "smith111",
"marketing_optin": null,
"middlename": null,
"name": "smith111",
"prefix": null,
"properties": {
"custom_key": "custom value"
},
"seen": false,
"stats": {
"aov": 99.17,
"orders": 1,
"orders_attempted": 1,
"revenue": 99.17,
"total_items": 5,
"visits": 20
},
"suffix": null,
"tags": [
"Attended VIP event 2017"
]
}
]
Fetch individual profile
Paths
Both of the following are supported, you can use either:
- GET /profiles/{profile_id}
- GET /profiles?email={email_address}
Description
Returns profile as a JSON object.
Request Parameters
profile_id | ID of the profile to fetch. |
email_address | Email address of the profile to fetch. |
type | string |
in | path |
Response
200 OK Profile |
Return a single profile record |
403 Forbidden |
API key is not authorised to access this resource |
404 Not Found |
Profile with specified ID was not found |
Response Example (200 OK)
{
"@type": "profile",
"country": null,
"customer_id": "55555",
"date_of_birth": "1984-04-22",
"dates": {
"acquired": "2014-11-01T15:34:35+00:00",
"first_purchase": "2015-02-01T05:44:55+00:00",
"first_seen": "2014-12-01T05:44:55+00:00",
"last_purchase": "2015-02-01T05:44:55+00:00",
"last_seen": "2015-02-01T05:44:55+00:00"
},
"email": "bob22@example.com",
"firstname": null,
"gender": "m",
"id": "2695-c473e2-4aaf58",
"identities": [
{
"id": "bob22@example.com",
"type": "email"
}
],
"lastname": "smith111",
"marketing_optin": null,
"middlename": null,
"name": "smith111",
"prefix": null,
"properties": {
"custom_key": "custom value"
},
"seen": false,
"stats": {
"aov": 99.17,
"orders": 1,
"orders_attempted": 1,
"revenue": 99.17,
"total_items": 5,
"visits": 20
},
"suffix": null,
"tags": [
"Attended VIP event 2017"
]
}
ProfileDates: object
Contains date / time information of a profile
Value | Type | Description |
first_seen | string (date-time) | The date time when this contact was first seen. |
last_seen | string (date-time) | The date time when this contact was last seen. |
first_purchase | string (date-time) | The date time when this contact first placed an order. |
last_purchase | string (date-time) | The date time when this contact last placed an order. |
acquired | string (date-time) | The date time when this contact was acquired. |
marketing_optin | string (date-time) | The date time when this contact opted in to receive marketing emails. |
marketing_optout | string (date-time) | The date time when this contact opted out to no longer receive marketing emails. |
Example
{
"acquired": "2014-11-07T15:34:35+00:00",
"first_purchase": "2015-02-01T05:44:55+00:00",
"first_seen": "2014-12-01T05:44:55+00:00",
"last_purchase": "2015-02-01T05:44:55+00:00",
"last_seen": "2015-02-01T05:44:55+00:00",
"marketing_optin": "2014-11-09T15:34:35+00:00",
"marketing_optout": null
}
ProfileIdentities: object
Contains identity information used to construct the profile
Value | Type | Description |
id | string | The ID of the profile |
type | string | The type of ID |
Example
[
{
"id": "bob22@example.com",
"type": "email"
}
]
ProfileLists: object
Contains the saved segments (lists) that a profile belongs to.
Value | Type | Description |
id | string | The ID of the list |
title | string | The title of the list |
type | { STATIC , DYNAMIC } | The type of list |
Example
[
{
"id": 123,
"title": "Title of the list",
"type": "STATIC"
}
]
ProfileStats: object
Contains numeric stats of a profile.Value | Type | Description |
orders | number | Number of valid orders this profile has placed. |
orders_attempted | number | Number of orders attempted by this contact profile (this includes valid as well as invalid orders). |
total_items | number | Number of items purchased. |
aov | number (float) | Average order value of this contact profile. |
revenue | number (float) | Total revenue for this contact profile. |
visits | number | Total number of visits for this contact profile. |
Example
{
"aov": 49.72,
"orders": 2,
"orders_attempted": 3,
"revenue": 99.44,
"total_items": 5,
"visits": 20
}
Comments
0 comments
Please sign in to leave a comment.