Skip to main content

Hi, 

We’re trying to retrieve certain cards from a collection based on whether they have a specific tag present, but we’re not having much luck.

 

Example body below using “search for cards using JSON Query” - if we search without the “query block” below, we get results, if we search with it we get an “error parsing JSON body” response

{

"query": {

    "type": "tag",

    "op": "EXISTS",

    "ids": E

      "TAGNAME"

    ] }

  "searchTerms": "search string",

  "queryType": "cards",

  "collectionIds":

    "COLLECTIONID"

  ]

}

 

Any help would be appreciated

Hey ​@Rhys Hounsell 👋

It looks like you’re missing a comma after the query object. The updated JSON would look like this:

{
"query": {
"type": "tag",
"op": "EXISTS",
"ids":
"TAGNAME"
]
},
"searchTerms": "search string",
"queryType": "cards",
"collectionIds": o
"COLLECTIONID"
]
}

Let me know if this works for you!


Thanks Joe, 

 

That cleared things up- sometimes its the simplest thing you can’t see for looking!

 

Appreciate your help!

 

Cheers

Rhys


One other thing worth noting:

If I build this exact query out using the tooling here https://developer.getguru.com/reference/postv1searchquerysearchbyjsonforcardmanager

it is rejected as an invalid query - not sure why that is but it seems like the tooling isn't’ working 100% correctly?

Thanks again for your help,

Rhys


Reply