> ## Documentation Index
> Fetch the complete documentation index at: https://docs.steppay.kr/llms.txt
> Use this file to discover all available pages before exploring further.

# 사용량/계정 등록 API

> 사용량 또는 계정을 등록할 때 사용합니다.



## OpenAPI

````yaml /steppay_v1.json post /api/v1/usages
openapi: 3.0.1
info:
  title: STEPPAY
  version: '1.0'
  contact:
    name: Steppay
    url: https://www.steppay.kr
    email: contact@steppay.kr
servers:
  - url: https://api.steppay.kr
    description: Generated server url
security:
  - Secret-Token: []
paths:
  /api/v1/usages:
    post:
      tags:
        - 사용량 API
      summary: 사용량/계정 등록 API
      description: 사용량 또는 계정을 등록할 때 사용합니다.
      operationId: v1_createRecordQuota
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Usage_recordReq'
        required: true
      responses:
        '201':
          description: 사용량/계정 기록이 정상적으로 등록됨
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Res'
        '400':
          description: 사용량/계정 기록을 등록할 수 없는 상황
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Usage_recordErrorresponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Usage_recordErrorresponse'
components:
  schemas:
    Usage_recordReq:
      title: 기록 생성
      required:
        - quota
        - record
      type: object
      properties:
        subscriptionItemId:
          type: integer
          format: int64
        quota:
          type: integer
          description: 기존 AccumulatedQuota 값에 대하여 증감합니다.
          format: int64
        record:
          type: integer
          description: 기존 AccumulatedRecord 값에 대하여 증감합니다.
          format: int64
        influxDate:
          type: string
          description: 인입일
          format: date-time
        payload:
          type: string
    Res:
      title: 기록 조회
      required:
        - accumulateRecord
        - amountForQuota
        - influxDate
        - restDays
      type: object
      properties:
        accumulateQuota:
          type: integer
          format: int64
        accumulateRecord:
          type: integer
          format: int64
        influxDate:
          type: string
          format: date-time
        amountForQuota:
          type: number
        restDays:
          type: integer
          format: int64
    Usage_recordErrorresponse:
      required:
        - errorCode
      type: object
      properties:
        traceId:
          type: string
        errorCode:
          type: string
        errorMessage:
          type: string
        details:
          $ref: '#/components/schemas/ReturnError'
    ReturnError:
      type: object
  securitySchemes:
    Secret-Token:
      type: apiKey
      in: header
      name: Secret-Token

````