# Retrieve the current credit consumption period

> Congestion API, GET /consumption/current-period: Retrieve the current credit consumption period.

`GET /consumption/current-period` on the Congestion API. Base URL: `https://api.sinay.ai/congestion/api/v1`.

## Responses

::api-response
---
status: "200"
description: The current consumption period
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | Yes | Unique identifier of the consumption period. |
| `credits` | integer | Yes | Remaining credits. |
| `creditsInitial` | integer | Yes | Credits allocated at the start of the period. |
| `periodStart` | string (date-time) | Yes | Start of the period. |
| `periodEnd` | string (date-time) | Yes | End of the period. |
| `expired` | boolean | Yes | Whether this period has expired. |

Example response body:

```json
{
  "id": "091c4dc8-e979-4607-b9ca-78260ab48dfe",
  "credits": 3,
  "creditsInitial": 3,
  "periodStart": "2024-10-21T11:20:17Z",
  "periodEnd": "2224-10-21T11:20:17Z",
  "expired": false
}
```

::

::api-response
---
status: "401"
description: The authentication failed
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errorCode` | integer (int32) | Yes | — |
| `message` | string | Yes | — |
| `details` | array of string | Yes | — |
| `time` | string (date-time) | Yes | — |

::

::api-response
---
status: "404"
description: The resource has not been found
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errorCode` | integer (int32) | Yes | — |
| `message` | string | Yes | — |
| `details` | array of string | Yes | — |
| `time` | string (date-time) | Yes | — |

::

::api-response
---
status: "500"
description: An error occurend on server side
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errorCode` | integer (int32) | Yes | — |
| `message` | string | Yes | — |
| `details` | array of string | Yes | — |
| `time` | string (date-time) | Yes | — |

::

::api-response
---
status: default
description: default
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errorCode` | integer (int32) | Yes | — |
| `message` | string | Yes | — |
| `details` | array of string | Yes | — |
| `time` | string (date-time) | Yes | — |

::
