Billing
Get apiv1budgetingbillingorginvoices
Liste as faturas de uma organização, da mais recente para a mais antiga. Retorna as 100 mais recentes; has_more é verdadeiro quando existem faturas mais antigas. Chaves de API exigem read:billing e um proprietário/administrador humano ou uma conta de serviço delegada. Leituras entre organizações exigem um administrador humano de cluster com read:cluster.
GET
/
api
/
v1
/
budgeting
/
billing
/
org
/
invoices
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.billing.list_organization_billing_invoices()
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.billing.listOrganizationBillingInvoices({});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Billing.ListOrganizationBillingInvoices(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Billing.ListOrganizationBillingInvoicesAsync();
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices', 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://apigw.mka1.com/api/v1/budgeting/billing/org/invoices",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"invoices": [
{
"id": "<string>",
"period_start": "<string>",
"period_end": "<string>",
"currency": "<string>",
"amount_due_minor": 0,
"amount_paid_minor": 0,
"status": "<string>",
"hosted_invoice_url": "<string>",
"pdf_url": "<string>"
}
],
"has_more": true
}Authorizations
Was this page helpful?
⌘I
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.billing.list_organization_billing_invoices()
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.billing.listOrganizationBillingInvoices({});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Billing.ListOrganizationBillingInvoices(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Billing.ListOrganizationBillingInvoicesAsync();
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices', 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://apigw.mka1.com/api/v1/budgeting/billing/org/invoices",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/budgeting/billing/org/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"invoices": [
{
"id": "<string>",
"period_start": "<string>",
"period_end": "<string>",
"currency": "<string>",
"amount_due_minor": 0,
"amount_paid_minor": 0,
"status": "<string>",
"hosted_invoice_url": "<string>",
"pdf_url": "<string>"
}
],
"has_more": true
}