Solved

Relations between campaign and list in the new date-versioned API

  • 9 June 2023
  • 3 replies
  • 60 views

Badge +2

Hi there,

In API v1 from the endpoint api/v1/campaigns we retrieved assigned list and segments in the response property “lists“, e.g.:

    "object": "$list",
"data": [
{
"object": "campaign",
"id": "01H2DXVPCB3B1FB7RE2CHS329Y",
"subject": "New Cool Feature",
"from_email": "info@blabla.com",
"from_name": "Blabla",
"sent_at": "2023-06-08 18:44:52",
"send_time": "2023-06-08 18:45:00",
"name": "Blabla Campaign Name",
"lists": [
{
"object": "list",
"id": "YvF869",
"name": "Blabla Master Consumer Segment",
"list_type": "segment",
"folder": null,
"created": "2021-06-02 16:44:56",
"updated": "2022-07-27 21:10:08",
"person_count": 198321
}
],

But I can’t find this relationship in the new date-versioned API nor in Campaigns or Lists/Segments APIs.

This campaign property is crucial for one of our clients.

Please advise how we can get it in the new date-versioned API.

Thanks & regards,

Evgeniy

icon

Best answer by Brian Turcotte 16 June 2023, 22:14

View original

3 replies

Userlevel 7
Badge +36

Hi @imp_dev!

I’m going to check with Engineering about this and I will update the thread as soon as possible!

 

Best,

Brian

Userlevel 7
Badge +36

Hi @imp_dev!

My apologies for the delay here! We actually do include the ID of the targeted list/campaign in the response under the “included” audiences:
 


If you needed additional information about the targeted audiences, you would just issue calls to GET /api/list or GET /api/segment using the ID from the previous call.

 

I hope this helps, and thanks for using the Community!

- Brian

Badge +2

Hi Brian,

Thank you for helping here!

Regards, Evgeniy

Reply