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

# Get Invoice

## Params

<ParamField path="id" type="string">
  The ID of the invoice to fetch.
</ParamField>

## Response

<ResponseField name="id" type="string">
  The Alguna ID of the invoice.
</ResponseField>

<ResponseField name="accountId" type="string">
  The Alguna ID of the account associated with the invoice.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the invoice, e.g., "upcoming".
</ResponseField>

<ResponseField name="dueDate" type="string">
  The due date of the invoice. (RFC 3339 timestamp)
</ResponseField>

<ResponseField name="issueDate" type="string">
  The date when the invoice was issued. (RFC 3339 timestamp)
</ResponseField>

<ResponseField name="billingPeriodStart" type="string">
  The start date of the billing period for the invoice. (RFC 3339 timestamp)
</ResponseField>

<ResponseField name="billingPeriodEnd" type="string">
  The end date of the billing period for the invoice. (RFC 3339 timestamp)
</ResponseField>

<ResponseField name="billingPeriod" type="string">
  The formatted billing period for the invoice, representing the period from Jan
  1, 2024, to Jan 31, 2024.
</ResponseField>

<ResponseField name="currency" type="string">
  The ISO 4217 currency in which the invoice is billed.
</ResponseField>

<ResponseField name="description" type="string">
  The description of the invoice, e.g., "Invoice for period January 1, 2024 to
  January 31, 2024".
</ResponseField>

<ResponseField name="lineItems" type="List" subType="api.LineItemResponse">
  A list of line items included in the invoice.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The Alguna ID of the line item.
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the line item.
    </ResponseField>

    <ResponseField name="billingPeriodStart" type="string">
      The start date of the billing period for the line item. (RFC 3339
      timestamp)
    </ResponseField>

    <ResponseField name="billingPeriodEnd" type="string">
      The end date of the billing period for the line item. (RFC 3339 timestamp)
    </ResponseField>

    <ResponseField name="quantity" type="string">
      The quantity of the line item as a decimal string.
    </ResponseField>

    <ResponseField name="unitPrice" type="string">
      The unit price of the line item as a decimal string.
    </ResponseField>

    <ResponseField name="totalPrice" type="string">
      The total price of the line item as a decimal string.
    </ResponseField>

    <ResponseField name="isEditable" type="boolean">
      A boolean indicating whether the line item is editable (`true` or
      `false`).
    </ResponseField>

    <ResponseField name="productId" type="string">
      The Alguna ID of the product associated with the line item.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="subtotal" type="string">
  The subtotal amount of the invoice as a decimal string.
</ResponseField>

<ResponseField name="tax" type="string">
  The tax amount of the invoice as a decimal string.
</ResponseField>

<ResponseField name="total" type="string">
  The total amount of the invoice as a decimal string.
</ResponseField>

<ResponseField name="amountPaid" type="string">
  The amount that has been paid for the invoice as a decimal string.
</ResponseField>

<ResponseField name="amountRemaining" type="string">
  The remaining amount to be paid for the invoice as a decimal string.
</ResponseField>

<ResponseField name="externalId" type="string">
  The external ID associated with the invoice, e.g.,
  "80c84e7d-b265-4835-8ea0-e38a6c924ba4".
</ResponseField>

<ResponseField name="externalProvider" type="string">
  The external provider associated with the invoice, e.g., "xero".
</ResponseField>

<ResponseField name="externalUrl" type="string">
  The external URL associated with the invoice.
</ResponseField>

<ResponseField name="purchaseOrderNumber" type="string">
  The purchase order number associated with the invoice.
</ResponseField>

<ResponseField name="createdAt" type="datetime">
  The date and time at which the invoice was created.
</ResponseField>

<ResponseField name="updatedAt" type="datetime">
  The date and time at which the invoice was last updated.
</ResponseField>

<Snippet file="invoice-created-response.mdx" />
