Skip to content
Barkend
Search
Ctrl
K
Auto
Light
Dark
Get started
Guides
API Reference
X-ray
Get started
Go
HTTP
HTTP
TypeScript
TypeScript
Go
Go
Guides
API Reference
X-ray
Overview
Pets
Create
List
Retrieve
Delete
API Reference
Copy Markdown
Open in
Claude
Open in
ChatGPT
Open in
Cursor
Copy Markdown
View as Markdown
Pets
Add a new pet to the store.
client.Pets.
New
(
ctx
,
body
)
(
*
Pet
,
error
)
POST
/pets
List all pets.
client.Pets.
List
(
ctx
)
(
*
[]
Pet
,
error
)
GET
/pets
Find pet by ID.
client.Pets.
Get
(
ctx
,
petID
)
(
*
Pet
,
error
)
GET
/pets/{petId}
Deletes a pet.
client.Pets.
Delete
(
ctx
,
petID
)
error
DELETE
/pets/{petId}
Models
Expand
Collapse
type
Category
struct{…}
ID
int64
optional
format
int64
Name
string
optional
type
Error
struct{…}
ID
string
Machine-readable error code
Message
string
Human-readable error message
type
ErrorResponse
struct{…}
Error
Error
ID
string
Machine-readable error code
Message
string
Human-readable error message
type
Pet
struct{…}
Name
string
PhotoURLs
[]
string
ID
int64
optional
format
int64
Category
Category
optional
ID
int64
optional
format
int64
Name
string
optional
Status
PetStatus
optional
pet status in the store
Accepts one of the following:
const
PetStatusAvailable
PetStatus
=
"available"
const
PetStatusPending
PetStatus
=
"pending"
const
PetStatusSold
PetStatus
=
"sold"
Tags
[]
Tag
optional
ID
int64
optional
format
int64
Name
string
optional
type
Tag
struct{…}
ID
int64
optional
format
int64
Name
string
optional