Skip to content
Get started

Deletes a pet.

client.pets.delete(numberpetID, RequestOptionsoptions?): void
DELETE/pets/{petId}

Deletes a pet.

ParametersExpand Collapse
petID: number
formatint64

Deletes a pet.

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);
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid pet value"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}
Returns Examples
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid pet value"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}