Skip to main content
Solved

"name" filter on get campaigns not working

  • 17 May 2024
  • 2 replies
  • 47 views

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":"''filterffliter]'' is not an allowed query parameter.","source":{"parameter":"filterffliter]"},"links":{},"meta":{}}]}'

 

Please may you help me out with this thank you

2 replies

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')")

 

Badge

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

Reply