# Introduction

Whippy Ware offers a structure that can store stock information based on SKUs, regularly set stock levels via stock lists and provides the ability to store and manage stock information based on specific locations.

The following diagram depicts the Whippy Ware modules along with their connections between these modules.

## API Authentication for Whippy Ware

Authentication is required for all requests to Akinon's REST API. In order to start using the Akinon APIs, you need to generate an API key using the **Login API**. Subsequently, all other requests should be sent with the token obtained from the login response.

The responses from Akinon's API are formatted in JSON. The API is served over HTTPS to ensure data privacy, and unencrypted HTTP requests are not supported.

The authentication endpoints in Whippy Ware are responsible for user authentication and authorization processes within the application. Whippy Ware utilizes the **Omnitron Authentication** method, which allows the authentication information of Omnitron users to be used for authentication within the Whippy Ware system.

### Allowed HTTPs Requests

Authentication endpoints are only accepts `POST` requests.

### Potential Responses

The following status codes returns in the response message body of the request.

* **200 OK:** The request was successful and the requested resource is returned in the response.
* **201 Created:** The request was successful and the requested resource is created.
* **204 No Content:** The request was successful and there is no content to be returned.
* **400 Bad Request:** The request was malformed or missing, false given required parameters.
* **401 Unauthorized:** The requested user is not authorized to access the requested resource.

## Creating Token

This method is used to creating a token with given user and password data.

### `POST` **Creating-Token**

**Path:** `/api/v1/auth/login/`

#### Parameters

|  Parameter | Data Type |   In   |             Description             |
| :--------: | :-------: | :----: | :---------------------------------: |
| api\_token |   string  | header | The API key of the customer account |

#### Example Request

```python
{
	"username": "test",
	"password": "test_pass"
}
```

#### Example Response (200 OK)

```json
{
	"key": "XXXa0590XXXXXX05f7f9265XXXXXXXXX548bXXXX"
	Authentication 1
}
```

#### Example Response (400 Bad Request)

```json
HTTP 400
{
	"username": [
	"This field is required."
	],
	"password": [
	"This field is required."
	]
}
```

## Removing Token

This method is used to remove the token object regarding the user in the request body.

### `POST` **Removing-Token**

**Path:** `/api/v1/expire-token/`

#### Parameters

|  Parameter | Data Type |   In   |             Description             |
| :--------: | :-------: | :----: | :---------------------------------: |
| api\_token |   string  | header | The API key of the customer account |

#### Example Request

```python
{
	"username": "test"
}
```

#### Example Response (204 No Content)

```json
No Content
```

#### Example Request

```python
{
	"email": "test@test.com",
}
```

#### Example Response (400 Bad Request)

```json
HTTP 400
{
	"username": [
	"This field is required."
	]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/omnitron/whippy-ware/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
