Baremetrics
App · 25 actions
Read subscription analytics and manage API-source customers, plans, subscriptions and annotations.
Actions
| Action | What it does |
|---|---|
| Cancel subscription | Cancel Subscription. |
| Create annotation | Create Annotation. |
| Create customer | Create Customer. |
| Create plan | Create Plan. |
| Create subscription | Create Subscription. |
| Delete annotation | Delete Annotation. |
| Delete customer | Delete Customer. |
| Delete plan | Delete Plan. |
| Delete subscription | Delete Subscription. |
| Get account | Get Account. |
| Get annotation | Show Annotation. |
| Get customer | Show Customer. |
| Get metrics | Show Summary. |
| Get plan | Show Plan. |
| Get subscription | Show Subscription. |
| List annotations | List Annotations. |
| List charges | List Charges. |
| List customer events | List Customer Events. |
| List customers | List Customers. |
| List events | List Events. |
| List plans | List Plans. |
| List refunds | List Refunds. |
| List sources | List Sources. |
| List subscriptions | List Subscriptions. |
| Update customer | Update Customer. |
Cancel subscription
Cancel Subscription.
Inputs
- Subscription oid
subscription_oidtextRequired - Your unique ID for the subscription
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Canceled at
canceled_atdate and timeRequired - A unix timestamp of when this subscription was, or should be canceled.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"event": {
"id": "example",
"info": {
"addons": [],
"canceled_at": 1
},
"occurred_at": 1,
"received_at": 1,
"type": "example"
}
}
}Create annotation
Create Annotation.
Inputs
- Metric
metrictextRequired - Which metric is this for?
- Annotation
annotationtextRequired - The annotation text
- Date
datedateRequired - YYYY-MM-DD
- Visible to the whole account
global_valuetrue/falseRequired - Should this show on all graphs?
- User ID
user_id_valuetextRequired - Who added this annotation?
Outputs
dataobject- Returned value.
Example output
{
"data": {
"annotation": {
"annotation": "example",
"date": "example",
"global": false,
"id": "example",
"metric": "example",
"user": {
"admin": false,
"email": "example",
"id": "example",
"name": "example"
}
}
}
}Create customer
Create Customer.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Name
nametext - Name.
- Notes
notestext - Your own notes for this customer. These will be displayed in the profile
- Email
emailtext - An email address for this customer. This is used to lookup extra profile information
- Oid
oidtextRequired - Your unique ID for the customer
- Created
createddate and time - A unix timestamp of when this customer was created. Defaults to now.Default:
NOW.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"customer": {
"created": 1,
"current_mrr": 1,
"current_plans": [],
"display_image": "example",
"display_name": "example",
"email": "example",
"is_active": false,
"is_canceled": false,
"ltv": 1,
"name": "example",
"notes": "example",
"oid": "example",
"source": "example",
"source_id": "example"
}
}
}Create plan
Create Plan.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Oid
oidtextRequired - Your unique ID for the plan
- Name
nametextRequired - Your internal name for this plan. This will be displayed in the Plan Breakout section
- Currency
currencytextRequired - Three-letter ISO currency code, such as USD.
- Amount
amountnumberRequired - How much is this plan? (In cents)
- Interval
intervaltextRequired - day, month or yearOne of:
day,month,year. - Interval count
interval_countnumberRequired - Interval count.
- Trial duration
trial_durationnumber - The duration of this trial. This is to be used in conjunction with trial_duration_unitDefault:
0. - Trial duration unit
trial_duration_unittext - This is to be used in conjunction with trial_durationOne of:
day,month,year. Default:day.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"plan": {
"active": false,
"amounts": [],
"created": "example",
"interval": "example",
"interval_count": 1,
"name": "example",
"oid": "example",
"setup_fees": 1,
"source": "example",
"source_id": "example",
"trial_duration": "example",
"trial_duration_unit": "example"
}
}
}Create subscription
Create Subscription.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Oid
oidtextRequired - Your unique ID for the subscription
- Started at
started_atdate and timeRequired - A unix timestamp of when this subscription started
- Canceled at
canceled_atdate and time - A unix timestamp of when this subscription was, or should be canceled. This cannot be changed, so only set this if you are certain you know when the subscription will end.
- Plan oid
plan_oidtextRequired - Your unique ID for the plan
- Customer oid
customer_oidtextRequired - Your unique ID for the customer
- Addons
addonslist - Addons.
- Quantity
quantitynumber - Quantity.Default:
1. - Discount
discountnumber - Integer value (in the same currency as the plan)
Outputs
dataobject- Returned value.
Example output
{
"data": {
"event": {
"id": "example",
"info": {
"addons": [],
"canceled_at": "example",
"customer_oid": "example",
"oid": "example",
"plan_oid": "example",
"quantity": 1,
"started_at": 1
},
"occurred_at": 1,
"received_at": 1,
"type": "example"
}
}
}Delete annotation
Delete Annotation.
Inputs
- Id
idtextRequired - Id.
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Delete customer
Delete Customer.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Delete plan
Delete Plan.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Delete subscription
Delete Subscription.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Get account
Get Account.
Inputs
None.
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Get annotation
Show Annotation.
Inputs
- Id
idtextRequired - Id.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"annotation": {
"annotation": "example",
"date": "example",
"global": false,
"id": "example",
"metric": "example",
"user": {
"admin": false,
"email": "example",
"id": "example",
"name": "example"
}
}
}
}Get customer
Show Customer.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {
"customer": {
"created": 1,
"current_mrr": 1,
"current_plans": [],
"display_image": "example",
"display_name": "example",
"email": "example",
"is_active": false,
"is_canceled": false,
"ltv": 1,
"name": "example",
"notes": "example",
"oid": "example",
"source": "example",
"source_id": "example"
}
}
}Get metrics
Show Summary.
Inputs
- Start date
start_datedateRequired - Start date.
- End date
end_datedateRequired - End date.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"metrics": []
}
}Get plan
Show Plan.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {
"plan": {
"active": false,
"amounts": [],
"created": "example",
"interval": "example",
"interval_count": 1,
"name": "example",
"oid": "example",
"setup_fees": 1,
"source": "example",
"source_id": "example",
"trial_duration": "example",
"trial_duration_unit": "example"
}
}
}Get subscription
Show Subscription.
Inputs
- Oid
oidtextRequired - Oid.
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}List annotations
List Annotations.
Inputs
None.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"annotations": []
}
}List charges
List Charges.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Start
startdate and time - A unix timestamp
- End
enddate and time - A unix timestamp
- Subscription oid
subscription_oidtext - Subscription oid.
- Customer oid
customer_oidtext - Customer oid.
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}List customer events
List Customer Events.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Oid
oidtextRequired - Oid.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"events": []
}
}List customers
List Customers.
Inputs
- Search
searchtext - Allows you to search for a customer based on: oid, email, notes and name
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Sort
sorttext - Allows you to sort the results. You can use ltv or createdDefault:
created. - Order
ordertext - Order.One of:
asc,desc. Default:asc.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"customers": []
}
}List events
List Events.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Live stream
live_streamtext - Set this to true to only return events that show up in the live streamDefault:
false. - Start
startdate and time - Start.
- End
enddate and time - End.
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}List plans
List Plans.
Inputs
- Search
searchtext - Allows you to search based on the name or oid fields
- Source
source_idtextRequired - Please see [Sources](ref:sources)
Outputs
dataobject- Returned value.
Example output
{
"data": {
"plans": []
}
}List refunds
List Refunds.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Start
startdate and time - Start.
- End
enddate and time - End.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"refunds": []
}
}List sources
List Sources.
Inputs
None.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"sources": []
}
}List subscriptions
List Subscriptions.
Inputs
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Customer oid
customer_oidtext - This allows you to return subscriptions for a given customer
- Order
ordertext - Allows you to order subscriptions from newest to oldest `desc` or oldest to newest `asc`One of:
asc,desc. Default:desc.
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Update customer
Update Customer.
Inputs
- Customer oid
customer_oidtextRequired - Your unique ID for the customer
- Source
source_idtextRequired - Please see [Sources](ref:sources)
- Name
nametext - Name.
- Notes
notestext - Notes.
- Created
createddate and time - Unix timestamp of when this customer was created
- Email
emailtext - Email for this customer
Outputs
dataobject- Returned value.
Example output
{
"data": {
"customer": {
"created": 1,
"current_mrr": 1,
"current_plans": [],
"display_image": "example",
"display_name": "example",
"email": "example",
"is_active": false,
"is_canceled": false,
"ltv": 1,
"name": "example",
"notes": "example",
"oid": "example",
"source": "example",
"source_id": "example"
}
}
}