Skip to content
Get started

Retrieve

pets.retrieve(floatpet_id) -> Pet
GET/pets/{petId}
ParametersExpand Collapse
pet_id: float
ReturnsExpand Collapse
class Pet:
name: str
photo_urls: List[str]
id: Optional[float]
category: Optional[Category]
id: Optional[float]
name: Optional[str]
status: Optional[Literal["available", "pending", "sold"]]
Accepts one of the following:
"available"
"pending"
"sold"
tags: Optional[List[Tag]]
id: Optional[float]
name: Optional[str]

Retrieve

import os
from barkend import Barkend

client = Barkend(
    bearer_token=os.environ.get("BARKEND_BEARER_TOKEN"),  # This is the default and can be omitted
)
pet = client.pets.retrieve(
    0,
)
print(pet.id)
{
  "name": "name",
  "photoUrls": [
    "string"
  ],
  "id": 0,
  "category": {
    "id": 0,
    "name": "name"
  },
  "status": "available",
  "tags": [
    {
      "id": 0,
      "name": "name"
    }
  ]
}
Returns Examples
{
  "name": "name",
  "photoUrls": [
    "string"
  ],
  "id": 0,
  "category": {
    "id": 0,
    "name": "name"
  },
  "status": "available",
  "tags": [
    {
      "id": 0,
      "name": "name"
    }
  ]
}