PhoAi
  • Hosting n8n
  • Kết nối Zalo cá nhân với n8n
  • Kết nối facebook Messenger
  • Kết nối KiotViet với n8n
  • Kết nối sms nhận thông báo banking
  • Node cơ bản n8n - SET
  • Node cơ bản n8n - HTTP Request
  • Node cơ bản n8n - Webhook
  • Node cơ bản n8n - Code
  • Node cơ bản n8n - IF
  • Reference
    • API Reference
      • Pets
      • Users
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Pets

PreviousAPI ReferenceNextUsers

Last updated 3 months ago

Creating a new pet

Updating a pet

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

  • Creating a new pet
  • POSTAdd a new pet to the store.
  • Updating a pet
  • PUTUpdate an existing pet.

Add a new pet to the store.

post

Add a new pet to the store.

Authorizations
Body
idinteger · int64OptionalExample: 10
namestringRequiredExample: doggie
photoUrlsstring[]Required
statusstring · enumOptional

pet status in the store

Possible values:
Responses
200
Successful operation
400
Invalid input
422
Validation exception
default
Unexpected error
post
POST /api/v3/pet HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}

Update an existing pet.

put

Update an existing pet by Id.

Authorizations
Body
idinteger · int64OptionalExample: 10
namestringRequiredExample: doggie
photoUrlsstring[]Required
statusstring · enumOptional

pet status in the store

Possible values:
Responses
200
Successful operation
400
Invalid ID supplied
404
Pet not found
422
Validation exception
default
Unexpected error
put
PUT /api/v3/pet HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}