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

Find pet by ID

GET
/pet/{petId}

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
Path Params

Header Params

Responses

🟢200OK
application/json
Body

🟠404Record not found
🟠400Invalid input
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/pet/1?token=<api-key>' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--header 'X-API-Key: <api-key>'
Response Response Example
200 - Success 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-09-12 07:26:46
Previous
Deletes a pet
Next
Finds Pets by status
Built with