List the quota packages the tenant can buy
curl --request GET \
--url https://app.flextell.ai/api/v1/billing/quota-packages \
--header 'Authorization: Bearer <token>' \
--header 'X-Tenant: <x-tenant>'import requests
url = "https://app.flextell.ai/api/v1/billing/quota-packages"
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant': '<x-tenant>', Authorization: 'Bearer <token>'}
};
fetch('https://app.flextell.ai/api/v1/billing/quota-packages', 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://app.flextell.ai/api/v1/billing/quota-packages",
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>",
"X-Tenant: <x-tenant>"
],
]);
$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://app.flextell.ai/api/v1/billing/quota-packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant", "<x-tenant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flextell.ai/api/v1/billing/quota-packages")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/billing/quota-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"code": "<string>",
"name": "<string>",
"description": "<string>",
"billing_type": "<string>",
"billing_type_label": "<string>",
"quantity": "<string>",
"unit": "<string>",
"unit_label": "<string>",
"price": "<string>",
"tax_rate": "<string>",
"tax_amount": "<string>",
"total_price": "<string>",
"currency": "<string>",
"validity_days": 123,
"sort_order": 123,
"pending_purchase": {
"id": 123,
"tenant_id": 123,
"number": "<string>",
"kind": "<string>",
"kind_label": "<string>",
"subscription_plan_code": "<string>",
"is_subscription_upgrade": true,
"subscription_activation_pending": true,
"subscription_upgrade_from_code": "<string>",
"subscription_upgrade_period_end": "<string>",
"status": "<string>",
"status_label": "<string>",
"currency": "<string>",
"gross_amount": "<string>",
"discount_amount": "<string>",
"net_amount": "<string>",
"tax_amount": "<string>",
"total_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"is_fully_paid": true,
"is_overdue": true,
"is_payable": "<string>",
"is_pending_purchase": true,
"purchase_expired": true,
"period_start": "<string>",
"period_end": "<string>",
"issue_date": "<string>",
"due_date": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkout": {
"can_pay": "<string>",
"can_cancel_purchase": "<string>",
"can_apply_discount": "<string>",
"can_complete_without_payment": "<string>",
"active_payment_id": 123,
"blocked_error_code": "<string>",
"blocked_message": "<string>"
},
"lines": [
{
"id": 123,
"billing_quota_package_id": 123,
"proforma_invoice_id": 123,
"source": "<string>",
"source_label": "<string>",
"billing_type": "<string>",
"billing_type_label": "<string>",
"description": "<string>",
"quantity": "<string>",
"unit": "<string>",
"unit_label": "<string>",
"unit_price": "<string>",
"gross_amount": "<string>",
"discount_allocated": "<string>",
"net_amount": "<string>",
"tax_rate": "<string>",
"tax_amount": "<string>",
"line_total": "<string>",
"period_start": "<string>",
"period_end": "<string>",
"sort_order": 123
}
],
"discount_applications": [
{
"status": "applied",
"id": 123,
"proforma_invoice_id": 123,
"usage_type": "<string>",
"usage_type_label": "<string>",
"applied_amount": "<string>",
"applied_at": "2023-11-07T05:31:56Z",
"proforma_invoice_number": "<string>",
"currency": "<string>",
"discount": {
"id": 123,
"code": "<string>",
"application_mode": "<string>",
"name": "<string>",
"discount_type": "<string>",
"discount_type_label": "<string>",
"value": "<string>"
}
}
],
"payments": [
{
"id": 123,
"proforma_invoice_id": 123,
"method": "<string>",
"method_label": "<string>",
"gateway": "<string>",
"status": "<string>",
"status_label": "<string>",
"failure_message": "<string>",
"amount": "<string>",
"refunded_amount": "<string>",
"currency": "<string>",
"masked_reference": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Billing
List the quota packages the tenant can buy
GET
/
v1
/
billing
/
quota-packages
List the quota packages the tenant can buy
curl --request GET \
--url https://app.flextell.ai/api/v1/billing/quota-packages \
--header 'Authorization: Bearer <token>' \
--header 'X-Tenant: <x-tenant>'import requests
url = "https://app.flextell.ai/api/v1/billing/quota-packages"
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant': '<x-tenant>', Authorization: 'Bearer <token>'}
};
fetch('https://app.flextell.ai/api/v1/billing/quota-packages', 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://app.flextell.ai/api/v1/billing/quota-packages",
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>",
"X-Tenant: <x-tenant>"
],
]);
$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://app.flextell.ai/api/v1/billing/quota-packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant", "<x-tenant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flextell.ai/api/v1/billing/quota-packages")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/billing/quota-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"code": "<string>",
"name": "<string>",
"description": "<string>",
"billing_type": "<string>",
"billing_type_label": "<string>",
"quantity": "<string>",
"unit": "<string>",
"unit_label": "<string>",
"price": "<string>",
"tax_rate": "<string>",
"tax_amount": "<string>",
"total_price": "<string>",
"currency": "<string>",
"validity_days": 123,
"sort_order": 123,
"pending_purchase": {
"id": 123,
"tenant_id": 123,
"number": "<string>",
"kind": "<string>",
"kind_label": "<string>",
"subscription_plan_code": "<string>",
"is_subscription_upgrade": true,
"subscription_activation_pending": true,
"subscription_upgrade_from_code": "<string>",
"subscription_upgrade_period_end": "<string>",
"status": "<string>",
"status_label": "<string>",
"currency": "<string>",
"gross_amount": "<string>",
"discount_amount": "<string>",
"net_amount": "<string>",
"tax_amount": "<string>",
"total_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"is_fully_paid": true,
"is_overdue": true,
"is_payable": "<string>",
"is_pending_purchase": true,
"purchase_expired": true,
"period_start": "<string>",
"period_end": "<string>",
"issue_date": "<string>",
"due_date": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkout": {
"can_pay": "<string>",
"can_cancel_purchase": "<string>",
"can_apply_discount": "<string>",
"can_complete_without_payment": "<string>",
"active_payment_id": 123,
"blocked_error_code": "<string>",
"blocked_message": "<string>"
},
"lines": [
{
"id": 123,
"billing_quota_package_id": 123,
"proforma_invoice_id": 123,
"source": "<string>",
"source_label": "<string>",
"billing_type": "<string>",
"billing_type_label": "<string>",
"description": "<string>",
"quantity": "<string>",
"unit": "<string>",
"unit_label": "<string>",
"unit_price": "<string>",
"gross_amount": "<string>",
"discount_allocated": "<string>",
"net_amount": "<string>",
"tax_rate": "<string>",
"tax_amount": "<string>",
"line_total": "<string>",
"period_start": "<string>",
"period_end": "<string>",
"sort_order": 123
}
],
"discount_applications": [
{
"status": "applied",
"id": 123,
"proforma_invoice_id": 123,
"usage_type": "<string>",
"usage_type_label": "<string>",
"applied_amount": "<string>",
"applied_at": "2023-11-07T05:31:56Z",
"proforma_invoice_number": "<string>",
"currency": "<string>",
"discount": {
"id": 123,
"code": "<string>",
"application_mode": "<string>",
"name": "<string>",
"discount_type": "<string>",
"discount_type_label": "<string>",
"value": "<string>"
}
}
],
"payments": [
{
"id": 123,
"proforma_invoice_id": 123,
"method": "<string>",
"method_label": "<string>",
"gateway": "<string>",
"status": "<string>",
"status_label": "<string>",
"failure_message": "<string>",
"amount": "<string>",
"refunded_amount": "<string>",
"currency": "<string>",
"masked_reference": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Yetkilendirmeler
oauth2bearer
The access token received from the authorization server in the OAuth 2.0 flow.
Başlıklar
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Sorgu Parametreleri
Filter by billing type (ai_chat, ai_report, storage, whatsapp, sms, subscription_fee, seat).
Mevcut seçenekler:
ai_chat, ai_report, storage, whatsapp, sms, subscription_fee, seat, null Yanıt
Array of BillingQuotaPackageResource
Show child attributes
Show child attributes