Custom Values (sub_id)

You may want to use save an identifier for your User when creating Votes, Favourites or uploading Images. This lets you filter when retreive these items later on.

Just use a custom value as the sub_id in the body when making the POST request…

You can then retrive that users Votes by adding sub_id as a Query parameter e.g. GET https://api.thecatapi.com/v1/votes?sub_id=User-1234

You can alse use this when getting Images, if there exisits a Vote or Favourite matching the Image and sub_id then it will be attached to the Image object e.g. ./images/search?sub_id=User-1234

Create Vote Request Body
POST https://api.thecatapi.com/v1/votes
{
  "image_id": "0SxW2SQ_S",
  "value": 1,
  "sub_id": "User-1234"
}
Getting a users Votes Response
GET https://api.thecatapi.com/v1/votes?sub_id=User-1234
[{
  country_code: "BR"
	created_at: "2018-12-10T02:44:39.000Z"
	id: 47889
	image_id: "0SxW2SQ_S""
	sub_id: "User-1234"
	value: 1
}]
No PII

Please don’t use emails or name or anything else personally identifiable. An ID is fine.