Skip to main content
POST
/
pet
JavaScript
import BeaverdockAPI from 'beaverdock-api';

const client = new BeaverdockAPI({
  apiKey: process.env['BEAVERDOCK_API_API_KEY'], // This is the default and can be omitted
});

const pet = await client.pet.create({ name: 'doggie', photoUrls: ['string'] });

console.log(pet.id);
{
  "name": "doggie",
  "photoUrls": [
    "<string>"
  ],
  "id": 10,
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "tags": [
    {
      "id": 123,
      "name": "<string>"
    }
  ],
  "status": "available"
}

Authorizations

api_key
string
header
required

Body

Create a new pet in the store

name
string
required
Example:

"doggie"

photoUrls
string[]
required
id
integer<int64>
Example:

10

category
object
tags
object[]
status
enum<string>

pet status in the store

Available options:
available,
pending,
sold

Response

Successful operation

name
string
required
Example:

"doggie"

photoUrls
string[]
required
id
integer<int64>
Example:

10

category
object
tags
object[]
status
enum<string>

pet status in the store

Available options:
available,
pending,
sold