> ## 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.

# List an invoice's entries

> Lists the entries of an invoice, newest first: the products and services the payer purchased, which add up to the invoice amount.

An invoice entry is one line item of the invoice — a product or service the payer purchased, with its amount — and the invoice amount is the sum of its `OPEN` entries. Entries are created automatically from the products of the deal when the invoice is created, and `POST .../entries` adds more: an on-demand charge for that invoice's period. Deleted entries stay in the list with `status` `DELETED` and no longer count; filter with `status`.

Read the invoice as its issuer (`role=VENDOR`, the default) or as its payer (`role=BUYER`, when your organization is the invoice's payer). Any member of the organization, or an admin of the realm, can list them. Page with `limit` + `next`. With `details=true` the entries are grouped by identifier instead of listed one by one: see that parameter.


## OpenAPI

````yaml /api-reference/billing.openapi.json get /realms/{realmId}/organizations/{organizationId}/invoices/{invoiceId}/entries
openapi: 3.0.3
info:
  title: Billing
  version: 1.0.0
  description: >-
    Portão 3 billing 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). Full billing surface —
    contracts, deals, invoices, statements, payment links, checkout and NFSe
    orchestration. (The product/supplier catalog moved to registry.) Confidence
    tiers: generated:typed=74 copied:manual=0 unknown=5.
servers:
  - url: https://api.billing.v2.portao3.com.br/
    description: production
  - url: https://api.billing.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Contracts
  - name: Deals
  - name: Invoices
  - name: Invoice Entries
  - name: Invoice Statements
  - name: NFSe Configuration
  - name: Payment Links
