How to delete an animal?

19 views
Skip to first unread message

Ken Cline

unread,
May 19, 2021, 3:44:44 PM5/19/21
to apidev
I can add, &edit animals, add images, add video URLs - but I can't delete animals. I've looked through the documentation (v2) and can't find a delete action for animals (for lots of other things, but not animals). I've tried using "delete" as the action & I get an "invalid action" error. 

{
    "token":"{{token}}",
    "tokenHash":"{{tokenHash}}",
    "objectType":"animals",
    "objectAction":"delete",
    "values":
    [
        {
            "animalID": "{{animalID}}"
        }
    ]
}

The only way I've been able to "delete" an animal is to set its status to "Deleted"

{
    "token":"{{token}}",
    "tokenHash":"{{tokenHash}}",
    "objectType":"animals",
    "objectAction":"edit",
    "values":
    [
        {
            "animalID": "{{animalID}}",
            "animalStatusID":"11"
        }
    ]
}

Is there a way to truly delete an animal via the API? It can be done in the UI, so I have to believe there's a way to do it.

Thanks!

Richard Saffell

unread,
May 19, 2021, 8:40:32 PM5/19/21
to apidev, Ken Cline
Ken,

I believe you want to edit the animal and set animalStatusID to 11 (Deleted).

Richard

Reply all
Reply to author
Forward
0 new messages