ex02

ex01 (0.0.1)

Download OpenAPI specification:Download

get

get-products

Request Body schema: application/json

query to filter products

searchQuery
string or null

Optional search string to match product names or descriptions

minimumPrice
integer or null

Optional minimum price constraint for a product

maximumPrice
integer or null

Optional maximum price constraint for a product

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

get-orders

Request Body schema: application/json

query to filter orders

products
Array of integers or null

List of product IDs in the order

status
Array of strings or null (OrderStatus)
Enum: "Unpaid" "Paid" "Shipped" "Delivered" "Canceled"

Optional order status constraint

minimumPrice
integer or null

Optional minimum total price constraint for the order

maximumPrice
integer or null

Optional maximum total price constraint for the order

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

get-product

Request Body schema: application/json

Product ID

integer (ProductId)

Responses

Request samples

Content type
application/json
Example
0
0

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "details": {
    }
}

get-order

Request Body schema: application/json

Rrder ID

integer (OrderId)

Responses

Request samples

Content type
application/json
Example
0
0

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "totalPrice": 2000,
  • "details": {
    },
  • "status": "Delivered"
}

product

get-products

Request Body schema: application/json

query to filter products

searchQuery
string or null

Optional search string to match product names or descriptions

minimumPrice
integer or null

Optional minimum price constraint for a product

maximumPrice
integer or null

Optional maximum price constraint for a product

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

get-product

Request Body schema: application/json

Product ID

integer (ProductId)

Responses

Request samples

Content type
application/json
Example
0
0

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "details": {
    }
}

register-product

Request Body schema: application/json

Product details to be registered to the database

name
required
string

Product name

description
required
string

Product description

price
required
integer

Product price

count
required
integer

Count of the product

Responses

Request samples

Content type
application/json
{
  • "name": "Frankenstein",
  • "description": "A tale of young scientist Victor Frankenstein and his creation of a grotesque monster.",
  • "price": 950,
  • "count": 7
}

Response samples

Content type
application/json
3

update-product-details

Request Body schema: application/json

product details to be updated

_0
required
integer (ProductId)
required
object (ProductDetails)

Product details

Responses

Request samples

Content type
application/json
Example
{
  • "_0": 0,
  • "_1": {
    }
}

Response samples

Content type
application/json
0
0

products

get-products

Request Body schema: application/json

query to filter products

searchQuery
string or null

Optional search string to match product names or descriptions

minimumPrice
integer or null

Optional minimum price constraint for a product

maximumPrice
integer or null

Optional maximum price constraint for a product

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

order

get-orders

Request Body schema: application/json

query to filter orders

products
Array of integers or null

List of product IDs in the order

status
Array of strings or null (OrderStatus)
Enum: "Unpaid" "Paid" "Shipped" "Delivered" "Canceled"

Optional order status constraint

minimumPrice
integer or null

Optional minimum total price constraint for the order

maximumPrice
integer or null

Optional maximum total price constraint for the order

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

get-order

Request Body schema: application/json

Rrder ID

integer (OrderId)

Responses

Request samples

Content type
application/json
Example
0
0

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "totalPrice": 2000,
  • "details": {
    },
  • "status": "Delivered"
}

register-order

Request Body schema: application/json

order details to be registered to the database

required
Array of objects

ID and it's count of ordered products

required
credit-card (object) or bank-transfer (object)

Payment method of an order

Responses

Request samples

Content type
application/json
Example
{
  • "products": [
    ],
  • "paymentMethod": {
    }
}

Response samples

Content type
application/json
3

update-order-status

Request Body schema: application/json

order status to be updated

any (OrderStatusWithId)

Responses

Request samples

Content type
application/json
Example
{
  • "_0": 1,
  • "_1": "Shipped"
}

Response samples

Content type
application/json
1

orders

get-orders

Request Body schema: application/json

query to filter orders

products
Array of integers or null

List of product IDs in the order

status
Array of strings or null (OrderStatus)
Enum: "Unpaid" "Paid" "Shipped" "Delivered" "Canceled"

Optional order status constraint

minimumPrice
integer or null

Optional minimum total price constraint for the order

maximumPrice
integer or null

Optional maximum total price constraint for the order

limit
integer or null

Number limit of data to be acquired.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]

register

register-product

Request Body schema: application/json

Product details to be registered to the database

name
required
string

Product name

description
required
string

Product description

price
required
integer

Product price

count
required
integer

Count of the product

Responses

Request samples

Content type
application/json
{
  • "name": "Frankenstein",
  • "description": "A tale of young scientist Victor Frankenstein and his creation of a grotesque monster.",
  • "price": 950,
  • "count": 7
}

Response samples

Content type
application/json
3

register-order

Request Body schema: application/json

order details to be registered to the database

required
Array of objects

ID and it's count of ordered products

required
credit-card (object) or bank-transfer (object)

Payment method of an order

Responses

Request samples

Content type
application/json
Example
{
  • "products": [
    ],
  • "paymentMethod": {
    }
}

Response samples

Content type
application/json
3

update

update-product-details

Request Body schema: application/json

product details to be updated

_0
required
integer (ProductId)
required
object (ProductDetails)

Product details

Responses

Request samples

Content type
application/json
Example
{
  • "_0": 0,
  • "_1": {
    }
}

Response samples

Content type
application/json
0
0

update-order-status

Request Body schema: application/json

order status to be updated

any (OrderStatusWithId)

Responses

Request samples

Content type
application/json
Example
{
  • "_0": 1,
  • "_1": "Shipped"
}

Response samples

Content type
application/json
1