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>'import requests
url = "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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"
}
}
}
]
}Invoices
Get invoice with line items
Get an invoice with its line items attached, including expanded price and billable information.
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>'import requests
url = "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.runonatlas.com/external/invoices/{invoiceId}/with-line-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
Path Parameters
Response
The invoice with its line items that have been retrieved.
The status of the invoice
Available options:
test, draft, pending, paused, readyToSync, syncing, readyToCollect, pendingPayment, readyToSend, sending, issued, paymentActionRequired, paymentFailed, paid, void, overdue, deletedFromPaymentGateway, uncollectible Example:
"issued"

