# Pets ## Create `client.pets.create(PetCreateParamsbody, RequestOptionsoptions?): Pet` **post** `/pets` Add a new pet to the store. ### Parameters - `body: PetCreateParams` - `name: string` - `photoUrls: Array` - `id?: number` - `category?: Category` - `id?: number` - `name?: string` - `status?: "available" | "pending" | "sold"` pet status in the store - `"available"` - `"pending"` - `"sold"` - `tags?: Array` - `id?: number` - `name?: string` ### Returns - `Pet` - `name: string` - `photoUrls: Array` - `id?: number` - `category?: Category` - `id?: number` - `name?: string` - `status?: "available" | "pending" | "sold"` pet status in the store - `"available"` - `"pending"` - `"sold"` - `tags?: Array` - `id?: number` - `name?: string` ### Example ```typescript import Barkend from 'barkend'; const client = new Barkend({ bearerToken: process.env['BARKEND_BEARER_TOKEN'], // This is the default and can be omitted }); const pet = await client.pets.create({ name: 'doggie', photoUrls: ['string'] }); console.log(pet.id); ``` ## List `client.pets.list(RequestOptionsoptions?): PetListResponse` **get** `/pets` List all pets. ### Returns - `PetListResponse = Array` - `name: string` - `photoUrls: Array` - `id?: number` - `category?: Category` - `id?: number` - `name?: string` - `status?: "available" | "pending" | "sold"` pet status in the store - `"available"` - `"pending"` - `"sold"` - `tags?: Array` - `id?: number` - `name?: string` ### Example ```typescript import Barkend from 'barkend'; const client = new Barkend({ bearerToken: process.env['BARKEND_BEARER_TOKEN'], // This is the default and can be omitted }); const pets = await client.pets.list(); console.log(pets); ``` ## Retrieve `client.pets.retrieve(numberpetID, RequestOptionsoptions?): Pet` **get** `/pets/{petId}` Find pet by ID. ### Parameters - `petID: number` ### Returns - `Pet` - `name: string` - `photoUrls: Array` - `id?: number` - `category?: Category` - `id?: number` - `name?: string` - `status?: "available" | "pending" | "sold"` pet status in the store - `"available"` - `"pending"` - `"sold"` - `tags?: Array` - `id?: number` - `name?: string` ### Example ```typescript import Barkend from 'barkend'; const client = new Barkend({ bearerToken: process.env['BARKEND_BEARER_TOKEN'], // This is the default and can be omitted }); const pet = await client.pets.retrieve(0); console.log(pet.id); ``` ## Delete `client.pets.delete(numberpetID, RequestOptionsoptions?): void` **delete** `/pets/{petId}` Deletes a pet. ### Parameters - `petID: number` ### Example ```typescript import Barkend from 'barkend'; const client = new Barkend({ bearerToken: process.env['BARKEND_BEARER_TOKEN'], // This is the default and can be omitted }); await client.pets.delete(0); ``` ## Domain Types ### Category - `Category` - `id?: number` - `name?: string` ### Error - `Error` - `id: string` Machine-readable error code - `message: string` Human-readable error message ### Error Response - `ErrorResponse` - `error: Error` - `id: string` Machine-readable error code - `message: string` Human-readable error message ### Pet - `Pet` - `name: string` - `photoUrls: Array` - `id?: number` - `category?: Category` - `id?: number` - `name?: string` - `status?: "available" | "pending" | "sold"` pet status in the store - `"available"` - `"pending"` - `"sold"` - `tags?: Array` - `id?: number` - `name?: string` ### Tag - `Tag` - `id?: number` - `name?: string`