paths:
  /realms/{realmId}/organizations/{organizationId}/invoices/{invoiceId}/entries:
    get:
      tags:
        - Invoice Entries
      summary: List an invoice's entries
      description: >-
        Lists the entries of an invoice, newest first: the products and services
        the payer purchased, which add up to the invoice amount.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdInvoicesByInvoiceIdEntries
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: >-
            ID of your organization: the one that issued the invoice, or the one
            that pays it when `role` is `BUYER`.


            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: invoiceId
          in: path
          required: true
          description: |-
            ID of the invoice whose entries you want to list.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: 0b7c2a44-6f1e-4d3b-9a8e-5c2f1d0e9b7a
        - name: status
          in: query
          required: false
          description: >-
            Only the entries in this status. `OPEN`: the ones that count toward
            the invoice amount. `DELETED`: the ones that were deleted. Omit it
            to list both.
          schema:
            type: string
            enum:
              - OPEN
              - DELETED
          example: OPEN
        - name: details
          in: query
          required: false
          description: >-
            Send `true` (or the bare `?details`) to group the entries by
            `identifier`, ignoring case, instead of listing each one. Each item
            then stands for one identifier: its `amount` is the sum of that
            identifier's `OPEN` entries and its `createdAt` the creation time of
            one of them. The other fields of a grouped item are placeholders,
            not the values of its entries, so don't read them.
          schema:
            type: string
          example: 'true'
        - name: role
          in: query
          required: false
          description: >-
            Your side of the invoice. `VENDOR` (the default): your organization
            issued it. `BUYER`: your organization is the invoice's payer.
          schema:
            default: VENDOR
            type: string
            enum:
              - VENDOR
              - BUYER
          example: VENDOR
        - name: limit
          in: query
          required: false
          description: Page size, 1–1000. Defaults to 15.
          schema:
            default: 15
            type: integer
            minimum: 1
            maximum: 1000
          example: 15
        - name: next
          in: query
          required: false
          description: >-
            Cursor returned as `next` by the previous page; it must be valid
            base64. Omit it for the first page. Use it with the same filters.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9+/]+={0,2}$
          example: NjcxMWI0YzBkOGUxYTMwMDEyYjdjOWYy
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID of the entry.
                          example: 3f9a1c2e-7b4d-4e8a-9c1f-2d5b6a7c8e90
                          format: uuid
                        identifier:
                          type: string
                          description: >-
                            What the charge is for: the identifier of the deal
                            product that generated the entry, or the label sent
                            when it was added through the API. Free text.
                          example: MONTHLY_PLAN
                        invoice:
                          type: string
                          description: ID of the invoice the entry belongs to.
                          example: 0b7c2a44-6f1e-4d3b-9a8e-5c2f1d0e9b7a
                          format: uuid
                        amount:
                          type: integer
                          description: >-
                            Amount of the charge in centavos (`15000` is R$
                            150,00). It counts toward the invoice amount while
                            the entry is `OPEN`.
                          example: 15000
                        chargeMethod:
                          type: string
                          enum:
                            - INSTANT
                            - LATER
                          description: >-
                            When the charge is collected. `LATER`: it is added
                            to the invoice and paid with it. `INSTANT`: it is
                            also debited from the payer's Portão 3 account as
                            soon as it is added.
                          example: LATER
                        productType:
                          type: string
                          enum:
                            - RECURRENT
                            - ONE_TIME
                            - ON_EVENT
                          description: >-
                            When the charge's product is billed. `RECURRENT`: on
                            every invoice of the deal. `ONE_TIME`: on the first
                            invoice only. `ON_EVENT`: never automatically; such
                            an entry is added through the API, when the event
                            happens.
                          example: RECURRENT
                        effectiveAt:
                          type: string
                          description: >-
                            When the entry took effect: the moment it was
                            created.
                          example: '2026-10-01T09:00:00.000Z'
                          format: date-time
                        external:
                          type: object
                          properties:
                            transaction:
                              type: string
                              description: >-
                                ID of the payment transaction linked to the
                                entry, when there is one. Entries created
                                through this API don't carry one.
                              example: 6711b4c0d8e1a30012b7c9f2
                          description: References of the entry outside the invoice.
                        description:
                          type: string
                          description: >-
                            Free text describing the charge. Empty when there is
                            none.
                          example: Mensalidade do plano Pro
                        status:
                          type: string
                          enum:
                            - OPEN
                            - DELETED
                          description: >-
                            `OPEN`: the entry counts toward the invoice amount.
                            `DELETED`: the entry was deleted and no longer
                            counts.
                          example: OPEN
                        createdBy:
                          type: string
                          description: >-
                            ID of who created the entry: the authenticated
                            caller of the API that added it, or the Portão 3
                            service that generated it from the deal.
                          example: 5f0c2b1e-8a3d-4e6f-9b7c-2d1a0e9f8c7b
                        updatedBy:
                          type: string
                          description: >-
                            ID of who last changed the entry: who created it,
                            until someone deletes it.
                          example: 5f0c2b1e-8a3d-4e6f-9b7c-2d1a0e9f8c7b
                        createdAt:
                          type: string
                          description: >-
                            When the entry was created. Entries added in the
                            same request are one minute apart, in the order they
                            were sent, so that a listing keeps that order.
                          example: '2026-10-01T09:00:00.000Z'
                          format: date-time
                        updatedAt:
                          type: string
                          description: >-
                            When the entry was last changed. Deleting an entry
                            does not refresh it.
                          example: '2026-10-01T09:00:00.000Z'
                          format: date-time
                      required:
                        - id
                        - identifier
                        - invoice
                        - amount
                        - chargeMethod
                        - productType
                        - effectiveAt
                        - external
                        - description
                        - status
                        - createdBy
                        - updatedBy
                        - createdAt
                        - updatedAt
                      description: >-
                        One charge (line item) of an invoice. The invoice amount
                        is the sum of the amounts of its `OPEN` entries.
                    description: Entries, newest first.
                  next:
                    type: string
                    nullable: true
                    description: Cursor for the next page. `null` on the last page.
                    example: NjcxMWI0YzBkOGUxYTMwMDEyYjdjOWYy
                required:
                  - items
                  - next
                description: A page of an invoice's entries, newest first.
        '403':
          description: >-
            `INSUFFICIENT_PERMISSIONS` — You are not a member of the
            organization nor an admin of the realm.
          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:
                      - INSUFFICIENT_PERMISSIONS
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BILLING
                    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: INSUFFICIENT_PERMISSIONS
                origin: BILLING
                message: insufficient permissions
        '404':
          description: >-
            `INVOICE_NOT_FOUND` — No invoice with this ID was issued by the
            organization (or, with `role=BUYER`, is paid by it).
          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:
                      - INVOICE_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BILLING
                    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: INVOICE_NOT_FOUND
                origin: BILLING
                message: invoice not found
        '422':
          description: >-
            `BAD_REQUEST` — A path or query parameter is invalid; `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:
                      - BILLING
                    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: BILLING
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: status
                    message: 'Invalid option: expected one of "OPEN"|"DELETED"'
                    code: STATUS_ONE_OF

````

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