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

# Fetch an invoice

> This endpoint returns the invoice corresponding to the given number.



## OpenAPI

````yaml /openapi.json get /v1/invoices/{reference}
openapi: 3.1.0
info:
  title: OVRSEA API
  version: 1.3.2
servers:
  - url: https://api.cf.ovrsea.com
security: []
paths:
  /v1/invoices/{reference}:
    get:
      tags:
        - Invoices
      summary: Fetch an invoice
      description: This endpoint returns the invoice corresponding to the given number.
      parameters:
        - schema:
            type: string
          in: path
          name: reference
          required: true
      responses:
        '200':
          description: Fetch an invoice given its reference
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '404':
          description: Invoice not found
          content:
            application/json:
              schema:
                description: Invoice not found
                type: object
components:
  schemas:
    Invoice:
      modelName: Invoice
      type: object
      properties:
        reference:
          type: string
          example: CDEF - 0342/7055 2022
        number:
          type: string
          example: FAC2022-9567
        ovrsea_shipment_id:
          type: string
          example: CDEF
        type:
          type: string
          enum:
            - invoice
            - credit_note
          default: invoice
        status:
          type: string
          enum:
            - available
            - due
            - in_modification
            - litigious
            - new
            - paid
            - partially_paid
            - write_off
        sent_date:
          $ref: '#/components/schemas/DateWithTime'
        due_date:
          $ref: '#/components/schemas/SimpleDate'
        lines:
          type: array
          items:
            type: object
            properties:
              category:
                type: string
                enum:
                  - arrival_customs
                  - arrival_fees
                  - arrival_truck_freight
                  - arrival_logistics
                  - carbon_offset
                  - customs
                  - departure_customs
                  - departure_fees
                  - departure_logistics
                  - departure_truck_freight
                  - freight
                  - insurance
                  - other
              description:
                type: string
                example: IMO Surcharge
              price:
                $ref: '#/components/schemas/Price'
              quantity:
                $ref: '#/components/schemas/Quantity'
              unit_rate:
                $ref: '#/components/schemas/Price'
              vatRate:
                type:
                  - 'null'
                  - number
                format: integer
                example: 20
        usd_to_eur_rate:
          type: number
          format: float
          example: 0.82
    DateWithTime:
      modelName: DateWithTime
      type: string
      example: '2021-09-20T10:02:09+01:00'
    SimpleDate:
      modelName: SimpleDate
      type: string
      example: '2021-10-11'
    Price:
      modelName: Price
      type: object
      properties:
        amount:
          type: number
          format: float
          example: 150357.99
        currency:
          type: string
          enum:
            - AED
            - AUD
            - BHD
            - BRL
            - CAD
            - CHF
            - CNY
            - DKK
            - EUR
            - GBP
            - HKD
            - IDR
            - INR
            - JPY
            - MXN
            - KRW
            - KWD
            - MYR
            - NOK
            - NZD
            - PLN
            - SEK
            - SGD
            - THB
            - TND
            - TWD
            - USD
            - XOF
            - XPF
            - ZAR
          example: USD
    Quantity:
      modelName: Quantity
      type: object
      properties:
        value:
          type: number
          format: float
          example: 350.25
        unit:
          type: string
          enum:
            - tc
            - teu
            - t
            - pallet
            - cbm
            - kg
            - cm
            - chargeable_weight
            - weight_measurement_lcl
            - km
            - 'null'

````