Pets

Creating a new pet

Create pet.

POST https://api.myapi.com/v1/pet

Creates a new pet.

Request Body

Name
Type
Description

name*

string

The name of the pet

owner_id

string

The id of the user who owns the pet

species

string

The species of the pet

breed

string

The breed of the pet

{
    "name"="Wilson",
    "owner": {
        "id": "sha7891bikojbkreuy",
        "name": "Samuel Passet",
    "species": "Dog",}
    "breed": "Golden Retriever",
}
circle-info

Good to know: This API method was created using the API Method block, it's how you can build out an API method documentation from scratch. Have a play with the block and you'll see you can do some nifty things like add and reorder parameters, document responses, and give your methods detailed descriptions.

Updating a pet

Update an existing pet

put
/pet
chevron-right
lock必需范围
此端点需要以下范围:
  • : read your pets
  • : modify pets in your account
授权
OAuth2implicit必填
Authorization URL:
请求体
idinteger · int64可选
namestring必填Example: doggie
photoUrlsstring[]必填
statusstring · enum可选

pet status in the store

可能的值:
响应
put
/pet

无内容

circle-info

Good to know: This API method was auto-generated from an example Swagger file. You'll see that it's not editable – that's because the contents are synced to an URL! Any time the linked file changes, the documentation will change too.

最后更新于