Get subscription information
curl --request GET \
--url https://api.getoneprofile.ai/billing/subscription/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/billing/subscription/"
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://api.getoneprofile.ai/billing/subscription/', 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.getoneprofile.ai/billing/subscription/",
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://api.getoneprofile.ai/billing/subscription/"
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://api.getoneprofile.ai/billing/subscription/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/billing/subscription/")
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{
"billing_email": "jsmith@example.com",
"billing_interval": "month",
"credit_quantity": 123,
"credit_tier_key": "<string>",
"current_period_end": "2023-11-07T05:31:56Z",
"current_period_start": "2023-11-07T05:31:56Z",
"current_price_decimal": "<string>",
"data_retention": "<string>",
"included_credits": 123,
"is_product_limited": true,
"max_integrations": 123,
"max_rows_per_table": 123,
"max_tables": 123,
"payment_method": {
"brand": "<string>",
"exp_month": 123,
"exp_year": 123,
"last4": "<string>"
},
"product_name": "<string>",
"product_type": "free_plan",
"seats": 123,
"status": "active",
"cancel_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}billing
Get subscription information
Get the subscription information for the organization.
GET
/
billing
/
subscription
/
Get subscription information
curl --request GET \
--url https://api.getoneprofile.ai/billing/subscription/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/billing/subscription/"
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://api.getoneprofile.ai/billing/subscription/', 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.getoneprofile.ai/billing/subscription/",
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://api.getoneprofile.ai/billing/subscription/"
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://api.getoneprofile.ai/billing/subscription/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/billing/subscription/")
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{
"billing_email": "jsmith@example.com",
"billing_interval": "month",
"credit_quantity": 123,
"credit_tier_key": "<string>",
"current_period_end": "2023-11-07T05:31:56Z",
"current_period_start": "2023-11-07T05:31:56Z",
"current_price_decimal": "<string>",
"data_retention": "<string>",
"included_credits": 123,
"is_product_limited": true,
"max_integrations": 123,
"max_rows_per_table": 123,
"max_tables": 123,
"payment_method": {
"brand": "<string>",
"exp_month": 123,
"exp_year": 123,
"last4": "<string>"
},
"product_name": "<string>",
"product_type": "free_plan",
"seats": 123,
"status": "active",
"cancel_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Response
Successful Response
Response schema for subscription information.
The subscription status.
- active: User has active product with no past due fees.
- Product remains active with full functionality.
- incomplete_payment: The first payment failed or is processing.
- Product remains active with full functionality.
- User action is required to activate. Otherwise the product will become UNPAID.
- past_due: The subscription fees aren't paid. Stripe will retry to collect the payment.
- Product remains active with full functionality.
- No user action is needed yet. However a user can proactively solve the issue.
- unpaid: The subscription fees aren't paid. Stripe will no longer try to collect the payment.
- Product is not functional anymore.
- Needs user action to activate.
Available options:
active, incomplete_payment, past_due, unpaid Was this page helpful?