Skip to main content
Solved

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


Forum|alt.badge.img+3

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

Best answer by Brian Turcotte

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @imp_dev!

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

 

Best,

Brian


Brian Turcotte
Forum|alt.badge.img+37

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


Forum|alt.badge.img+3
  • Author
  • Contributor IV
  • 8 replies
  • June 21, 2023

Hi Brian,

Thank you for helping here!

Regards, Evgeniy