Wardrobe API (1.0.11)

Download OpenAPI specification:Download

The Wardrobe API enables users to add, update, and delete clothing items in various categories like shirts, pants, and shoes, with the added flexibility to retrieve items using optional attributes such as size, color, and price for efficient wardrobe management.

clothes

Details about all items in the wardrobe.

Find a clothing item by ID.

Retrieve details of a specific clothing item by its ID. A successful response will include information about the clothing item, such as its ID, name, category, size, color, price, brand, condition, and date added. If an API key is not provided or if an invalid API key is provided, then a 401 Unauthorized response will be returned. If the specified ID does not exist, then a 404 Not Found response will be returned.

Authorizations:
apiKey_1
path Parameters
id
required
integer >= 1
Examples: 16587

A numerical value that represents the unique identifier for each clothing item.

Responses

Response samples

Content type
application/json
{
  • "id": 16587,
  • "name": "Beatles T-shirt",
  • "category": "t-shirts",
  • "size": "M",
  • "color": "black",
  • "price": 19.99,
  • "brand": "Rockmerch",
  • "condition": "new",
  • "date_added": "2023-03-10"
}

Update an existing item of clothing.

Update the details of an existing clothing item by providing its ID. The request body should be a JSON object containing optional parameters to update the values of the clothing item. The following attributes can be included in the body:

  • name
  • category
  • size
  • color
  • price
  • brand
  • condition
  • date_added

A successful response will include all details of the updated clothing item. If an API key is not provided or if an invalid API key is provided, then a 401 Unauthorized response will be returned. If the specified ID does not exist, then a 404 Not Found response will be returned.

Authorizations:
apiKey_1
path Parameters
id
required
integer >= 1
Examples: 16587

A numerical value that represents the unique identifier for each clothing item.

Request Body schema: application/json
name
string

The descriptive name or title of the clothing item.

category
string

The type or style of clothing.

size
string

The size of the clothing item, indicating its fit or dimensions.

color
string

The primary color of the clothing item.

price
number <currency>

The cost or price associated with purchasing the clothing item in US dollars.

brand
string

The brand or manufacturer of the clothing item.

condition
string

The state or condition of the clothing item.

date_added
string <date>

The date when the clothing item was added to the wardrobe.

Responses

Request samples

Content type
application/json
{
  • "name": "Beatles T-shirt",
  • "category": "t-shirts",
  • "size": "M",
  • "color": "black",
  • "price": 19.99,
  • "brand": "Rockmerch",
  • "condition": "new",
  • "date_added": "2023-03-10"
}

Response samples

Content type
application/json
{
  • "id": 16587,
  • "name": "Beatles T-shirt",
  • "category": "t-shirts",
  • "size": "M",
  • "color": "black",
  • "price": 19.99,
  • "brand": "Rockmerch",
  • "condition": "new",
  • "date_added": "2023-03-10"
}

Remove an existing item of clothing.

Delete a clothing item from the wardrobe by providing its ID. If the deletion is successful, the response will have a 204 No Content status with no additional content. If an API key is not provided or if an invalid API key is provided, then a 401 Unauthorized response will be returned. If the specified ID does not exist, then a 404 Not Found response will be returned.

Authorizations:
apiKey_1
path Parameters
id
required
integer >= 1
Examples: 16587

A numerical value that represents the unique identifier for each clothing item.

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Find multiples clothes.

Retrieve a list of clothing items, with optional query parameters to filter results. The parameters can include the following:

  • id
  • name
  • category
  • size
  • color
  • price
  • brand
  • condition
  • date_added

A successful response will be a list of clothing items matching the specified parameters. If no parameters are specified, then the entire list of clothing items will be retrieved. If an API key is not provided or if an invalid API key is provided, then a 401 Unauthorized response will be returned.

Authorizations:
apiKey_1
query Parameters
id
integer
Examples: id=16587

A unique numerical identifier for each clothing item.

name
string
Examples: name=Beatles T-shirt

The descriptive name or title of the clothing item.

category
string
Enum: "shirts" "t-shirts" "sweaters" "pants" "skirts" "shorts" "jackets" "dresses" "swimsuits" "underwear" "shoes" "bags" "accessories"
Examples: category=t-shirts

The type or style of clothing.

size
string
Enum: "xs" "s" "m" "l" "xl"
Examples: size=m

The size of the clothing item, indicating its fit or dimensions.

color
string
Examples: color=black

The primary color of the clothing item.

price
number <currency>
Examples: price=19.99

The cost or price associated with purchasing the clothing item in US dollars.

brand
string
Examples: brand=Rockmerch

The brand or manufacturer of the clothing item.

condition
string
Enum: "new" "like new" "good" "fair" "poor"
Examples: condition=new

The state or condition of the clothing item.

date_added
string <date>
Examples: date_added=2023-03-10

The date when the clothing item was added to the wardrobe.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a clothing item to the wardrobe.

Add a new clothing item to the wardrobe by providing all necessary details in the request body. The body must include the following:

  • name
  • category
  • size
  • color
  • price
  • brand
  • condition
  • date_added

A successful response will include all details of the newly added clothing item. If an API key is not provided or if an invalid API key is provided, then a 401 Unauthorized response will be returned. If the request body is missing required parameters or contains invalid values, then a 400 Bad Request response will be returned.

Authorizations:
apiKey_1
Request Body schema: application/json
id
required
integer

A unique numerical identifier for each clothing item.

name
required
string

The descriptive name or title of the clothing item.

category
required
string

The type or style of clothing.

size
required
string

The size of the clothing item, indicating its fit or dimensions.

color
required
string

The primary color of the clothing item.

price
required
number <currency>

The cost or price associated with purchasing the clothing item in US dollars.

brand
required
string

The brand or manufacturer of the clothing item.

condition
required
string

The state or condition of the clothing item.

date_added
required
string <date>

The date when the clothing item was added to the wardrobe.

Responses

Request samples

Content type
application/json
{
  • "id": 16587,
  • "name": "Beatles T-shirt",
  • "category": "t-shirts",
  • "size": "M",
  • "color": "black",
  • "price": 19.99,
  • "brand": "Rockmerch",
  • "condition": "new",
  • "date_added": "2023-03-10"
}

Response samples

Content type
application/json
{
  • "id": 16587,
  • "name": "Beatles T-shirt",
  • "category": "t-shirts",
  • "size": "M",
  • "color": "black",
  • "price": 19.99,
  • "brand": "Rockmerch",
  • "condition": "new",
  • "date_added": "2023-03-10"
}