AlbuQuirky Endpoints

(work in progress)

Global

Server Context Path

/albuquirky/api

Authentication

All endpoints are secured by OAuth 2.0. Any requests not including an Authorization header with a valid Bearer token will result in a 401 Unauthorized status.

Content Types

Except where noted, all endpoints produce and/or consume application/json.

Endpoints

GET /profiles/me

Description

Return the current Profile.

path Parameters

(None)

Query parameters

(None)

Response Body

Profile

Response Status

GET /profiles/{profileId}

Description

Return a specific Profile.

path Parameters

Query parameters

(None)

Response Body

Profile

Response Status

GET /profiles/me/username

Description

Retrieves username of current profile (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /profiles/me/username

Description

Replaces username of current profile.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /profiles/me/image

Description

Retrieves profile image reference of current profile (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /profiles/me/image

Description

Replaces profile image reference of current profile.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /profiles/me/address

Description

Retrieves address of current profile (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /profiles/me/address

Description

Replaces address of current profile.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /orders/user-orders

Description

Return all instances of Order placed by the User.

path Parameters

(None)

Query parameters

Response Body

Order[]

Response Status

GET /orders/user-sold-orders

Description

Return all instances of Order that the User is responsible for fulfilling.

path Parameters

(None)

Query parameters

Response Body

Order[]

Response Status

POST /orders

Description

Creates a new Order.

Path Parameters

(None)

Query Parameters

Response Body

Order

Response Status

GET /orders/{orderId}

Description

Return a specific Order.

path Parameters

Query parameters

(None)

Response Body

Order

Response Status

GET /commissions/seller

Description

Return all instances of Commission where the User is the seller.

path Parameters

(None)

Query parameters

Response Body

Commission[]

Response Status

GET /commissions/commissioner

Description

Return all instances of Commission where the User is the commissioner.

path Parameters

(None)

Query parameters

Response Body

Commission[]

Response Status

POST /commissions

Description

Creates a new Commission.

Path Parameters

(None)

Query Parameters

Response Body

Commission

Response Status

GET /commissions/{commissionId}

Description

Return a specific Commission.

Path Parameters

Query parameters

(None)

Response Body

Commission

Response Status

DELETE /commissions/{commissionId}

Deletes a Commission from the database.

Path Parameters

Query Parameters

(None)

Response Body

(None)

Response Status

GET /commissions/{commissionId}/commission_request

Description

Retrieves commission request of a specific commission (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /commissions/{commissionId}/commission_request

Description

Replaces commission request of a specific commission.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /products/{keyword}

Description

Return all instances of Product that matches a keyword.

path Parameters

(None)

Query parameters

Response Body

Product[]

Response Status

GET /products/{userId}

Description

Return all instances of Product created by the User.

path Parameters

(None)

Query parameters

Response Body

Product[]

Response Status

POST /products

Description

Creates a new Product.

Path Parameters

(None)

Query Parameters

Response Body

Product

Response Status

GET /products/{productId}

Description

Return a specific Product.

path Parameters

Query parameters

(None)

Response Body

Product

Response Status

GET /products/{productId}/product_name

Description

Retrieves product name of a specific product (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /products/{productId}/product_name

Description

Replaces product name of a specific product.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /products/{productId}/description

Description

Retrieves description of a specific product (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /products/{productId}/description

Description

Replaces description of a specific product.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status

GET /products/{productId}/price

Description

Retrieves price of a specific product (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

int (Content-type: text/plain)

Response status

PUT /products/{productId}/price

Description

Replaces price of a specific product.

Path parameters

(None)

Query parameters

(None)

Request body

int (Content-type: text/plain)

Response body

int (Content-type: text/plain)

Response status

GET /products/{productId}/stock

Description

Retrieves stock of a specific product (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

int (Content-type: text/plain)

Response status

PUT /products/{productId}/stock

Description

Replaces stock of a specific product.

Path parameters

(None)

Query parameters

(None)

Request body

int (Content-type: text/plain)

Response body

int (Content-type: text/plain)

Response status

GET /images/{productId}

Description

Return all instances of Image associated with a particular Product.

path Parameters

(None)

Query parameters

long productId

Response Body

Image[]

Response Status

POST /images

Description

Creates a new Image.

Path Parameters

(None)

Query Parameters

Response Body

Image

Response Status

GET /images/{imageId}

Description

Return a specific Image.

path Parameters

Query parameters

(None)

Response Body

Image

Response Status

DELETE /images/{imageId}

Deletes an Image from the database.

Path Parameters

Query Parameters

Response Body

(None)

Response Status

GET /images/{imageId}/description

Description

Retrieves description of a specific image (companion to PUT).

Path parameters

(None)

Query Parameters

(None)

Request body

(None)

Response body

String (Content-type: text/plain)

Response status

PUT /images/{imageId}/description

Description

Replaces description of a specific image.

Path parameters

(None)

Query parameters

(None)

Request body

String (Content-type: text/plain)

Response body

String (Content-type: text/plain)

Response status