v2 API - General API Error on edit/add Cat with "animalColor" provided

41 views
Skip to first unread message

Grant Lanham

unread,
Feb 1, 2023, 12:23:26 AM2/1/23
to apidev
Hello all,

I found a "General API Error" when I try to insert an "animalColor", see below.

I thought that maybe it needed to match one of the available colors available in "animalColors", so I also tried "Tuxedo" as an animal color. It also resulted in General Error. I found this on production.

Request
{
    "objectType": "animals",
    "objectAction": "edit",
    "values": [
        {
            "animalID": "...",
            "animalColor": "Tuxedo"
        }
    ],
    "token": "{{token}}",
    "tokenHash":"{{tokenHash}}"
}  
Result
{
    "status": "error",
    "messages": {
        "generalMessages": [
            {
                "messageCriticality": "error",
                "messageText": "General API error.",
                "messageID": "1000"
            }
        ],
        "recordMessages": []
    }
}

Richard Saffell

unread,
Feb 1, 2023, 8:38:09 AM2/1/23
to apidev, gr...@oceanhillcats.com
Grant,

We're still looking into this, but this is what we've found so far. The documentation isn't clear about these color fields.

The API provides access to two different color fields. The first is animalColorDetails which is a string field that you can update with any value you want.

Two other fields in the API are related - animalColor and animalColorID. This is the "generic" color, which is typically sent to the legacy adoption listing websites. animalColorID is the field you would update using the values from animalColors. The animalColor field is the string value from that ID.

Here's an example that might be helpful:

animalColorID: 67 (updateable)
animalColor: Tuxedo (not updateable - from animalColorID)

animalColorDetails: Black and white tuxedo with white on two paws (updateable)

Hope that helps,

Richard

Richard Saffell

unread,
Feb 1, 2023, 8:39:31 AM2/1/23
to apidev, gr...@oceanhillcats.com
I also meant to mention that we're looking into why you were receiving an unhelpful error message.
Reply all
Reply to author
Forward
0 new messages