Skip to main content
POST/petOAuth 2.0

Add a new pet to the store.

Request Body
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
Request Example
curl -X POST "/pet" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}'
Response
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
PUT/petOAuth 2.0

Update an existing pet.

Request Body
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
Request Example
curl -X PUT "/pet" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}'
Response
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
GET/pet/findByStatusOAuth 2.0

Finds Pets by status.

Parameters
statusstringqueryDefault: availablerequired
Status values that need to be considered for filter
Request Example
curl -X GET "/pet/findByStatus?status=available" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json"
Response
[ { "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" } ]
GET/pet/findByTagsOAuth 2.0

Finds Pets by tags.

Parameters
tagsstring[]queryrequired
Tags to filter by
Request Example
curl -X GET "/pet/findByTags?tags=%3Ctags%3E" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json"
Response
[ { "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" } ]
GET/pet/{petId}api_key

Find pet by ID.

Request Example
curl -X GET "/pet/{petId}" \ -H "X-API-Key: <api-key>" \ -H "Accept: application/json"
Response
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
POST/pet/{petId}OAuth 2.0

Updates a pet in the store with form data.

Parameters
namestringquery
Name of pet that needs to be updated
statusstringquery
Status of pet that needs to be updated
Request Example
curl -X POST "/pet/{petId}?name=%3Cname%3E&status=%3Cstatus%3E" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json"
Response
{ "id": 10, "name": "doggie", "category": { "id": 1, "name": "Dogs" }, "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available" }
DELETE/pet/{petId}OAuth 2.0

Deletes a pet.

Parameters
api_keystringheader
No description provided.
Request Example
curl -X DELETE "/pet/{petId}" \ -H "Authorization: Bearer <oauth-token>" \ -H "api_key: <api_key>"
Response
POST/pet/{petId}/uploadImageOAuth 2.0

Uploads an image.

Parameters
additionalMetadatastringquery
Additional Metadata
Request Body
"string"
Request Example
curl -X POST "/pet/{petId}/uploadImage?additionalMetadata=%3CadditionalMetadata%3E" \ -H "Authorization: Bearer <oauth-token>" \ -H "Accept: application/json" \ -H "Content-Type: application/octet-stream" \ -d '"string"'
Response
{ "code": 0, "type": "string", "message": "string" }
Was this page helpful?