Skip to main content
GET
/
external
/
invoices
/
{invoiceId}
/
with-line-items
Get invoice with line items
curl --request GET \
  --url https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items \
  --header 'x-api-key: <api-key>'
{
  "id": "atlas-internal-invoice-id-123",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "dueDate": "2021-01-31T00:00:00.000Z",
  "externalId": "external-invoice-id-123",
  "issueDate": "2021-01-01T00:00:00.000Z",
  "pendingDate": "2021-01-01T00:00:00.000Z",
  "status": "issued",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "vanityId": 123456,
  "vanityIdString": "123456",
  "customerId": "atlas-internal-customer-id-123",
  "merchantId": "atlas-internal-merchant-id-123",
  "subscriptionId": "atlas-internal-subscription-id-123",
  "autoSyncInvoice": true,
  "autoSendInvoice": true,
  "autoChargeInvoice": false,
  "paymentGateway": "Stripe",
  "invoiceLineItems": [
    {
      "amount": 100,
      "createdAt": "2021-01-01T00:00:00.000Z",
      "description": "Pro Plan - Monthly",
      "details": {
        "quantity": 1,
        "unitPrice": 100
      },
      "endDate": "2021-01-31T00:00:00.000Z",
      "id": "atlas-internal-invoice-line-item-id-123",
      "startDate": "2021-01-01T00:00:00.000Z",
      "updatedAt": "2021-01-01T00:00:00.000Z",
      "invoiceId": "atlas-internal-invoice-id-123",
      "merchantId": "atlas-internal-merchant-id-123",
      "priceId": "atlas-internal-price-id-123",
      "price": {
        "id": "atlas-internal-price-id-123",
        "entityType": "entitlement",
        "billingMode": "arrears",
        "rules": {
          "quantity": 1,
          "price": 10
        },
        "priceType": "bulk",
        "billable": {
          "id": "atlas-internal-billable-id-123",
          "showOnInvoice": true,
          "hidden": false,
          "singleUnitLabel": "Unit",
          "multipleUnitLabel": "Units"
        }
      }
    }
  ]
}

Authorizations

x-api-key
string
header
required

You can obtain this key from the Atlas dashboard. It must be of type secret

Path Parameters

invoiceId
string
required

The Atlas invoice ID associated with the invoice line item

Minimum string length: 1
Example:

"atlas-internal-invoice-id-123"

Response

The invoice with its line items that have been retrieved.

id
string
required

The Atlas invoice ID

Minimum string length: 1
Example:

"atlas-internal-invoice-id-123"

createdAt
string<date>
required

The date and time the invoice was created

Example:

"2021-01-01T00:00:00.000Z"

dueDate
string<date>
required

The due date of the invoice

Example:

"2021-01-31T00:00:00.000Z"

externalId
string | null
required

The external ID of the invoice (e.g. the invoice ID in your payment gateway)

Minimum string length: 1
Example:

"external-invoice-id-123"

issueDate
string<date>
required

The issue date of the invoice

Example:

"2021-01-01T00:00:00.000Z"

pendingDate
string<date>
required

The pending date of the invoice

Example:

"2021-01-01T00:00:00.000Z"

status
enum<string>
required

The status of the invoice

Available options:
test,
draft,
pending,
readyToSync,
syncing,
readyToCollect,
pendingPayment,
readyToSend,
sending,
issued,
paymentActionRequired,
paymentFailed,
paid,
void,
overdue,
deletedFromPaymentGateway,
uncollectible
Example:

"issued"

updatedAt
string<date>
required

The date and time the invoice was last updated

Example:

"2021-01-01T00:00:00.000Z"

vanityId
number
required

The vanity ID of the invoice

Example:

123456

vanityIdString
string
required

The vanity ID of the invoice as a string

Example:

"123456"

customerId
string
required

The Atlas customer ID

Minimum string length: 1
Example:

"atlas-internal-customer-id-123"

merchantId
string
required

The Atlas merchant ID

Minimum string length: 1
Example:

"atlas-internal-merchant-id-123"

subscriptionId
string
required

The Atlas subscription ID

Minimum string length: 1
Example:

"atlas-internal-subscription-id-123"

autoSyncInvoice
boolean | null
required

Whether to automatically sync this invoice to the associated payment gateway

Example:

true

autoSendInvoice
boolean | null
required

Whether to automatically send this invoice from the associated payment gateway to the customers email address

Example:

true

autoChargeInvoice
boolean | null
required

Whether to automatically charge this invoice to the associated payment gateway

Example:

false

paymentGateway
enum<string> | null
required

The selected payment gateway for this invoice

Available options:
Stripe,
QuickBooks
Example:

"Stripe"

invoiceLineItems
object[]
required

The line items associated with the invoice