Create historical invoices
curl --request POST \
--url https://api.metronome.com/v1/contracts/createHistoricalInvoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
"contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"issue_date": "2020-02-01T00:00:00.000Z",
"usage_line_items": [
{
"product_id": "f14d6729-6a44-4b13-9908-9387f1918790",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"quantity": 100
}
]
}
],
"preview": false
}
'import requests
url = "https://api.metronome.com/v1/contracts/createHistoricalInvoices"
payload = {
"invoices": [
{
"customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
"contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"issue_date": "2020-02-01T00:00:00.000Z",
"usage_line_items": [
{
"product_id": "f14d6729-6a44-4b13-9908-9387f1918790",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"quantity": 100
}
]
}
],
"preview": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
inclusive_start_date: '2020-01-01T00:00:00.000Z',
exclusive_end_date: '2020-02-01T00:00:00.000Z',
issue_date: '2020-02-01T00:00:00.000Z',
usage_line_items: [
{
product_id: 'f14d6729-6a44-4b13-9908-9387f1918790',
inclusive_start_date: '2020-01-01T00:00:00.000Z',
exclusive_end_date: '2020-02-01T00:00:00.000Z',
quantity: 100
}
]
}
],
preview: false
})
};
fetch('https://api.metronome.com/v1/contracts/createHistoricalInvoices', 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://api.metronome.com/v1/contracts/createHistoricalInvoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'customer_id' => '13117714-3f05-48e5-a6e9-a66093f13b4d',
'contract_id' => 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
'credit_type_id' => '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
'inclusive_start_date' => '2020-01-01T00:00:00.000Z',
'exclusive_end_date' => '2020-02-01T00:00:00.000Z',
'issue_date' => '2020-02-01T00:00:00.000Z',
'usage_line_items' => [
[
'product_id' => 'f14d6729-6a44-4b13-9908-9387f1918790',
'inclusive_start_date' => '2020-01-01T00:00:00.000Z',
'exclusive_end_date' => '2020-02-01T00:00:00.000Z',
'quantity' => 100
]
]
]
],
'preview' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metronome.com/v1/contracts/createHistoricalInvoices"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.metronome.com/v1/contracts/createHistoricalInvoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/contracts/createHistoricalInvoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"line_items": [
{
"name": "<string>",
"total": 123,
"type": "<string>",
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantity": 123,
"unit_price": 123,
"list_price": {
"price": 123,
"tiers": [
{
"price": 123,
"size": 123
}
],
"pricing_group_values": {},
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_custom_fields": {},
"product_tags": [
"<string>"
],
"product_type": "<string>",
"is_prorated": true,
"starting_at": "2023-11-07T05:31:56Z",
"ending_before": "2023-11-07T05:31:56Z",
"commit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applied_commit_or_credit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"commit_custom_fields": {},
"commit_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commit_type": "<string>",
"postpaid_commit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"custom_fields": {},
"pricing_group_values": {},
"presentation_group_values": {},
"metadata": "<string>",
"scheduled_charge_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduled_charge_custom_fields": {},
"subscription_custom_fields": {},
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": {
"level": 123,
"starting_at": "<string>",
"size": "<string>"
},
"discount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discount_custom_fields": {},
"origin": {
"line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"status": "DRAFT, VOID, or FINALIZED",
"total": 123,
"type": "SCHEDULED or USAGE",
"customer_custom_fields": {},
"net_payment_terms_days": 123,
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"external_invoice": {
"invoice_id": "<string>",
"issued_at_timestamp": "2023-11-07T05:31:56Z",
"pdf_url": "<string>",
"tax": {
"total_tax_amount": 123,
"total_taxable_amount": 123,
"transaction_id": "<string>"
},
"invoiced_total": 123,
"invoiced_sub_total": 123,
"billing_provider_error": "<string>",
"external_payment_id": "<string>"
},
"revenue_system_invoices": [
{
"revenue_system_provider": "<string>",
"sync_status": "<string>",
"revenue_system_external_entity_type": "<string>",
"revenue_system_external_entity_id": "<string>",
"error_message": "<string>"
}
],
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_custom_fields": {},
"amendment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"constituent_invoices": [
{
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payer": {
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"regenerated_from_invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"message": "<string>"
}Contracts
Create historical invoices
Create historical usage invoices for past billing periods on specific contracts. Use this endpoint to generate retroactive invoices with custom usage line items, quantities, and date ranges. Supports preview mode to validate invoice data before creation. Ideal for billing migrations or correcting past billing periods.
POST
/
v1
/
contracts
/
createHistoricalInvoices
Create historical invoices
curl --request POST \
--url https://api.metronome.com/v1/contracts/createHistoricalInvoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
"contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"issue_date": "2020-02-01T00:00:00.000Z",
"usage_line_items": [
{
"product_id": "f14d6729-6a44-4b13-9908-9387f1918790",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"quantity": 100
}
]
}
],
"preview": false
}
'import requests
url = "https://api.metronome.com/v1/contracts/createHistoricalInvoices"
payload = {
"invoices": [
{
"customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
"contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"issue_date": "2020-02-01T00:00:00.000Z",
"usage_line_items": [
{
"product_id": "f14d6729-6a44-4b13-9908-9387f1918790",
"inclusive_start_date": "2020-01-01T00:00:00.000Z",
"exclusive_end_date": "2020-02-01T00:00:00.000Z",
"quantity": 100
}
]
}
],
"preview": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
inclusive_start_date: '2020-01-01T00:00:00.000Z',
exclusive_end_date: '2020-02-01T00:00:00.000Z',
issue_date: '2020-02-01T00:00:00.000Z',
usage_line_items: [
{
product_id: 'f14d6729-6a44-4b13-9908-9387f1918790',
inclusive_start_date: '2020-01-01T00:00:00.000Z',
exclusive_end_date: '2020-02-01T00:00:00.000Z',
quantity: 100
}
]
}
],
preview: false
})
};
fetch('https://api.metronome.com/v1/contracts/createHistoricalInvoices', 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://api.metronome.com/v1/contracts/createHistoricalInvoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'customer_id' => '13117714-3f05-48e5-a6e9-a66093f13b4d',
'contract_id' => 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
'credit_type_id' => '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
'inclusive_start_date' => '2020-01-01T00:00:00.000Z',
'exclusive_end_date' => '2020-02-01T00:00:00.000Z',
'issue_date' => '2020-02-01T00:00:00.000Z',
'usage_line_items' => [
[
'product_id' => 'f14d6729-6a44-4b13-9908-9387f1918790',
'inclusive_start_date' => '2020-01-01T00:00:00.000Z',
'exclusive_end_date' => '2020-02-01T00:00:00.000Z',
'quantity' => 100
]
]
]
],
'preview' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metronome.com/v1/contracts/createHistoricalInvoices"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.metronome.com/v1/contracts/createHistoricalInvoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/contracts/createHistoricalInvoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"customer_id\": \"13117714-3f05-48e5-a6e9-a66093f13b4d\",\n \"contract_id\": \"d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc\",\n \"credit_type_id\": \"2714e483-4ff1-48e4-9e25-ac732e8f24f2\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"issue_date\": \"2020-02-01T00:00:00.000Z\",\n \"usage_line_items\": [\n {\n \"product_id\": \"f14d6729-6a44-4b13-9908-9387f1918790\",\n \"inclusive_start_date\": \"2020-01-01T00:00:00.000Z\",\n \"exclusive_end_date\": \"2020-02-01T00:00:00.000Z\",\n \"quantity\": 100\n }\n ]\n }\n ],\n \"preview\": false\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"line_items": [
{
"name": "<string>",
"total": 123,
"type": "<string>",
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantity": 123,
"unit_price": 123,
"list_price": {
"price": 123,
"tiers": [
{
"price": 123,
"size": 123
}
],
"pricing_group_values": {},
"credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_custom_fields": {},
"product_tags": [
"<string>"
],
"product_type": "<string>",
"is_prorated": true,
"starting_at": "2023-11-07T05:31:56Z",
"ending_before": "2023-11-07T05:31:56Z",
"commit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applied_commit_or_credit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"commit_custom_fields": {},
"commit_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commit_type": "<string>",
"postpaid_commit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"custom_fields": {},
"pricing_group_values": {},
"presentation_group_values": {},
"metadata": "<string>",
"scheduled_charge_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduled_charge_custom_fields": {},
"subscription_custom_fields": {},
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": {
"level": 123,
"starting_at": "<string>",
"size": "<string>"
},
"discount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discount_custom_fields": {},
"origin": {
"line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"status": "DRAFT, VOID, or FINALIZED",
"total": 123,
"type": "SCHEDULED or USAGE",
"customer_custom_fields": {},
"net_payment_terms_days": 123,
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"external_invoice": {
"invoice_id": "<string>",
"issued_at_timestamp": "2023-11-07T05:31:56Z",
"pdf_url": "<string>",
"tax": {
"total_tax_amount": 123,
"total_taxable_amount": 123,
"transaction_id": "<string>"
},
"invoiced_total": 123,
"invoiced_sub_total": 123,
"billing_provider_error": "<string>",
"external_payment_id": "<string>"
},
"revenue_system_invoices": [
{
"revenue_system_provider": "<string>",
"sync_status": "<string>",
"revenue_system_external_entity_type": "<string>",
"revenue_system_external_entity_id": "<string>",
"error_message": "<string>"
}
],
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_custom_fields": {},
"amendment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"constituent_invoices": [
{
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payer": {
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"regenerated_from_invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create a historical usage invoice for a contract
Response
Success
Show child attributes
Show child attributes
⌘I