Billing export
List the billing platforms an export can push to
Every supported billing platform with the fields its connect form needs, the label its own product uses for a customer and a meter, and whether it accepts downward corrections. A platform that cannot take a negative correction withholds those days instead of pushing them.
GET
/
api
/
v1
/
tenant
/
billing
/
export
/
providers
List the billing platforms an export can push to
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/billing/export/providers \
--header 'Authorization: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/billing/export/providers"
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant-ID': '<x-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/billing/export/providers', 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.costgraph.ai/api/v1/tenant/billing/export/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"X-Tenant-ID: <x-tenant-id>"
],
]);
$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://api.costgraph.ai/api/v1/tenant/billing/export/providers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("Authorization", "<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://api.costgraph.ai/api/v1/tenant/billing/export/providers")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/billing/export/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant-ID"] = '<x-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": [
{
"customer_label": "<string>",
"display_name": "<string>",
"docs_url": "<string>",
"fields": [
{
"help": "<string>",
"key": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": true,
"secret": true
}
],
"freeform_meter": true,
"meter_label": "<string>",
"provider": "<string>"
}
]
}Was this page helpful?
⌘I
List the billing platforms an export can push to
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/billing/export/providers \
--header 'Authorization: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/billing/export/providers"
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant-ID': '<x-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/billing/export/providers', 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.costgraph.ai/api/v1/tenant/billing/export/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"X-Tenant-ID: <x-tenant-id>"
],
]);
$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://api.costgraph.ai/api/v1/tenant/billing/export/providers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("Authorization", "<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://api.costgraph.ai/api/v1/tenant/billing/export/providers")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/billing/export/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant-ID"] = '<x-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": [
{
"customer_label": "<string>",
"display_name": "<string>",
"docs_url": "<string>",
"fields": [
{
"help": "<string>",
"key": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": true,
"secret": true
}
],
"freeform_meter": true,
"meter_label": "<string>",
"provider": "<string>"
}
]
}