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

# Gets one invoice, with its attachments and line items.

> Same fields as `GET /v1/invoices`, plus `Description`, `Attachments` and
`LineItems`. An invoice that does not exist, or belongs to another service provider,
is a 404 - the two are never distinguished.


A bundle is one line: its quantity, price, cost, amount and tax are the bundle's, and
`SubItems` lists the items inside it. Every other line has `SubItems: []`.


Each attachment's `Url` is a temporary download link and expires - don't store it.




## OpenAPI

````yaml /api-reference/openapi.json get /v1/invoices/{invoiceId}
openapi: 3.0.4
info:
  title: Public API
  description: Gorelo Public API documentation.
  version: 1.0.0
servers:
  - url: https://api.usw.gorelo.io
    description: US
  - url: https://api.aue.gorelo.io
    description: Australia
security:
  - ApiKeyAuth: []
tags:
  - name: Attachments
    description: "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
  - name: Alerts
    description: Alerts management operations
  - name: Assets
    description: Assets management operations
  - name: Billing
    description: Billing management operations
  - name: Tickets
    description: Tickets management operations
  - name: Clients
    description: Clients management operations
  - name: Contacts
    description: Contacts management operations
  - name: Deletions
    description: Deletions management operations
  - name: Documents
    description: Documents management operations
  - name: Forms
    description: Forms management operations
  - name: Organization
    description: Organization management operations
  - name: Projects
    description: Projects management operations
paths:
  /v1/invoices/{invoiceId}:
    get:
      tags:
        - Billing
      summary: Gets one invoice, with its attachments and line items.
      description: "Same fields as `GET /v1/invoices`, plus `Description`, `Attachments` and\r\n`LineItems`. An invoice that does not exist, or belongs to another service provider,\r\nis a 404 - the two are never distinguished.\r\n\n\r\nA bundle is one line: its quantity, price, cost, amount and tax are the bundle's, and\r\n`SubItems` lists the items inside it. Every other line has `SubItems: []`.\r\n\n\r\nEach attachment's `Url` is a temporary download link and expires - don't store it.\r\n"
      operationId: get_v1_invoices_invoiceId
      parameters:
        - name: invoiceId
          in: path
          description: Invoice identifier.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/InvoiceDetailModelBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetailModelBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetailModelBaseResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
