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

# Get Credit Schedule by Account



## OpenAPI

````yaml /billing.openapi.json get /api/credit-schedules/by-account
openapi: 3.1.0
info:
  title: Billing
  description: |+

  version: 1.0.0
  summary: ''
servers:
  - url: https://sbx.api.easybilling.cloud/billing
    description: SBX
  - url: https://api.easybilling.cloud/billing
    description: Production-AWS
security:
  - token: []
tags:
  - name: account
  - name: payment method
  - name: contract action
  - name: usage event
  - name: billing document
  - name: invoice pdf
  - name: prepaid credits
  - name: customer portal
paths:
  /api/credit-schedules/by-account:
    get:
      tags:
        - prepaid credits
      summary: Get Credit Schedule by Account
      operationId: getBucketsByAccountId
      parameters:
        - name: accountNumber
          in: query
          description: query by account number
          required: false
          example: ACC-0000000001
          schema:
            type: string
        - name: asOfDate
          in: query
          description: query the credits that are valid on this date
          required: false
          schema:
            type: string
            format: date
        - name: trace-id
          in: header
          description: ''
          required: false
          example: '{{$string.uuid}}'
          schema:
            type: string
      responses:
        '200':
          description: Found the Buckets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditSchedule'
              example:
                - id: 024552b9-891c-49d6-a481-2ed4f54f227b
                  bucketId: cce67985-5b06-486d-97fe-0c3d08ddd576
                  bucketStatus: active
                  accountId: 76861aa5-fe22-4e28-8de0-9f23a7ce56e3
                  contractId: 3439f2d7-1485-4daf-907c-0085bff45274
                  contractSegmentId: dcffea1c-8aa1-4938-9d8d-46e9a01448e0
                  originalTotalBalance: 20000
                  totalBalance: 20000
                  remainingBalance: 17500
                  uom: Token
                  sourceItemId: c85f99d8-0bd8-425c-872d-705107f11f54
                  validFrom: '2026-04-01'
                  validTo: '2026-05-01'
                  bucketType: resource-based-credit
          headers: {}
        '400':
          description: Bad Request
          headers: {}
        '401':
          description: Unauthorized
          headers: {}
        '404':
          description: Not Found
          headers: {}
        '500':
          description: Internal Server Error
          headers: {}
      deprecated: false
      security:
        - token: []
components:
  schemas:
    CreditSchedule:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
        accountId:
          type: string
          description: Account identifier
        contractId:
          type: string
          description: Contract identifier
        contractSegmentId:
          type: string
          description: Contract segment identifier
        bucketId:
          type: string
        bucketStatus:
          type: string
          enum:
            - draft
            - active
            - cancelled
        totalBalance:
          type: number
          description: Total balance
          format: double
        originalTotalBalance:
          type: number
          format: double
        remainingBalance:
          type: number
          description: Remaining balance
          format: double
        uom:
          type: string
          description: >-
            Unit of measure for resource-based-credit; currency for
            currency-based-credit
        validFrom:
          type: string
          description: Valid from date
          format: date
          examples:
            - '2026-03-05'
        validTo:
          type: string
          description: Valid to date
          format: date
          examples:
            - '2026-04-05'
        bucketType:
          type: string
          description: Type
          enum:
            - resouce-based-credit
            - currency-based-credit
        status:
          type: string
        sourceItemId:
          type: string
  securitySchemes:
    token:
      type: http
      scheme: bearer

````