# 크레딧 사용량/내역 조회 API

비즈니스의 크레딧 사용 내역을 조회할 수 있는 API를 제공합니다.

<br>

## `GET` kit-api/v1/credit-usages

Method: GET\
Endpoint: kit-api/v1/credit-usages

<br>

## Example

```
...kit-api/v1/credit-usages?createdAtAfter=2024-11-19T06:00:00.000Z
```

<br>

## Request Query

| Key             | Description                           | Required |
| --------------- | ------------------------------------- | -------- |
| createdAtAfter  | 특정시간 이후의 사용량 목록 조회용 파라미터 (ISO UTC 포맷) | no       |
| createdAtBefore | 특정시간 이전의 사용량 목록 조회용 파라미터 (ISO UTC 포맷) | no       |
| limit           | 목록 개수 (default 10, max 100)           | no       |
| offset          | 스킵할 목록 개수                             | no       |

<br>

## Response

```json
{
  "ok": true,
  "data": {
    "total": 2,
    "creditUsages": [
      {
        "id": 10,
        "case": "SIGNATURE_IDENTIFICATION",
        "user": {
          "id": 1,
          "uuid": "08f450cb-87ef-4cda-9ebe-48665d35a677",
          "name": "test1234",
          "role": "USER",
          "email": "test1234@lattice.im",
          "language": "KOREAN",
          "phone": null,
          "createdAt": "2024-11-08T05:54:24.016Z",
          "updatedAt": "2024-11-15T00:36:52.046Z"
        },
        "createdAt": "2024-11-19T06:57:24.477Z",
        "updatedAt": "2024-11-19T06:57:24.477Z"
      },
      {
        "id": 9,
        "case": "TAX_BILL",
        "user": {
          "id": 1,
          "uuid": "08f450cb-87ef-4cda-9ebe-48665d35a677",
          "name": "test1234",
          "role": "USER",
          "email": "test1234@lattice.im",
          "language": "KOREAN",
          "phone": null,
          "createdAt": "2024-11-08T05:54:24.016Z",
          "updatedAt": "2024-11-15T00:36:52.046Z"
        },
        "createdAt": "2024-11-19T06:57:24.477Z",
        "updatedAt": "2024-11-19T06:57:24.477Z"
      }
    ]
  }
}
```

```json
{
  "ok": false, // api 실패
  "message": "error message", // Error가 존재하면 message(string)로 전달
  "errorCode": "ERROR_CODE"
}
```

<br>
