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

# List all credit grants

> List all credit grants



## OpenAPI

````yaml openapi-billing.json GET /v1/credit_grants
openapi: 3.1.0
info:
  title: Yorlet Billing API
  description: APIs for managing invoices, coupons, credit grants, and subscription items.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/credit_grants:
    get:
      tags:
        - Credit Grants
      summary: List all credit grants
      description: List all credit grants
      operationId: credit_grants_list
      responses:
        '200':
          description: List all credit grants
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    description: Total number of items in the list.
                    example: 1
                  has_more:
                    type: boolean
                    description: Whether more items are available.
                    example: false
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the object.
                        created:
                          type: number
                          description: >-
                            Time at which the object was created. Measured in
                            seconds since the Unix epoch.
                        account:
                          type: string
                          description: >-
                            The account that the object belongs to. Only
                            returned if the request is made with a valid
                            Yorlet-Context header.
                        deleted:
                          type: boolean
                          default: false
                          description: Only returned if the object has been deleted.
                        object:
                          type: string
                          enum:
                            - credit_grant
                        amount:
                          type: integer
                          description: The total amount of the credit grant.
                        amount_remaining:
                          type: integer
                          description: >-
                            The remaining amount of the credit grant that has
                            not yet been used.
                        amount_used:
                          type: integer
                          description: The amount of the credit grant that has been used.
                        applicability_config:
                          type:
                            - object
                            - 'null'
                          properties:
                            limits:
                              type: object
                              properties:
                                max_credit_per_invoice_item:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    The maximum amount of credit per invoice
                                    item.
                              description: The limits that apply to the credit grant.
                            scope:
                              type: object
                              properties:
                                application:
                                  type: string
                                  description: >-
                                    The application ID that must match the
                                    invoice application ID.
                                invoice_item_type:
                                  type: string
                                  enum:
                                    - rent
                                  description: >-
                                    The type of invoice item that the credit
                                    grant can be applied to.
                              description: >-
                                The scope that the credit grant can be applied
                                to.
                          description: >-
                            Configuration that controls when and how the credit
                            grant can be applied.
                        currency:
                          type: string
                          enum:
                            - gbp
                            - usd
                            - eur
                            - sek
                          description: >-
                            Three-letter ISO currency code, in lowercase. Must
                            be a supported currency.
                          example: gbp
                        customer:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                          description: The ID of the customer the credit grant is for.
                        metadata:
                          type:
                            - object
                            - 'null'
                          additionalProperties:
                            type: string
                          description: >-
                            Set of key-value pairs that you can attach to an
                            object. This can be useful for storing additional
                            information about the object in a structured format.
                        name:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The name of the credit grant. This will be displayed
                            to the customer.
                        status:
                          type: string
                          enum:
                            - active
                            - voided
                          description: The status of the credit grant.
                        voided_at:
                          type:
                            - integer
                            - 'null'
                          description: The date and time the credit grant was voided.
                      required:
                        - id
                        - created
                        - object
                        - amount
                        - amount_remaining
                        - amount_used
                        - applicability_config
                        - currency
                        - customer
                        - name
                        - status
                        - voided_at
                required:
                  - count
                  - has_more
                  - object
                  - data
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````