All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
addSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats |
cancelSubscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription |
changeSubscriptionPrice | POST /subscription/{subscriptionId}/price | Change Price |
createSubscription | POST /customer/{customerId}/subscription/start | Create Subscription |
customerChangeSubscriptionPlan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
extendTrial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
listSubscriptionPlans | GET /subscription/plans | List Subscription Plans |
listSubscriptions | GET /subscription | List |
removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
showSubscriptionById | GET /subscription/{subscriptionId} | Detail |
startTrial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
InlineResponse20011 addSeatsSubscriptions(body, subscriptionId)
Add Seats
Adds seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SeatsAddBody body = new SeatsAddBody(); // SeatsAddBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
InlineResponse20011 result = apiInstance.addSeatsSubscriptions(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#addSeatsSubscriptions");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsAddBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
String cancelSubscription(body, subscriptionId)
Cancel Subscription
Info for a specific subscription
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionIdCancelBody body = new SubscriptionIdCancelBody(); // SubscriptionIdCancelBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
String result = apiInstance.cancelSubscription(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#cancelSubscription");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdCancelBody | ||
subscriptionId | String | The id of the subscription to retrieve |
String
- Content-Type: application/json
- Accept: application/json
InlineResponse20011 changeSubscriptionPrice(body, subscriptionId)
Change Price
Changes the price being used for a price. Useful for changing pricing schedule or just price.
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionIdPriceBody body = new SubscriptionIdPriceBody(); // SubscriptionIdPriceBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
InlineResponse20011 result = apiInstance.changeSubscriptionPrice(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#changeSubscriptionPrice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPriceBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription createSubscription(body, customerId)
Create Subscription
Create subscription for a customer
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionStartBody body = new SubscriptionStartBody(); // SubscriptionStartBody |
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
Subscription result = apiInstance.createSubscription(body, customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#createSubscription");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionStartBody | ||
customerId | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription customerChangeSubscriptionPlan(body, subscriptionId)
Change Subscription Plan
Change the subscription plan for a customer
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionIdPlanBody body = new SubscriptionIdPlanBody(); // SubscriptionIdPlanBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
Subscription result = apiInstance.customerChangeSubscriptionPlan(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#customerChangeSubscriptionPlan");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPlanBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription extendTrial(body, subscriptionId)
Extend Trial Subscription
Extend a trial subscription so it's converted from a trial to a normal subscription.
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionIdExtendBody body = new SubscriptionIdExtendBody(); // SubscriptionIdExtendBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
Subscription result = apiInstance.extendTrial(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#extendTrial");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdExtendBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
InlineResponse2006 getActiveForCustomer(customerId)
List Customer Active Subscriptions
List all Active customer subscriptions
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
InlineResponse2006 result = apiInstance.getActiveForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#getActiveForCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 getForCustomer(customerId)
List Customer Subscriptions
List all customer subscriptions<br><br><strong>Since 1.1</strong>
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
InlineResponse2006 result = apiInstance.getForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#getForCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse20010 listSubscriptionPlans(limit, lastKey)
List Subscription Plans
List all subscriptions plans
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
Integer limit = 56; // Integer | How many items to return at one time (max 100)
String lastKey = "lastKey_example"; // String | The key to be used in pagination to say what the last key of the previous page was
try {
InlineResponse20010 result = apiInstance.listSubscriptionPlans(limit, lastKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#listSubscriptionPlans");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
lastKey | String | 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
InlineResponse2006 listSubscriptions(limit, lastKey)
List
List all subscriptions
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
Integer limit = 56; // Integer | How many items to return at one time (max 100)
String lastKey = "lastKey_example"; // String | The key to be used in pagination to say what the last key of the previous page was
try {
InlineResponse2006 result = apiInstance.listSubscriptions(limit, lastKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#listSubscriptions");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
lastKey | String | 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
InlineResponse20011 removeSeatsSubscriptions(body, subscriptionId)
Remove Seats
Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SeatsRemoveBody body = new SeatsRemoveBody(); // SeatsRemoveBody |
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
InlineResponse20011 result = apiInstance.removeSeatsSubscriptions(body, subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#removeSeatsSubscriptions");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsRemoveBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription showSubscriptionById(subscriptionId)
Detail
Info for a specific subscription
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
String subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
try {
Subscription result = apiInstance.showSubscriptionById(subscriptionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#showSubscriptionById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: Not defined
- Accept: application/json
Subscription startTrial(body, customerId)
Start Trial Subscription For Customer
Start subscription for a customer
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.SubscriptionsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
SubscriptionsApi apiInstance = new SubscriptionsApi();
SubscriptionTrialBody body = new SubscriptionTrialBody(); // SubscriptionTrialBody |
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
Subscription result = apiInstance.startTrial(body, customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SubscriptionsApi#startTrial");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionTrialBody | ||
customerId | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json