Deletes a pet.
client.Pets.Delete(ctx, petID) error
/pet/{petId}
Deletes a pet.
Parameters
petID int64
formatint64
Deletes a pet.
package main
import (
"context"
"github.com/stainless-sdks/barkend-go"
"github.com/stainless-sdks/barkend-go/option"
)
func main() {
client := barkend.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Pets.Delete(context.TODO(), 0)
if err != nil {
panic(err.Error())
}
}
{
"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"
}
}