Skip to main content
Solved

Migration from "Get Campaigns" Endpoint in Legacy API to New Revision: Clarification Needed

  • September 24, 2023
  • 4 replies
  • 87 views

Forum|alt.badge.img+4

While transitioning from the Legacy API to the new revision, I encountered the following under the 'relationships' section in the sample response of the new API:


"relationships": { "campaign-messages": { "data": [ { "type": "campaign-message", "id": "string" } ], }


I noticed that the data for "campaign-messages" is presented in an array format, implying that there could be multiple campaign messages associated with a single campaign.

Could someone please confirm if my understanding is correct? If it is, could I also get an explanation or a potential scenario in which a campaign would incorporate more than one campaign message? Any insights would be appreciated.

Best answer by Kim Strauch

Hey @santiagosanti! A campaign will typically have one message associated with it but could have multiple messages in the case that an A/B test has been configured. In that case I believe you may have a campaign message for each of the variations in your test. 

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

4 replies

Kim Strauch
Klaviyo Employee
Forum|alt.badge.img+9
  • Klaviyo Employee
  • 91 replies
  • Answer
  • September 24, 2023

Hey @santiagosanti! A campaign will typically have one message associated with it but could have multiple messages in the case that an A/B test has been configured. In that case I believe you may have a campaign message for each of the variations in your test. 


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • December 15, 2023

Hello,

I have some concerns and questions regarding the migration from the Legacy API to the new revision API to get campaign related data. I have not yet migrated to the new revision API because I have observed that it may not offer the same level of performance as the legacy API.

In the legacy API, all the necessary data, included and excluded list attributes, campaign message attributes, and total recipients, is available in a single API call. However, in the new revision API, it seems that I would need to make multiple API calls to retrieve the same information. This could potentially slow down the data retrieval process and impact performance.

Additionally, I am having difficulty locating where I can retrieve the "campaign - is segmented" value by campaign ID in the new API.

Thank you for your assistance. I look forward to your response.


Brian Turcotte
Forum|alt.badge.img+37

Hi @santiagosanti!

The API team is currently working on ways to make this easier in later releases, so I’ll update the thread when there are further updates!

 

Best,

Brian


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • June 5, 2024

Hi @Brian Turcotte,

Any updates on this? The deprecation of the Legacy API is near, and I'm concerned about performance and locating the "campaign - is segmented" value in the new API revision.

Thanks!