components:
  schemas:
    InvoiceDetailModelBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          $ref: '#/components/schemas/InvoiceDetailModel'
        DataContext:
          type: object
          additionalProperties: false
          nullable: true
          example: null
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    ObjectBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          nullable: true
        DataContext:
          $ref: '#/components/schemas/ErrorDataContext'
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    HttpStatusCode:
      enum:
        - 100
        - 101
        - 102
        - 103
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 226
        - 300
        - 301
        - 302
        - 303
        - 304
        - 305
        - 306
        - 307
        - 308
        - 400
        - 401
        - 402
        - 403
        - 404
        - 405
        - 406
        - 407
        - 408
        - 409
        - 410
        - 411
        - 412
        - 413
        - 414
        - 415
        - 416
        - 417
        - 421
        - 422
        - 423
        - 424
        - 426
        - 428
        - 429
        - 431
        - 451
        - 500
        - 501
        - 502
        - 503
        - 504
        - 505
        - 506
        - 507
        - 508
        - 510
        - 511
      type: integer
      format: int32
    InvoiceDetailModel:
      type: object
      properties:
        Id:
          type: string
          description: Identifier of the invoice.
          format: uuid
          example: 3f1a9e2b-6c4d-4e2a-8b1a-0e2f7c9d1a44
        Number:
          type: integer
          description: The bare sequential invoice number, prefix and suffix stripped.
          format: int64
          nullable: true
          example: 1042
        DisplayNumber:
          type: string
          description: >-
            Human-readable invoice number, including the service provider's
            configured prefix/suffix.
          example: INV-1042
        ClientId:
          type: integer
          description: Client the invoice is billed to.
          format: int64
          example: 88
        ContractId:
          type: integer
          description: "Contract this invoice was raised from, or null. A manual invoice created through\r\n`POST /v1/invoices` always has no contract — `ContractId` is accepted only on\r\ncontract-generated invoices, which this surface does not create."
          format: int64
          nullable: true
          example: 4021
        Status:
          $ref: '#/components/schemas/CodeModel'
        InvoiceDate:
          type: string
          description: >-
            Date the invoice was raised, a calendar date in the service
            provider's terms.
          format: date
          example: '2026-09-01'
        DueDate:
          type: string
          description: >-
            Date payment is due, a calendar date. Never earlier than
            InvoiceDate.
          format: date
          nullable: true
          example: '2026-10-01'
        SubTotal:
          type: number
          description: Sum of the invoice's line items before discount and tax.
          format: double
          example: 1200
        TotalDiscount:
          type: number
          description: Total discount amount across the invoice's line items.
          format: double
          example: 60
        TotalTax:
          type: number
          description: Total tax across the invoice's line items.
          format: double
          example: 85.5
        Total:
          type: number
          description: 'Grand total: SubTotal - TotalDiscount + TotalTax.'
          format: double
          example: 1225.5
        AmountPaid:
          type: number
          description: >-
            Amount paid against this invoice so far. Computed live from recorded
            payments.
          format: double
          example: 500
        AmountDue:
          type: number
          description: >-
            Amount still owed: Total - AmountPaid. Never negative on the wire; a
            credit is reported as 0.
          format: double
          example: 725.5
        Reference:
          type: string
          description: Free-text reference on the invoice, or null when not set.
          nullable: true
          example: PO-4471
        ExternalId:
          type: string
          description: >-
            Identifier of this invoice in the connected external accounting
            system (Xero or QuickBooks), or null when not yet synced.
          nullable: true
        PaymentLink:
          type: string
          description: >-
            Hosted payment link for this invoice, or null when none has been
            generated.
          nullable: true
        InvoiceTemplateId:
          type: integer
          description: Invoice template used to render this invoice's PDF.
          format: int64
          nullable: true
        InvoiceEmailTemplateId:
          type: integer
          description: Email template used when this invoice is sent.
          format: int64
          nullable: true
        BrandingThemeId:
          type: string
          description: Branding theme applied in the connected accounting system.
          format: uuid
          nullable: true
        IsEmailSent:
          type: boolean
          description: Whether this invoice has been emailed to the client.
        EmailSentOn:
          type: string
          description: When this invoice was last emailed, in UTC, or null if never.
          format: date-time
          nullable: true
        CreatedOn:
          type: string
          description: When the invoice was created, in UTC.
          format: date-time
          nullable: true
        UpdatedOn:
          type: string
          description: >-
            When the invoice was last changed, in UTC. Null when it has never
            been changed.
          format: date-time
          nullable: true
        Description:
          type: string
          description: >-
            Description on the invoice itself, separate from its lines'
            descriptions. Null when not set.
          nullable: true
        Attachments:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceAttachmentModel'
          description: Files attached to the invoice. Empty when there are none.
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItemModel'
          description: The invoice's line items, in the order they appear on the invoice.
        Payments:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePaymentModel'
          description: "Payments recorded against the invoice, oldest first - whether recorded in Gorelo, through\r\n`POST /v1/payments`, or synced from a connected accounting system. Empty when there are\r\nnone."
      additionalProperties: false
      description: >-
        An invoice with its line items, returned by `GET
        /v1/invoices/{invoiceId}`.
    Error:
      type: object
      properties:
        Code:
          pattern: ^[0-9]{6}$
          type: string
          description: 6-digit MMTTNN error code. See the Public API error-code registry.
          example: '070101'
        Message:
          type: string
        PropertyName:
          type: string
          nullable: true
        ActionHint:
          type: string
          nullable: true
        DocUrl:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDataContext:
      type: object
      properties:
        TraceId:
          type: string
          description: Request correlation id. Quote this when reporting a problem.
          nullable: true
      additionalProperties: false
      description: "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
    CodeModel:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            Numeric identifier of the coded value (e.g. status, priority, type,
            or source id).
          format: int64
          example: 1
        Name:
          type: string
          description: Display name of the coded value.
      additionalProperties: false
      description: >-
        A coded value, such as a status, priority, type or source, as an id and
        a display name.
    InvoiceAttachmentModel:
      type: object
      properties:
        Name:
          type: string
          description: File name.
          example: timesheet-august.pdf
        Url:
          type: string
          description: >-
            Temporary secure download link. Expires, so don't store it - fetch
            the invoice again for a fresh one.
      additionalProperties: false
      description: A file attached to an invoice.
    InvoiceLineItemModel:
      type: object
      properties:
        Id:
          type: string
          description: "Identifier of the line. On a bundle line it identifies the bundle as a whole, not any one of\r\nits parts."
          format: uuid
        ItemId:
          type: string
          description: "The item charged on this line, resolving against `GET /v1/items` - the bundle itself on\r\na bundle line. Null only on an older line stored with no linked item."
          format: uuid
          nullable: true
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        ItemType:
          $ref: '#/components/schemas/CodeModel'
        Name:
          type: string
          description: Name of the line as charged.
          example: Onboarding Pack
        Description:
          type: string
          description: Description of the line as charged. Null when not set.
          nullable: true
        Quantity:
          type: number
          description: Quantity billed.
          format: double
          example: 2
        UnitCost:
          type: number
          description: Unit cost of the line.
          format: double
          nullable: true
          example: 90
        UnitPrice:
          type: number
          description: Unit price charged.
          format: double
          example: 150
        DiscountPercent:
          type: number
          description: Discount percentage applied to this line, 0-100.
          format: double
          example: 10
        Tax:
          $ref: '#/components/schemas/CodeModel'
        Amount:
          type: number
          description: Line total after discount, before tax.
          format: double
          example: 270
        TaxAmount:
          type: number
          description: Tax on this line.
          format: double
        BillableStatus:
          $ref: '#/components/schemas/CodeModel'
        CoaCode:
          type: string
          description: Chart-of-accounts code the line posts to.
          nullable: true
        SubItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineSubItemModel'
          description: "The parts inside a bundle line, each resolving against `GET /v1/items`. Empty on every\r\nother line, never null. Returned whether or not the bundle prints its parts on the PDF."
      additionalProperties: false
      description: "One line on an invoice. A bundle is one line: its quantity, price, cost, amount and tax belong\r\nto the bundle as a whole, and `SubItems` lists what is inside it."
    InvoicePaymentModel:
      type: object
      properties:
        Id:
          type: string
          description: "Identifier of the payment. A payment recorded through `POST /v1/payments` can be removed\r\nwith `DELETE /v1/payments/{paymentId}`."
          format: uuid
          example: 8c2d4f1a-3b5e-4c7d-9a1f-2e6b8d0c4f13
        Amount:
          type: number
          description: Amount of the payment applied to this invoice.
          format: double
          example: 250
        PaymentDate:
          type: string
          description: >-
            Date the payment was received, a calendar date in the service
            provider's time zone.
          format: date
          example: '2026-10-01'
        Reference:
          type: string
          description: >-
            Reference recorded with the payment, such as a bank transaction or
            remittance number.
          example: BANK-20261001-118
      additionalProperties: false
      description: A payment recorded against an invoice.
    InvoiceLineSubItemModel:
      type: object
      properties:
        ItemId:
          type: string
          description: The part's item, resolving against `GET /v1/items`.
          format: uuid
        Name:
          type: string
          description: Name of the part as charged.
      additionalProperties: false
      description: >-
        One part inside a bundle line. Priced as part of the bundle, so it
        carries no price of its own.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your Gorelo API key. See [Generate API key](/generate-api-key). If your
        data is hosted in Australia, click the base URL at the top of this page
        and select `https://api.aue.gorelo.io`.
      name: X-API-Key
      in: header

````

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