# API Reference

## Base URL

```
https://odyn-backend.fly.dev/
```

### Authorization

Requests must include an Authorization header that contain a Bearer token.\
Contact us on <https://discord.gg/kapgamesgg> to receive your token.\
\
Example:

```
Authorization: Bearer YOUR_TOKEN_HERE
```

## Player information

Returns player achievement information with the following achievements:

* playtime (**currently always 0**)
* ships\_sunk (**currently always 0**)
* matches\_played
* damage\_dealt  (**currently always 0**)
* nuggies\_extracted\_captain
* nuggies\_extracted\_company
* total\_nuggies

### Endpoint

```
GET https://odyn-backend.fly.dev/games/playerinfo/
```

### Parameters

* `email`: **mandatory**. User email.
* `start_date`: optional. Date from which to calculate metrics. Inclusive.
* `capnco_username`: optional. Until when to include metrics. Exclusive.

### Example response

```json
{
   "id": 1,
   "username": "test",
   "email": "email@test.com",
   "game_id": 97,
   "achievements":[
      {
         "game_achievement_id": "playtime",
         "score": 0
      },
      {
         "game_achievement_id": "ships_sunk",
         "score": 0
      },
      {
         "game_achievement_id": "matches_played",
         "score": 1
      },
      {
         "game_achievement_id": "damage_dealt",
         "score": 0
      },
      {
         "game_achievement_id": "nuggies_extracted_captain",
         "score": 20000
      },
      {
         "game_achievement_id": "nuggies_extracted_company",
         "score": 1000
      },
      {
         "game_achievement_id": "total_nuggies_extracted",
         "score": 21000
      }
   ]
}
```


---

# 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://docs.kap.gg/api-reference.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.
