Pet Store
  1. User Service
Pet Store
  • User Service
    • Add steps into the doc
    • User Service
      • Overview
      • Notice
      • Login
        POST
      • Add a new pet to the store
        POST
      • Update an existing pet
        PUT
      • Deletes a pet
        DELETE
      • Find pet by ID
        GET
      • Finds Pets by status
        GET
      • discriminator with mapping
        POST
    • Order Service
      • Find order by id
      • Check
    • AI Model
      • Google AI Studio
    • Schemas
      • Sample Schemas
        • Pet
        • Category
        • Tag
  • Order Service
    • Get list
      GET
    • Add a list
      POST
    • Update list
      PUT
    • New Request
      GET
    • Schemas
      • List
  1. User Service

Add a new pet to the store

POST
/pet

Request

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
API Key
Add parameter in query
token
Example:
token: ********************
or
Query Params

Body Params application/x-www-form-urlencoded

Responses

🟢201OK
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/pet?status=adopted&token=<api-key>' \
--header 'X-API-Key: <api-key>' \
--data-urlencode 'name=Hello Kitty'
Response Response Example
{
    "code": 0,
    "data": {
        "name": "Hello Kitty",
        "photoUrls": [
            "http://dummyimage.com/400x400"
        ],
        "id": 3,
        "category": {
            "id": 71,
            "name": "Cat"
        },
        "tags": [
            {
                "id": 22,
                "name": "Cat"
            }
        ],
        "status": "sold"
    }
}
Modified at 2025-11-13 10:38:02
Previous
Login
Next
Update an existing pet
Built with