Skip to main content
Solved

"name" filter on get campaigns not working

  • May 16, 2024
  • 2 replies
  • 72 views

Forum|alt.badge.img+1
  • Contributor I
  • 1 reply

Hello,

 

the name filtering on the get_campaigns ruby sdk does not seem to be working.

 

I am doing:  campaign_api.get_campaigns(fliter: "contains(name,#{name})")

 

and I get the following error: 

"Invalid input.","detail":"''filter[fliter]'' is not an allowed query parameter.","source":{"parameter":"filter[fliter]"},"links":{},"meta":{}}]}'

 

Please may you help me out with this thank you

Best answer by ian.montgomery

Because filter is a required property specifically for get_campaigns, the raw filter string is passed as a method parameter.  
 

KlaviyoAPI::Campaigns.get_campaigns("equals(messages.channel,'email')")

 

2 replies

Forum|alt.badge.img
  • Klaviyo Employee
  • 1 reply
  • Answer
  • May 20, 2024

Because filter is a required property specifically for get_campaigns, the raw filter string is passed as a method parameter.  
 

KlaviyoAPI::Campaigns.get_campaigns("equals(messages.channel,'email')")

 


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 1 reply
  • June 7, 2024

thank you! it wasn’t clear that the filter attribute wasn’t supposed to be passed in just the parameter!