REST API

REST API

pet

Everything about your Pets

Name Description
body *
(body)
Pet object that needs to be added to the store
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

Responses

Code Description
405
Invalid input

Name Description
body *
(body)
Pet object that needs to be added to the store
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

Responses

Code Description
400
Invalid ID supplied
404
Pet not found
405
Validation exception

parameters

Name Description
status *
array[string]
(query)
Status values that need to be considered for filter

Available values : available, pending, sold

Responses

Code Description
200
successful operation
[
  {
    "id": 0,
    "category": {
      "id": 0,
      "name": "string"
    },
    "name": "doggie",
    "photoUrls": [
      "string"
    ],
    "tags": [
      {
        "id": 0,
        "name": "string"
      }
    ],
    "status": "available"
  }
]
400
Invalid status value

 

Returns a single pet

Parameters

Name Description
petId *
integer($int64)
(path)
ID of pet to return

Responses

Code Description
200
successful operation
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}
400
Invalid ID supplied
404
Pet not found

Parameters

Name Description
petId *
integer($int64)
(path)
ID of pet that needs to be updated
name
string
(formData)
Updated name of the pet
status
string
(formData)
Updated status of the pet

Responses

Code Description
405
Invalid input

Parameters

Name Description
api_key
string
(header)
petId *
integer($int64)
(path)
Pet id to delete

Responses

Code Description
400
Invalid ID supplied
404
Pet not found

Parameters

Name Description
petId *
integer($int64)
(path)
ID of pet to update
additionalMetadata
string
(formData)
Additional data to pass to server
file
file
(formData)
file to upload

Responses

Code Description
200
successful operation
{
  "code": 0,
  "type": "string",
  "message": "string"
}

 

store Access to Petstore orders

Returns a map of status codes to quantities

Parameters

No parameters

Responses

Code Description
200
successful operation
{
  "additionalProp1": 0,
  "additionalProp2": 0,
  "additionalProp3": 0
}

Parameters

Name Description
body *
(body)
order placed for purchasing the pet
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:43:58.190Z",
  "status": "placed",
  "complete": false
}

Responses

Code Description
200
successful operation
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:44:42.078Z",
  "status": "placed",
  "complete": false
}
400
Invalid Order

 

Parameters

Name Description
orderId *
integer($int64)
(path)
ID of pet that needs to be fetched

Responses

Code Description
200
successful operation
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:46:55.322Z",
  "status": "placed",
  "complete": false
}
400
Invalid ID supplied
404
Order not found

For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

Parameters

Name Description
orderId *
integer($int64)
(path)
ID of the order that needs to be deleted

Responses

Code Description
400
Invalid ID supplied
404
Order not found

user Operations about user

This can only be done by the logged in user.

Parameters

Name Description
body *
(body)
Created user object
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}

Responses

Code Description
default
successful operation

Parameters

Name Description
body *
(body)
List of user object
[
  {
    "id": 0,
    "username": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "password": "string",
    "phone": "string",
    "userStatus": 0
  }
]

Responses

Code Description
default
successful operation

Parameters

Name Description
body *
(body)
List of user object
[
  {
    "id": 0,
    "username": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "password": "string",
    "phone": "string",
    "userStatus": 0
  }
]

Responses

Code Description
default
successful operation

Parameters

Name Description
username *
string
(query)
The user name for login
password *
string
(query)
The password for login in clear text

Responses

Code Description
200
successful operation

Headers:

Name Description Type
X-Rate-Limit
calls per hour allowed by the user
integer
X-Expires-After
date in UTC when token expires
string
400

Invalid username/password supplied

Parameters

No parameters

Responses

Code Description
default
successful operation

Name Description
username *
string
(path)
The name that needs to be fetched. Use user1 for testing.

Responses

Code Description
200
successful operation
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}
400
Invalid username supplied
404
User not found

This can only be done by the logged in user.

Parameters

Name Description
username *
string
(path)
name that need to be updated
body *
(body)
Updated user object
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}

Responses

Code Description
400
Invalid user supplied
404
User not found

This can only be done by the logged in user.

Parameters

Name Description
username *
string
(path)
The name that needs to be deleted

Responses

Code Description
400
Invalid username supplied
404
User not found