Retrieving multiple animals by ID with one request

25 views
Skip to first unread message

Tamas Buzsik

unread,
Dec 12, 2022, 11:31:07 AM12/12/22
to apidev
Hi,
I would need to pass multiple animal ID's as filters, so I can retrieve multiple animals by ID in one request. 
I couldn't really find related info in the V5 docs, so I searched this group and another related conversation came up from a few years ago > https://groups.google.com/a/rescuegroups.org/g/apidev/c/JGrwQiexO1o/m/t4REWGUAAwAJ
However the method described there did not work for me (either because it was still on V2 or because I'm doing something wrong)
When I try to pass the animalID-s in the data as filters like this, I get "animalID is not a valid filter field":

    "data": {
        "filters":[
        {
            "fieldName":"animalID",
            "operation":"equals",
            "criteria":["10000554", "10003742"]
        }]
    }

If I try exactly what is in the other conversation, trying to pass it as search instead of data, I get all the animals in the api without any filter applied..

What am I doing wrong?
Thanks,
Tamas

Tamas Buzsik

unread,
Dec 12, 2022, 11:37:59 AM12/12/22
to apidev, Tamas Buzsik
Ok I just realized, that animal.id is the solution, instead of animalID. Solved!
Reply all
Reply to author
Forward
0 new messages