Hi,
I’m using the APIs below as version 2023-02-22 to get all profiles in the segment/list, but the response always shows the null value for the field subscriptions. “https://a.klaviyo.com/api/segments/{segment_id}/profiles/” “https://a.klaviyo.com/api/lists/{list_id}/profiles/”
Here is the response when called to get profiles in the segment:
{
"type": "profile",
"id": "Segment_ID",
"attributes": {
"subscriptions": null
},
"links": {
"self": "https://a.klaviyo.com/api/profiles/01GEDSZDYWGY3KY1RQD8KRBXB2/"
}
}
I have tried to get this profile by calling API “/api/profiles/Segment_ID/”. The response has value for subscriptions.
"subscriptions": {
"email": {
"marketing": {
"consent": "SUBSCRIBED",
"timestamp": "2022-10-28T06:15:28.991432+00:00",
"method": "API",
"method_detail": null,
"custom_method_detail": null,
"double_optin": false,
"suppressions": [],
"list_suppressions": []
}
},
"sms": {
"marketing": {
"consent": "UNSUBSCRIBED",
"timestamp": "2023-05-15T02:46:51.618160+00:00",
"method": "API",
"method_detail": ""
}
}
}
In the API reference page “https://developers.klaviyo.com/en/reference/get_list_profiles”
I saw that the response in the example has full information for subscription fields.
Please give me the way to get the correct subscription information when using API to get profiles in the segment/list.