Solved

How to get subscription status when getting profiles in list/segment?

  • 21 May 2023
  • 7 replies
  • 305 views

Badge +1

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.

 

icon

Best answer by Brian Turcotte 15 June 2023, 18:31

View original

7 replies

Userlevel 7
Badge +36

Hi @NhaPham!

 

I’m going to check on this with Engineering for you, and I will update the thread as soon as possible.


Best,

Brian

@Brian Turcotte 
Hi Brian! 
Any updates on that?

 

Best, 
Vladislav

Userlevel 7
Badge +36

Hi @Vladislav and @NhaPham,

 

I’m still working with Engineering to determine if this could possibly be a bug - I will provide another update shortly!

Thanks,

Brian

Badge +1

Hi @Brian Turcotte, Thanks for the update.

Userlevel 7
Badge +36

Hi @NhaPham!

It appears this is likely a bug and I am working with Engineering to document this. I will update the thread when there is more information.

 

Thank you,

Brian

Hi @Brian Turcotte 

Any update on this. 

Userlevel 7
Badge +36

Hi @divyank31!


My apologies for the delay on this - I’m still working with our Product Team to determine the cause but will update the thread shortly.

 

Best,

Brian

Reply