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

# Get Credit Grant

> Returns a credit grant.



## OpenAPI

````yaml /api-reference/customer/openapi.json get /api/v1/customer/credit-grants/{creditGrantId}
openapi: 3.0.0
info:
  title: OABUS Customer API
  description: OABUS API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/v1/customer/credit-grants/{creditGrantId}:
    get:
      tags:
        - CreditGrant
      summary: Get Credit Grant
      description: Returns a credit grant.
      operationId: getCreditGrant
      parameters:
        - name: creditGrantId
          required: true
          in: path
          schema:
            type: string
            format: uuid
        - name: fields
          required: false
          in: query
          description: >-
            Comma-separated list of fields to include in the response. Supports
            dot notation for nested projection (e.g.
            `id,name,user.email,trips.route.id`). Unknown fields are silently
            dropped.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/GetCreditGrant200Response'
        '400':
          $ref: '#/components/responses/GetCreditGrant400Response'
        '401':
          $ref: '#/components/responses/GetCreditGrant401Response'
        '500':
          $ref: '#/components/responses/GetCreditGrant500Response'
      security:
        - bearer: []
components:
  responses:
    GetCreditGrant200Response:
      content:
        application/json:
          schema:
            type: object
            properties:
              creditGrantId:
                type: string
                format: uuid
              companyCreditAccountId:
                type: string
                format: uuid
              organizationId:
                type: string
                format: uuid
              companyId:
                type: string
                format: uuid
              customerId:
                type: string
                format: uuid
              grantedByUserId:
                nullable: true
                type: string
                format: uuid
              code:
                type: string
              reason:
                nullable: true
                type: string
              amount:
                type: integer
              availableAmount:
                type: integer
              reservedAmount:
                type: integer
              usedAmount:
                type: integer
              status:
                type: string
                enum:
                  - ACTIVE
                  - SUSPENDED
                  - EXPIRED
                  - CONSUMED
                  - CANCELED
              createdBy:
                nullable: true
                type: string
                format: uuid
              updatedBy:
                nullable: true
                type: string
                format: uuid
              deletedBy:
                nullable: true
                type: string
                format: uuid
              startsAt:
                nullable: true
                type: string
                format: date-time
              expiresAt:
                nullable: true
                type: string
                format: date-time
              canceledAt:
                nullable: true
                type: string
                format: date-time
              consumedAt:
                nullable: true
                type: string
                format: date-time
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                nullable: true
                type: string
                format: date-time
            required:
              - creditGrantId
              - companyCreditAccountId
              - organizationId
              - companyId
              - customerId
              - code
              - amount
              - availableAmount
              - reservedAmount
              - usedAmount
              - status
              - createdAt
              - updatedAt
            additionalProperties: false
            description: Credit grant
      description: OK
    GetCreditGrant400Response:
      content:
        application/json:
          example:
            errors:
              - message: required
                path: name
            message: Bad Request Error
            statusCode: 400
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 400
                type: number
              errors:
                items:
                  properties:
                    message:
                      type: string
                    path:
                      type: string
                  required:
                    - message
                    - path
                  type: object
                type: array
            required:
              - message
              - statusCode
            type: object
      description: Bad Request Error
    GetCreditGrant401Response:
      content:
        application/json:
          example:
            message: Missing or invalid access token
            statusCode: 401
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 401
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Unauthorized
    GetCreditGrant500Response:
      content:
        application/json:
          example:
            message: Internal Server Error
            statusCode: 500
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 500
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Internal Server Error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````