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

# Get wallet cashback

> Returns the total cashback a wallet has earned since it was created.

Use `default` as the `walletId` to read the organization's default wallet. The caller must be an administrator of the organization or a user the wallet is shared with: anyone else receives a `403` with code `FORBIDDEN_WALLET`, and an unknown account or wallet is a `404` with code `ACCOUNT_NOT_FOUND` or `WALLET_NOT_FOUND`. Those three are relayed from the wallet ledger and carry `origin: BANKING`.


## OpenAPI

````yaml /api-reference/platform.openapi.json get /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cashback
openapi: 3.0.3
info:
  title: Platform
  version: 1.0.0
  description: >-
    Portão 3 platform API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Confidence tiers:
    generated:typed=68 copied:manual=6 unknown=53.
servers:
  - url: https://api.platform.v2.portao3.com.br/
    description: production
  - url: https://api.platform.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Wallets
  - name: Cards
  - name: PIX
  - name: PIX Keys (DICT)
  - name: Boleto
  - name: Transfers
  - name: Scheduled Payments
  - name: Transactions & Statements
  - name: Invoices
  - name: Contracts & Deals
  - name: Billing
  - name: Notifications
  - name: Users
  - name: Vehicles
paths:
  /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cashback:
    get:
      tags:
        - Wallets
      summary: Get wallet cashback
      description: Returns the total cashback a wallet has earned since it was created.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdWalletsByWalletIdCashback
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: walletId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  totalCashbackEarned:
                    type: number
                    description: Total cashback the wallet has earned since it was created.
                    example: 12345
                required:
                  - totalCashbackEarned
                description: Lifetime cashback earned by a wallet.
        '401':
          description: '`UNAUTHORIZED` — The request carries no authenticated user.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - UNAUTHORIZED
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - PLATFORM
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: UNAUTHORIZED
                origin: PLATFORM
                message: unauthorized
        '422':
          description: '`BAD_REQUEST` — A path parameter is empty; `fields` lists each one.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - PLATFORM
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: PLATFORM
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: id
                    message: 'Invalid input: expected string, received undefined'
                    code: ID_REQUIRED

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.