All URIs are relative to https://{customerId}.billabear.cloud/api/v1
| Method | HTTP request | Description |
|---|---|---|
| add_seats_subscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats |
| cancel_subscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription |
| change_subscription_price | POST /subscription/{subscriptionId}/price | Change Price |
| create_subscription | POST /customer/{customerId}/subscription/start | Create Subscription |
| customer_change_subscription_plan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
| extend_trial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
| get_active_for_customer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
| get_for_customer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
| list_subscription_plans | GET /subscription/plans | List Subscription Plans |
| list_subscriptions | GET /subscription | List |
| remove_seats_subscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
| show_subscription_by_id | GET /subscription/{subscriptionId} | Detail |
| start_trial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
InlineResponse20013 add_seats_subscriptions(body, subscription_id)
Add Seats
Adds seats to a per seat subscription
Since 1.1.4
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SeatsAddBody() # SeatsAddBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Add Seats
api_response = api_instance.add_seats_subscriptions(body, subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->add_seats_subscriptions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SeatsAddBody | ||
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cancel_subscription(body, subscription_id)
Cancel Subscription
Info for a specific subscription
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionIdCancelBody() # SubscriptionIdCancelBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Cancel Subscription
api_instance.cancel_subscription(body, subscription_id)
except ApiException as e:
print("Exception when calling SubscriptionsApi->cancel_subscription: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionIdCancelBody | ||
| subscription_id | str | The id of the subscription to retrieve |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20013 change_subscription_price(body, subscription_id)
Change Price
Changes the price being used for a price. Useful for changing pricing schedule or just price.
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionIdPriceBody() # SubscriptionIdPriceBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Change Price
api_response = api_instance.change_subscription_price(body, subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->change_subscription_price: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionIdPriceBody | ||
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription create_subscription(body, customer_id)
Create Subscription
Create subscription for a customer
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionStartBody() # SubscriptionStartBody |
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# Create Subscription
api_response = api_instance.create_subscription(body, customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->create_subscription: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionStartBody | ||
| customer_id | str | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription customer_change_subscription_plan(body, subscription_id)
Change Subscription Plan
Change the subscription plan for a customer
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionIdPlanBody() # SubscriptionIdPlanBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Change Subscription Plan
api_response = api_instance.customer_change_subscription_plan(body, subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->customer_change_subscription_plan: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionIdPlanBody | ||
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription extend_trial(body, subscription_id)
Extend Trial Subscription
Extend a trial subscription so it's converted from a trial to a normal subscription.
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionIdExtendBody() # SubscriptionIdExtendBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Extend Trial Subscription
api_response = api_instance.extend_trial(body, subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->extend_trial: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionIdExtendBody | ||
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2008 get_active_for_customer(customer_id)
List Customer Active Subscriptions
List all Active customer subscriptions
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# List Customer Active Subscriptions
api_response = api_instance.get_active_for_customer(customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->get_active_for_customer: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | str | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2008 get_for_customer(customer_id)
List Customer Subscriptions
List all customer subscriptions
Since 1.1
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# List Customer Subscriptions
api_response = api_instance.get_for_customer(customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->get_for_customer: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | str | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20012 list_subscription_plans(limit=limit, last_key=last_key)
List Subscription Plans
List all subscriptions plans
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
limit = 56 # int | How many items to return at one time (max 100) (optional)
last_key = 'last_key_example' # str | The key to be used in pagination to say what the last key of the previous page was (optional)
try:
# List Subscription Plans
api_response = api_instance.list_subscription_plans(limit=limit, last_key=last_key)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->list_subscription_plans: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | How many items to return at one time (max 100) | [optional] |
| last_key | str | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2008 list_subscriptions(limit=limit, last_key=last_key)
List
List all subscriptions
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
limit = 56 # int | How many items to return at one time (max 100) (optional)
last_key = 'last_key_example' # str | The key to be used in pagination to say what the last key of the previous page was (optional)
try:
# List
api_response = api_instance.list_subscriptions(limit=limit, last_key=last_key)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->list_subscriptions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | How many items to return at one time (max 100) | [optional] |
| last_key | str | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20013 remove_seats_subscriptions(body, subscription_id)
Remove Seats
Remove seats to a per seat subscription
Since 1.1.4
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SeatsRemoveBody() # SeatsRemoveBody |
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Remove Seats
api_response = api_instance.remove_seats_subscriptions(body, subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->remove_seats_subscriptions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SeatsRemoveBody | ||
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription show_subscription_by_id(subscription_id)
Detail
Info for a specific subscription
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
subscription_id = 'subscription_id_example' # str | The id of the subscription to retrieve
try:
# Detail
api_response = api_instance.show_subscription_by_id(subscription_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->show_subscription_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| subscription_id | str | The id of the subscription to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription start_trial(body, customer_id)
Start Trial Subscription For Customer
Start subscription for a customer
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.SubscriptionsApi(billabear.ApiClient(configuration))
body = billabear.SubscriptionTrialBody() # SubscriptionTrialBody |
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# Start Trial Subscription For Customer
api_response = api_instance.start_trial(body, customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionsApi->start_trial: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | SubscriptionTrialBody | ||
| customer_id | str | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]