Skip to content

Commit 6651efc

Browse files
committed
Add query parameter info to Computed Traits
1 parent 22c48f4 commit 6651efc

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/engage/profiles/computed-traits.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Personas then processes your Trait edits. While the edit task runs, the trait re
173173

174174
## Accessing your Computed Traits using the Profiles API
175175

176-
You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, if you can query for the `emails_opened_last_30_days` with the following GET request:
176+
You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, you can query for the `emails_opened_last_30_days` with the following GET request:
177177

178178
```
179179
https://profiles.segment.com/v1/spaces/<workspace_id>/collections/users/profiles/email:[email protected]/traits?include=emails_opened_last_30_days
@@ -193,6 +193,12 @@ returns:
193193
}
194194
}
195195
```
196+
**Traits**
197+
You can query a user's traits (such as `first_name`, `last_name`, and more):
198+
199+
`https://profiles.segment.com/v1/spaces/<space_id>/collections/users/profiles/<external_id>/traits`
200+
201+
By default, the response includes 20 traits. You can return up to 200 traits by appending `?limit=200` to the querystring. If you wish to return a specific trait, append `?include={trait}` to the querystring (for example, `?include=age`). You can also use the ``?class=audience​`` or ``?class=computed_trait​`` URL parameters to retrieve audiences or computed traits specifically.
196202

197203
You can read the [full Profile API docs](/docs/personas/profile-api/) to learn more.
198204

src/personas/computed-traits.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Personas then processes your Trait edits. While the edit task runs, the trait re
172172

173173
## Accessing your Computed Traits using the Profiles API
174174

175-
You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, if you can query for the `emails_opened_last_30_days` with the following GET request:
175+
You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, you can query for the `emails_opened_last_30_days` with the following GET request:
176176

177177
```
178178
https://profiles.segment.com/v1/spaces/<workspace_id>/collections/users/profiles/email:[email protected]/traits?include=emails_opened_last_30_days
@@ -193,6 +193,13 @@ returns:
193193
}
194194
```
195195

196+
**Traits**
197+
You can query a user's traits (such as `first_name`, `last_name`, and more):
198+
199+
`https://profiles.segment.com/v1/spaces/<space_id>/collections/users/profiles/<external_id>/traits`
200+
201+
By default, the response includes 20 traits. You can return up to 200 traits by appending `?limit=200` to the querystring. If you wish to return a specific trait, append `?include={trait}` to the querystring (for example, `?include=age`). You can also use the ``?class=audience​`` or ``?class=computed_trait​`` URL parameters to retrieve audiences or computed traits specifically.
202+
196203
You can read the [full Profile API docs](/docs/personas/profile-api/) to learn more.
197204

198205
## Downloading your Computed Trait as a CSV file

0 commit comments

Comments
 (0)