openapi: 3.0.3 info: title: Production description: >- Baremetrics provides real-time subscription metrics for teams built with Stripe, Shopify Partners, Braintree, Recurly, Chargebee, Google Play, and App Store Connect. In addition to metrics, Baremetrics provides tools that help you reduce churn and grow your business faster: Recover: Prevent failed charges and keep your hard-earned revenue with our 100% automated toolkit. Cancellation insights: Learn exactly why your customers cancel, calculate lost revenue by cancellation reason, and send automated emails to win customers back. Flightpath: Plan for the future with flexible financial modeling tools built for growing SaaS companies. version: '1.0' x-konfig-ignore: object-with-no-properties: true potential-incorrect-type: true servers: - url: https://api.baremetrics.com tags: - name: Source - name: Segment - name: Metric - name: Annotation - name: Goal - name: Attribute - name: Event - name: Reason - name: User - name: Account - name: CancellationInsight paths: /v1/account: get: tags: - Account summary: Get Account operationId: Account_getDetails description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "account": { "id": 'account_id', "default_currency": { "id": "usd", "alternate_symbols": [ "US$" ], "decimal_mark": ".", "disambiguate_symbol": "US$", "html_entity": "$", "iso_code": "USD", "iso_numeric": "840", "name": "United States Dollar", "priority": 1, "smallest_denomination": 1, "subunit": "Cent", "subunit_to_unit": 100, "symbol": "$", "symbol_first": true, "thousands_separator": "," }, "company": "Example Company", "created_at": 123456789 } } schema: $ref: '#/components/schemas/AccountGetDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AccountGetDetails400Response' deprecated: false /v1/sources: get: tags: - Source summary: List Sources operationId: Source_listSources description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "sources": [ { "id": "source_id", "provider": "stripe", "provider_id": "" }, { "id": "source_id", "provider": "baremetrics", "provider_id": null } ] } schema: $ref: '#/components/schemas/SourceListSourcesResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceListSources400Response' deprecated: false /v1/{source_id}/plans: get: tags: - Source summary: List Plans operationId: Source_getPlansList description: '' parameters: - description: Allows you to search based on the name or oid fields name: search in: query schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "plans": [ { "oid": "plan_1", "source_id": "123", "source": "baremetrics", "name": "Plan 1", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": null, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 450000 } ] }, { "oid": "plan_2", "source_id": "123", "source": "baremetrics", "name": "Plan 2", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": null, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 450000 } ] } ] } schema: $ref: '#/components/schemas/SourceGetPlansListResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetPlansList400Response' deprecated: false post: tags: - Source summary: Create Plan operationId: Source_createPlan description: >- Create a plan for use when [creating](https://developers.baremetrics.com/reference/introduction) or [updating](https://developers.baremetrics.com/reference/introduction) subscriptions. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCreatePlanRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "plan": { "oid": "plan_2", "source_id": "123", "source": "baremetrics", "name": "Plan 2", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": null, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 450000 } ] } } schema: $ref: '#/components/schemas/SourceCreatePlanResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: '#/components/schemas/SourceCreatePlan400Response' deprecated: false /v1/{source_id}/plans/{oid}: get: tags: - Source summary: Show Plan operationId: Source_getPlan description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "plan": { "oid": "plan_2", "source_id": "123", "source": "baremetrics", "name": "Plan 2", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": null, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 450000 } ] } } schema: $ref: '#/components/schemas/SourceGetPlanResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetPlan400Response' deprecated: false delete: tags: - Source summary: Delete Plan operationId: Source_deletePlan description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceDeletePlanResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceDeletePlan400Response' deprecated: false /v1/{source_id}/plans/{plan_oid}: put: tags: - Source summary: Update Plan operationId: Source_updatePlan description: '' parameters: - description: Your interval plan id name: plan_oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceUpdatePlanRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "plan": { "oid": "plan_2", "source_id": "123", "source": "baremetrics", "name": "Plan 2", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": null, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 450000 } ] } } schema: $ref: '#/components/schemas/SourceUpdatePlanResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceUpdatePlan400Response' deprecated: false /v1/{source_id}/customers: get: tags: - Source summary: List Customers operationId: Source_getCustomerList description: Fetch a list of all customers on your account parameters: - description: >- Allows you to search for a customer based on: oid, email, notes and name name: search in: query schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string - description: Allows you to sort the results. You can use ltv or created name: sort in: query schema: type: string default: created - name: order in: query schema: type: string default: asc responses: '200': description: '200' content: application/json: examples: Result: value: |- { "customers": [ { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, "is_active": true, "is_canceled": false, "current_mrr": 1000, "current_plans": [ { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } ] } ] } schema: $ref: '#/components/schemas/SourceGetCustomerListResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetCustomerList400Response' deprecated: false post: tags: - Source summary: Create Customer operationId: Source_createCustomerRecord description: >- This endpoint allows you to create a customer record. After you create the record, you will be able to create a [Subscription](https://developers.baremetrics.com/reference/introduction) parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCreateCustomerRecordRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 0, "is_active": false, "is_canceled": false, "current_mrr": 0, "current_plans": [] } } schema: $ref: '#/components/schemas/SourceCreateCustomerRecordResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: '#/components/schemas/SourceCreateCustomerRecord400Response' deprecated: false /v1/{source_id}/customers/{oid}: get: tags: - Source summary: Show Customer operationId: Source_getCustomerDetails description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, "is_active": true, "is_canceled": false, "current_mrr": 1000, "current_plans": [ { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } ] } } schema: $ref: '#/components/schemas/SourceGetCustomerDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetCustomerDetails400Response' deprecated: false delete: tags: - Source summary: Delete Customer operationId: Source_deleteCustomer description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceDeleteCustomerResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceDeleteCustomer400Response' deprecated: false /v1/{source_id}/customers/{oid}/events: get: tags: - Source summary: List Customer Events operationId: Source_listCustomerEvents description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: oid in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "events": [ { "id": "id_1", "event_type": "new_customer", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800 }, { "id": "id_2", "event_type": "charge", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800 } ] } schema: $ref: '#/components/schemas/SourceListCustomerEventsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceListCustomerEvents400Response' deprecated: false /v1/{source_id}/customers/{customer_oid}: put: tags: - Source summary: Update Customer operationId: Source_updateCustomerInformation description: >- This endpoint allows you to update the basic information stored on a Customer, such as first name, last name and notes parameters: - description: Your unique ID for the customer name: customer_oid in: path schema: type: string required: true - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceUpdateCustomerInformationRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, "is_active": true, "is_canceled": false, "current_mrr": 1000, "current_plans": [ { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } ] } } schema: $ref: '#/components/schemas/SourceUpdateCustomerInformationResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: >- #/components/schemas/SourceUpdateCustomerInformation400Response deprecated: false /v1/{source_id}/subscriptions: get: tags: - Source summary: List Subscriptions operationId: Source_getSubscriptions description: Get all subscriptions linked to this API Key. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string - description: This allows you to return subscriptions for a given customer name: customer_oid in: query schema: type: string - description: >- Allows you to order subscriptions from newest to oldest `desc` or oldest to newest `asc` name: order in: query schema: type: string default: desc responses: '200': description: '200' content: application/json: examples: Result: value: |- { "subscriptions": [ { "oid": "subscription_1", "source_id": "source_1", "source": "stripe", "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "canceled_at": null, "started_at": 1492605754, "processed": true, "active": true, "quantity": 1, "discount": 0, "plan": { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } } ] } schema: $ref: '#/components/schemas/SourceGetSubscriptionsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetSubscriptions400Response' deprecated: false post: tags: - Source summary: Create Subscription operationId: Source_createSubscription description: This endpoint allows you to create a Subscription. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCreateSubscriptionRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "48X1ZZHtRaBtfN", "type": "subscription.created", "info": { "oid": "subscription_51", "started_at": 1474381618, "plan_oid": "1476719008009", "customer_oid": "1476719006346", "canceled_at": null, "quantity": 1, "addons" : [ { "oid": "addon_1", "amount": 100, "quantity": 1 }, { "oid": "addon_2", "amount": 50, "quantity": 1 } ] }, "occurred_at": 1474381618, "received_at": 1480421211 } } schema: $ref: '#/components/schemas/SourceCreateSubscriptionResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: '#/components/schemas/SourceCreateSubscription400Response' deprecated: false /v1/{source_id}/subscriptions/{oid}: get: tags: - Source summary: Show Subscription operationId: Source_getSubscription description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "subscription": { "oid": "subscription_1", "source_id": "source_1", "source": "stripe", "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "canceled_at": null, "started_at": 1492605754, "processed": true, "active": true, "quantity": 1, "discount": 0, "plan": { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } } } schema: $ref: '#/components/schemas/SourceGetSubscriptionResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetSubscription400Response' deprecated: false delete: tags: - Source summary: Delete Subscription operationId: Source_removeSubscription description: '' parameters: - name: oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveSubscriptionResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveSubscription400Response' deprecated: false /v1/{source_id}/subscriptions/{subscription_oid}: put: tags: - Source summary: Update Subscription operationId: Source_updateSubscription description: >- This allows you to update a Subscription, such as changing plans and addons. parameters: - description: Your unique ID for the subscription name: subscription_oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceUpdateSubscriptionRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "48X4cZ3T25MKkL", "type": "subscription.updated", "info": { "plan_oid": "1476719008009", "occurred_at": 1480421495, "quantity": 1, "addons" : [ { "oid": "addon_1", "amount": 100, "quantity": 1 }, { "oid": "addon_2", "amount": 50, "quantity": 1 }, { "oid": "addon_3", "amount": 25, "quantity": 1 } ] }, "occurred_at": 1480421495, "received_at": 1480421495 } } schema: $ref: '#/components/schemas/SourceUpdateSubscriptionResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: '#/components/schemas/SourceUpdateSubscription400Response' deprecated: false /v1/{source_id}/subscriptions/{subscription_oid}/cancel: put: tags: - Source summary: Cancel Subscription operationId: Source_cancelSubscription description: This endpoint allows you to cancel a subscription. parameters: - description: Your unique ID for the subscription name: subscription_oid in: path required: true schema: type: string - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCancelSubscriptionRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "48X3C1W4w5vCbx", "type": "subscription.canceled", "info": { "canceled_at": 1480421362, "addons": [] }, "occurred_at": 1480421362, "received_at": 1480421362 } } schema: $ref: '#/components/schemas/SourceCancelSubscriptionResponse' '400': description: '400' content: application/json: examples: Result: value: "{\n\t\"error\": \"Error message here\"\n}" schema: $ref: '#/components/schemas/SourceCancelSubscription400Response' deprecated: false /v1/annotations: get: tags: - Annotation summary: List Annotations operationId: Annotation_list description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "annotations": [ { "id": "our_unique_id", "metric": "mrr", "annotation": "New Feature 1", "date": "2015-03-31", "global": true, "user": { "id": "user_id", "email": "user@baremetrics.com", "admin": true, "name": "User Name" } } ] } schema: $ref: '#/components/schemas/AnnotationListResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AnnotationList400Response' deprecated: false post: tags: - Annotation summary: Create Annotation operationId: Annotation_createNew description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/AnnotationCreateNewRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "annotation": { "id": "our_unique_id", "metric": "mrr", "annotation": "New Feature 1", "date": "2015-03-31", "global": true, "user": { "id": "user_id", "email": "user@baremetrics.com", "admin": true, "name": "User Name" } } } schema: $ref: '#/components/schemas/AnnotationCreateNewResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AnnotationCreateNew400Response' deprecated: false /v1/annotations/{id}: get: tags: - Annotation summary: Show Annotation operationId: Annotation_getDetails description: '' parameters: - name: id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "annotation": { "id": "our_unique_id", "metric": "mrr", "annotation": "New Feature 1", "date": "2015-03-31", "global": true, "user": { "id": "user_id", "email": "user@baremetrics.com", "admin": true, "name": "User Name" } } } schema: $ref: '#/components/schemas/AnnotationGetDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AnnotationGetDetails400Response' deprecated: false delete: tags: - Annotation summary: Delete Annotation operationId: Annotation_removeById description: '' parameters: - name: id in: path required: true schema: type: string responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AnnotationRemoveByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AnnotationRemoveById400Response' deprecated: false /v1/goals: get: tags: - Goal summary: List Goals operationId: Goal_getList description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "goals": [ { "id": "our_unique_id", "metric": "mrr", "end_amount": 2000, "start_amount": 1000, "end_date": "2016-06-30", "start_date": "2016-01-02", "name": "MRR Growth" } ] } schema: $ref: '#/components/schemas/GoalGetListResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/GoalGetList400Response' deprecated: false post: tags: - Goal summary: Create Goal operationId: Goal_createNewGoal description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/GoalCreateNewGoalRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "goal": { "id": "our_unique_id", "metric": "mrr", "end_amount": 2000, "start_amount": 1000, "end_date": "2016-06-30", "start_date": "2016-01-02", "name": "Goal 1" } } schema: $ref: '#/components/schemas/GoalCreateNewGoalResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/GoalCreateNewGoal400Response' deprecated: false /v1/goals/{id}: get: tags: - Goal summary: Show Goal operationId: Goal_getById description: '' parameters: - description: Unique ID name: id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "goal": { "id": "our_unique_id", "metric": "mrr", "end_amount": 2000, "start_amount": 1000, "end_date": "2016-06-30", "start_date": "2016-01-02", "name": "MRR Growth" } } schema: $ref: '#/components/schemas/GoalGetByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/GoalGetById400Response' deprecated: false delete: tags: - Goal summary: Delete Goal operationId: Goal_remove description: '' parameters: - name: id in: path required: true schema: type: string responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/GoalRemoveResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/GoalRemove400Response' deprecated: false /v1/users: get: tags: - User summary: List Users operationId: User_listUsers description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "users": [ { "id": "our_unique_id", "email": "user@baremetrics.com", "admin": true, "name": "User Name" } ] } schema: $ref: '#/components/schemas/UserListUsersResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/UserListUsers400Response' deprecated: false /v1/users/{id}: get: tags: - User summary: Show User operationId: User_getUserById description: '' parameters: - name: id in: path required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "user": { "id": "our_unique_id", "email": "user@baremetrics.com", "admin": true, "name": "User Name" } } schema: $ref: '#/components/schemas/UserGetUserByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/UserGetUserById400Response' deprecated: false /v1/{source_id}/charges: get: tags: - Source summary: List Charges operationId: Source_getChargeList description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string - name: start in: query schema: type: string format: date-time - name: end in: query schema: type: string format: date-time - name: subscription_oid in: query schema: type: string - name: customer_oid in: query schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: |- { "charges": [ { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } ] } schema: $ref: '#/components/schemas/SourceGetChargeListResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetChargeList400Response' deprecated: false post: tags: - Source summary: Create Charge operationId: Source_createChargeOneOff description: Create "One-Off" charges that are not linked to a subscription. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCreateChargeOneOffRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "charge": { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } } schema: $ref: '#/components/schemas/SourceCreateChargeOneOffResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceCreateChargeOneOff400Response' deprecated: false /v1/{source_id}/charges/{oid}: get: tags: - Source summary: Show Charge operationId: Source_getChargeDetails description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string - name: oid in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "charge": { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } } schema: $ref: '#/components/schemas/SourceGetChargeDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetChargeDetails400Response' deprecated: false delete: tags: - Source summary: Delete Charge operationId: Source_removeOneOffCharge description: Delete "One-Off" charges that are not linked to a subscription. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: oid in: path schema: type: string required: true responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveOneOffChargeResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveOneOffCharge400Response' deprecated: false /v1/{source_id}/refunds: get: tags: - Source summary: List Refunds operationId: Source_getRefunds description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: start in: query schema: type: string format: date-time - name: end in: query schema: type: string format: date-time responses: '200': description: '200' content: application/json: examples: Result: value: |- { "refunds": [ { "oid": "your_unique_id", "source_id": "source_id", "source": "stripe", "charge_oid": "charge_oid", "created": 1510789071, "customer": { "oid": "customer_1", "source_id": "source_id", "source": "stripe", "created": 1445122336, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": null, "ltv": 116148 }, "amount": 8700 } ] } schema: $ref: '#/components/schemas/SourceGetRefundsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetRefunds400Response' deprecated: false post: tags: - Source summary: Create Refund operationId: Source_createOneOffRefund description: Create "One-Off" refunds that are not linked to a subscription. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SourceCreateOneOffRefundRequest' responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"refund\": {\n \"oid\": \"your_unique_id\",\n \"source_id\": \"source_id\",\n \"source\": \"baremetrics\",\n \"created\": 1475452800,\n \"customer\": {\n \"oid\": \"customer_1\",\n \"source_id\": \"source_1\",\n \"source\": \"stripe\",\n \"created\": 1492605754,\n \"email\": \"customer_1@baremetrics.com\",\n \"name\": \"Customer 1\",\n \"display_image\": \"https://logo.clearbit.com/baremetrics.com\",\n \"display_name\": \"Customer 1\",\n \"notes\": \"Here are some notes\",\n \"ltv\": 50000,\n },\n \"charge\": {\n \t\"oid\": \"123\",\n \"source_id\": \"source_id\",\n \"source\": \"baremetrics\",\n \"status\": \"paid\",\n \"created\": 1475452800,\n \"currency\": \"usd\",\n \"amount\": 450000,\n \"original_amount\": 450000\n },\n \"amount\": 450000\n }\n}" schema: $ref: '#/components/schemas/SourceCreateOneOffRefundResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceCreateOneOffRefund400Response' deprecated: false /v1/{source_id}/refunds/{oid}: get: tags: - Source summary: Show Refund operationId: Source_getRefundDetails description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: oid in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "oid": "your_unique_id", "source_id": "source_id", "source": "stripe", "charge_oid": "charge_oid", "created": 1510789071, "customer": { "oid": "customer_1", "source_id": "source_id", "source": "stripe", "created": 1445122336, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": null, "ltv": 116148 }, "amount": 8700 } schema: $ref: '#/components/schemas/SourceGetRefundDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetRefundDetails400Response' deprecated: false delete: tags: - Source summary: Delete Refund operationId: Source_removeOneOffRefund description: Delete "One-Off" refunds that are not linked to a subscription. parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: oid in: path schema: type: string required: true responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveOneOffRefundResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceRemoveOneOffRefund400Response' deprecated: false /v1/{source_id}/events: get: tags: - Source summary: List Events operationId: Source_getEvents description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - description: >- Set this to true to only return events that show up in the live stream name: live_stream in: query schema: type: string default: 'false' - name: start in: query schema: type: string format: date-time - name: end in: query schema: type: string format: date-time responses: '200': description: '200' content: application/json: examples: Result: value: |- { "events": [ { "id": "id_1", "event_type": "charge", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, } } ], "meta": { "pagination": { "has_more": false, "page": 0, "per_page": 30 } } } schema: $ref: '#/components/schemas/SourceGetEventsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetEvents400Response' deprecated: false /v1/{source_id}/events/{id}: get: tags: - Source summary: Show Event operationId: Source_getEventById description: '' parameters: - description: Please see [Sources](ref:sources) name: source_id in: path schema: type: string required: true - name: id in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "id_1", "event_type": "charge", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, } } } schema: $ref: '#/components/schemas/SourceGetEventByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SourceGetEventById400Response' deprecated: false /v1/metrics: get: tags: - Metric summary: Show Summary operationId: Metric_showSummary description: '' parameters: - name: start_date in: query required: true schema: type: string default: '2016-11-01' - name: end_date in: query required: true schema: type: string default: '2016-11-26' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "metrics": [ { "human_date": "2016-11-26", "date": 1480118400, "active_customers": 642, "active_subscriptions": 642, "add_on_mrr": 0, "arpu": 9383, "arr": 72289044, "cancellations": 0, "coupons": 43300, "downgrades": 0, "failed_charges": 1, "fees": 7373, "ltv": 159039, "mrr": 6024087, "net_revenue": 233498, "new_customers": 0, "other_revenue": 0, "reactivated_customers": 0, "refunds": 0, "revenue_churn": 543, "trial_conversions": 0, "upgrades": 1, "user_churn": 590 }, { "human_date": "2016-11-27", "date": 1480204800, "active_customers": 640, "active_subscriptions": 640, "add_on_mrr": 0, "arpu": 9362, "arr": 71900916, "cancellations": 2, "coupons": 6677, "downgrades": 1, "failed_charges": 1, "fees": 4452, "ltv": 158949, "mrr": 5991743, "net_revenue": 129723, "new_customers": 0, "other_revenue": 0, "reactivated_customers": 0, "refunds": 0, "revenue_churn": 497, "trial_conversions": 0, "upgrades": 1, "user_churn": 589 } ] } schema: $ref: '#/components/schemas/MetricShowSummaryResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/MetricShowSummary400Response' deprecated: false /v1/metrics/{metric}: get: tags: - Metric summary: Show Metric operationId: Metric_showDetails description: '' parameters: - description: >- You can see a list of available metrics [here](https://developers.baremetrics.com/reference/introduction) name: metric in: path schema: type: string required: true - name: start_date in: query required: true schema: type: string format: date default: '2016-11-01' - name: end_date in: query required: true schema: type: string format: date default: '2016-11-26' - description: The number of days ago to compare results to name: compare_to in: query schema: type: integer format: int32 default: 30 responses: '200': description: '200' content: application/json: examples: Result: value: |- { "metrics": [ { "date": 1480118400, "human_date": "2016-11-26", "value": 6024087, "notes": null, "previous": { "date": 1477526400, "human_date": "2016-10-27", "value": 5941979, "percent": 1.4, "notes": null } }, { "date": 1480204800, "human_date": "2016-11-27", "value": 5991743, "notes": null, "previous": { "date": 1477612800, "human_date": "2016-10-28", "value": 5932562, "percent": 1, "notes": null } }, { "date": 1480291200, "human_date": "2016-11-28", "value": 6050735, "notes": null, "previous": { "date": 1477699200, "human_date": "2016-10-29", "value": 5940529, "percent": 1.9, "notes": null } }, { "date": 1480377600, "human_date": "2016-11-29", "value": 6076135, "notes": null, "previous": { "date": 1477785600, "human_date": "2016-10-30", "value": 5935279, "percent": 2.4, "notes": null } } ] } schema: $ref: '#/components/schemas/MetricShowDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/MetricShowDetails400Response' deprecated: false /v1/metrics/{metric}/customers: get: tags: - Metric summary: Show Customers operationId: Metric_listCustomers description: >- Returns a list of customers that make up this metric. For example, the upgrades metric will return all customers who have upgraded within the selected range. You can also see their MRR contribution. parameters: - name: start_date in: query required: true schema: type: string format: date - name: end_date in: query required: true schema: type: string format: date - description: >- You can see a list of available metrics [here](https://developers.baremetrics.com/reference/introduction) name: metric in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "metrics": [ { "date": 1475107200, "human_date": "2016-09-29", "value": 2, "customers": [ { "mrr": 5000, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "current_plan": { "oid": "mrr_50_mo", "source_id": "stripe_1", "source": "stripe", "name": "Startup $50 - MRR - Monthly", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1450216295, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 5000 } ] }, "previous_plan": { "oid": "free", "source_id": "stripe_1", "source": "stripe", "name": "Free", "interval": "month", "interval_count": 1, "trial_duration": 14, "trial_duration_unit": "day", "created": 1438620623, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 0 } ] } } ] } ] } schema: $ref: '#/components/schemas/MetricListCustomersResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/MetricListCustomers400Response' deprecated: false /v1/metrics/{metric}/plans: get: tags: - Metric summary: Show Plan Breakout operationId: Metric_showPlanBreakout description: This allows you to break down a metric by plan, across a date range parameters: - name: start_date in: query required: true schema: type: string format: date - name: end_date in: query required: true schema: type: string format: date - description: >- You can see a list of available metrics [here](https://developers.baremetrics.com/reference/introduction) name: metric in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "metrics": [ { "date": 1477872000, "human_date": "2016-10-31", "value": 52664, "plan": { "oid": "startup_yearly_790", "source_id": "3ULWIj59pU016O", "source": "stripe", "name": "Startup (Yearly)", "interval": "year", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1394818080, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 79000 } ] } } ] } schema: $ref: '#/components/schemas/MetricShowPlanBreakoutResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/MetricShowPlanBreakout400Response' deprecated: false /v1/metrics/cohorts: get: tags: - Metric summary: Show Cohorts operationId: Metric_showCohorts description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- [ { "end": "2017-08-31", "mrr": 569521, "begin": "2017-08-01", "cells": [ { "end": "2017-08-31", "user": { "total": 1563, "absolute": 1533, "percentage": 0.98 }, "begin": "2017-08-01", "revenue": { "total": 569521, "absolute": 554122, "percentage": 0.97, "absolute_formatted": "$5,541", "total_formatted": "$569,521" } }, { "end": "2017-09-30", "user": { "total": 1563, "absolute": 1509, "percentage": 0.97 }, "begin": "2017-09-01", "revenue": { "total": 569521, "absolute": 541089, "percentage": 0.95, "absolute_formatted": "$5,410", "total_formatted": "$569,521" } }, { "end": "2017-10-31", "user": { "total": 1563, "absolute": 1476, "percentage": 0.94 }, "begin": "2017-10-01", "revenue": { "total": 569521, "absolute": 522393, "percentage": 0.92, "absolute_formatted": "$5,223", "total_formatted": "$569,521" } }, { "end": "2017-11-30", "user": { "total": 1563, "absolute": 1454, "percentage": 0.93 }, "begin": "2017-11-01", "revenue": { "total": 569521, "absolute": 509309, "percentage": 0.89, "absolute_formatted": "$5,093", "total_formatted": "$569,521" } }, { "end": "2017-12-31", "user": { "total": 1563, "absolute": 1437, "percentage": 0.92 }, "begin": "2017-12-01", "revenue": { "total": 569521, "absolute": 499460, "percentage": 0.88, "absolute_formatted": "$4,994", "total_formatted": "$569,521" } }, { "end": "2018-01-31", "user": { "total": 1563, "absolute": 1421, "percentage": 0.91 }, "begin": "2018-01-01", "revenue": { "total": 569521, "absolute": 490544, "percentage": 0.86, "absolute_formatted": "$4,905", "total_formatted": "$569,521" } }, { "end": "2018-02-28", "user": { "total": 1563, "absolute": 1403, "percentage": 0.9 }, "begin": "2018-02-01", "revenue": { "total": 569521, "absolute": 480095, "percentage": 0.84, "absolute_formatted": "$4,800", "total_formatted": "$569,521" } }, { "end": "2018-03-31", "user": { "total": 1563, "absolute": 1383, "percentage": 0.88 }, "begin": "2018-03-01", "revenue": { "total": 569521, "absolute": 469370, "percentage": 0.82, "absolute_formatted": "$4,693", "total_formatted": "$569,521" } }, { "end": "2018-04-30", "user": { "total": 1563, "absolute": 1372, "percentage": 0.88 }, "begin": "2018-04-01", "revenue": { "total": 569521, "absolute": 463904, "percentage": 0.81, "absolute_formatted": "$4,639", "total_formatted": "$569,521" } }, { "end": "2018-05-31", "user": { "total": 1563, "absolute": 1363, "percentage": 0.87 }, "begin": "2018-05-01", "revenue": { "total": 569521, "absolute": 458738, "percentage": 0.81, "absolute_formatted": "$4,587", "total_formatted": "$569,521" } }, { "end": "2018-06-30", "user": { "total": 1563, "absolute": 1334, "percentage": 0.85 }, "begin": "2018-06-01", "revenue": { "total": 569521, "absolute": 448529, "percentage": 0.79, "absolute_formatted": "$4,485", "total_formatted": "$569,521" } }, { "end": "2018-07-31", "user": { "total": 1563, "absolute": 1313, "percentage": 0.84 }, "begin": "2018-07-01", "revenue": { "total": 569521, "absolute": 439404, "percentage": 0.77, "absolute_formatted": "$4,394", "total_formatted": "$569,521" } }, { "end": "2018-08-31", "user": { "total": 1563, "absolute": 1185, "percentage": 0.76 }, "begin": "2018-08-01", "revenue": { "total": 569521, "absolute": 544633, "percentage": 0.96, "absolute_formatted": "$5,446", "total_formatted": "$569,521" } }, { "end": "2018-09-30", "user": { "total": 1563, "absolute": 1097, "percentage": 0.7 }, "begin": "2018-09-01", "revenue": { "total": 569521, "absolute": 555553, "percentage": 0.98, "absolute_formatted": "$5,555", "total_formatted": "$569,521" } }, { "end": "2018-10-31", "user": { "total": 1563, "absolute": 1089, "percentage": 0.7 }, "begin": "2018-10-01", "revenue": { "total": 569521, "absolute": 550585, "percentage": 0.97, "absolute_formatted": "$5,505", "total_formatted": "$569,521" } }, { "end": "2018-11-30", "user": { "total": 1563, "absolute": 1085, "percentage": 0.69 }, "begin": "2018-11-01", "revenue": { "total": 569521, "absolute": 547985, "percentage": 0.96, "absolute_formatted": "$5,479", "total_formatted": "$569,521" } }, { "end": "2018-12-31", "user": { "total": 1563, "absolute": 1081, "percentage": 0.69 }, "begin": "2018-12-01", "revenue": { "total": 569521, "absolute": 544584, "percentage": 0.96, "absolute_formatted": "$5,445", "total_formatted": "$569,521" } }, { "end": "2019-01-31", "user": { "total": 1563, "absolute": 1068, "percentage": 0.68 }, "begin": "2019-01-01", "revenue": { "total": 569521, "absolute": 537324, "percentage": 0.94, "absolute_formatted": "$5,373", "total_formatted": "$569,521" } }, { "end": "2019-02-28", "user": { "total": 1563, "absolute": 1065, "percentage": 0.68 }, "begin": "2019-02-01", "revenue": { "total": 569521, "absolute": 535216, "percentage": 0.94, "absolute_formatted": "$5,352", "total_formatted": "$569,521" } }, { "end": "2019-03-31", "user": { "total": 1563, "absolute": 1058, "percentage": 0.68 }, "begin": "2019-03-01", "revenue": { "total": 569521, "absolute": 530816, "percentage": 0.93, "absolute_formatted": "$5,308", "total_formatted": "$569,521" } }, { "end": "2019-04-30", "user": { "total": 1563, "absolute": 1055, "percentage": 0.67 }, "begin": "2019-04-01", "revenue": { "total": 569521, "absolute": 528000, "percentage": 0.93, "absolute_formatted": "$5,280", "total_formatted": "$569,521" } }, { "end": "2019-05-31", "user": { "total": 1563, "absolute": 1049, "percentage": 0.67 }, "begin": "2019-05-01", "revenue": { "total": 569521, "absolute": 524092, "percentage": 0.92, "absolute_formatted": "$5,240", "total_formatted": "$569,521" } }, { "end": "2019-06-30", "user": { "total": 1563, "absolute": 1046, "percentage": 0.67 }, "begin": "2019-06-01", "revenue": { "total": 569521, "absolute": 522416, "percentage": 0.92, "absolute_formatted": "$5,224", "total_formatted": "$569,521" } }, { "end": "2019-07-31", "user": { "total": 1563, "absolute": 1040, "percentage": 0.67 }, "begin": "2019-07-01", "revenue": { "total": 569521, "absolute": 518940, "percentage": 0.91, "absolute_formatted": "$5,189", "total_formatted": "$569,521" } } ], "customers": 1563, "mrr_formatted": "$5,695" } ] schema: $ref: '#/components/schemas/MetricShowCohortsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/MetricShowCohorts400Response' deprecated: false /v1/segments/fields: get: tags: - Segment summary: List Fields operationId: Segment_getFields description: >- Returns the fields that can be used to create/search a segment. The key is the category, and a category contains multiple fields. responses: '200': description: '200' content: application/json: examples: Result: value: |- { "baremetrics": [ { "field": "oid", "title": "OID", "type": "string", "methods": [ "equals", "not_equals", "contains", "not_contains" ] }, { "field": "email", "title": "Email Address", "type": "string", "methods": [ "equals", "not_equals", "contains", "not_contains" ] } ], "clearbit": [ { "field": "company.geo.country", "title": "Clearbit Company Country", "type": "string", "methods": [ "equals", "not_equals", "contains", "not_contains" ] } ] } schema: $ref: '#/components/schemas/SegmentGetFieldsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentGetFields400Response' deprecated: false /v1/segments: get: tags: - Segment summary: List Segments operationId: Segment_listSegments description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "segments": [ { "id": "1", "name": "Active Customers", "query": [ { "category": "baremetrics", "field": "subscriptions.is_active", "method": "true", "value": "true" } ], "created_at": 1492523687, "updated_at": 1492614366 } ] } schema: $ref: '#/components/schemas/SegmentListSegmentsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentListSegments400Response' deprecated: false post: tags: - Segment summary: Create Segment operationId: Segment_createRequest description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/SegmentCreateRequestRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "segment": { "id": "1", "name": "Active Customers", "query": [ { "category": "baremetrics", "field": "subscriptions.is_active", "method": "boolean", "value": "true" } ], "created_at": 1492523687, "updated_at": 1492614366 } } schema: $ref: '#/components/schemas/SegmentCreateRequestResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentCreateRequest400Response' deprecated: false /v1/segments/{id}: get: tags: - Segment summary: Show Segment operationId: Segment_showDetails description: '' parameters: - name: id in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "segment": { "id": "1", "name": "Active Customers", "query": [ { "category": "baremetrics", "field": "subscriptions.is_active", "method": "true", "value": "true" } ], "created_at": 1492523687, "updated_at": 1492614366 } } schema: $ref: '#/components/schemas/SegmentShowDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentShowDetails400Response' deprecated: false put: tags: - Segment summary: Update Segment operationId: Segment_updateById description: '' parameters: - name: id in: path schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/SegmentUpdateByIdRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "segment": { "id": "1", "name": "Active Customers", "query": [ { "category": "baremetrics", "field": "subscriptions.is_active", "method": "true", "value": "true" } ], "created_at": 1492523687, "updated_at": 1492614366 } } schema: $ref: '#/components/schemas/SegmentUpdateByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentUpdateById400Response' deprecated: false delete: tags: - Segment summary: Delete Segment operationId: Segment_removeById description: '' parameters: - name: id in: path schema: type: string required: true responses: '202': description: '202' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentRemoveByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentRemoveById400Response' deprecated: false /v1/segments/search: post: tags: - Segment summary: Search Segment operationId: Segment_findWithoutSave description: Search for a segment without saving it parameters: - name: per_page in: query schema: type: integer format: int32 default: 30 - name: page in: query schema: type: integer format: int32 default: 0 - name: sort in: query schema: type: string default: created - name: order in: query schema: type: string default: asc requestBody: content: application/json: schema: $ref: '#/components/schemas/SegmentFindWithoutSaveRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "customers": [ { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, "is_active": true, "is_canceled": false, "current_mrr": 1000, "current_plans": [ { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } ] } ] } schema: $ref: '#/components/schemas/SegmentFindWithoutSaveResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/SegmentFindWithoutSave400Response' deprecated: false /v1/attributes: post: tags: - Attribute summary: Set Attributes operationId: Attribute_setProperties description: >- Create or update properties on customers. This will work across all sources. requestBody: content: application/json: schema: $ref: '#/components/schemas/AttributeSetPropertiesRequest' responses: '200': description: '200' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AttributeSetPropertiesResponse' '400': description: '400' content: application/json: examples: Result: value: |- { "error": "Title has already been taken" } schema: $ref: '#/components/schemas/AttributeSetProperties400Response' '409': description: '409' content: text/plain: examples: Result: value: |- { "error": "Title has already been taken", "duplicated_id": 6 } schema: $ref: '#/components/schemas/AttributeSetProperties409Response' deprecated: false /v1/attributes/fields: get: tags: - Attribute summary: List Attribute Fields operationId: Attribute_getFields description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "attribute_fields": [ { "id": 4, "field_type": "date", "title": "Intercom Last Opened", "title_with_type": "[date] Intercom Last Opened" } ] } schema: $ref: '#/components/schemas/AttributeGetFieldsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AttributeGetFields400Response' deprecated: false post: tags: - Attribute summary: Create Attribute Field operationId: Attribute_createField description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/AttributeCreateFieldRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "attribute_field": { "id": 4, "field_type": "date", "title": "Intercom Last Opened", "title_with_type": "[date] Intercom Last Opened" } } schema: $ref: '#/components/schemas/AttributeCreateFieldResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AttributeCreateField400Response' deprecated: false /v1/attributes/fields/{id}: put: tags: - Attribute summary: Update Attribute Field operationId: Attribute_updateField description: '' parameters: - name: id in: path schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/AttributeUpdateFieldRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "attribute_fields": { "id": 4, "field_type": "date", "title": "Intercom Last Opened", "title_with_type": "[date] Intercom Last Opened" } } schema: $ref: '#/components/schemas/AttributeUpdateFieldResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/AttributeUpdateField400Response' deprecated: false /v1/cancellation_insights/events: get: tags: - Event summary: List Events operationId: Event_listCancellationInsightEvents description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "events": [ { "id": "1", "comment": null, "created_at": 1540920251, "subscriptions": [ { "oid": "1", "source_id": "1", "source": "stripe", "canceled_at": 1540920254, "started_at": 1538422033, "processed": true, "active": false, "quantity": 0, "discount": 0, "mrr": 0, "add_on_mrr": 0, "plan": null } ], "reason": { "id": "1", "text": "Too expensive" }, "customer": { "oid": "customer_1", "source_id": "1", "source": "stripe", "created": 1538422031, "email": "email@example.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/example.com", "display_name": "Customer 1", "notes": null, "ltv": 0 } } ], "meta": { "pagination": { "has_more": true, "page": 0, "per_page": 1 } } } schema: $ref: >- #/components/schemas/EventListCancellationInsightEventsResponse '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: >- #/components/schemas/EventListCancellationInsightEvents400Response deprecated: false post: tags: - Event summary: Create Event operationId: Event_createInsightEvent description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/EventCreateInsightEventRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "1", "comment": null, "created_at": 1540920251, "subscriptions": [ { "oid": "1", "source_id": "1", "source": "stripe", "canceled_at": 1540920254, "started_at": 1538422033, "processed": true, "active": false, "quantity": 0, "discount": 0, "mrr": 0, "add_on_mrr": 0, "plan": null } ], "reason": { "id": "1", "text": "Too expensive" }, "customer": { "oid": "customer_1", "source_id": "1", "source": "stripe", "created": 1538422031, "email": "email@example.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/example.com", "display_name": "Customer 1", "notes": null, "ltv": 0 } } } schema: $ref: '#/components/schemas/EventCreateInsightEventResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/EventCreateInsightEvent400Response' deprecated: false /v1/cancellation_insights/events/{id}: get: tags: - Event summary: Show Event operationId: Event_getEventById description: '' parameters: - name: id in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "1", "comment": null, "created_at": 1540920251, "subscriptions": [ { "oid": "1", "source_id": "1", "source": "stripe", "canceled_at": 1540920254, "started_at": 1538422033, "processed": true, "active": false, "quantity": 0, "discount": 0, "mrr": 0, "add_on_mrr": 0, "plan": null } ], "reason": { "id": "1", "text": "Too expensive" }, "customer": { "oid": "customer_1", "source_id": "1", "source": "stripe", "created": 1538422031, "email": "email@example.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/example.com", "display_name": "Customer 1", "notes": null, "ltv": 0 } } } schema: $ref: '#/components/schemas/EventGetEventByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/EventGetEventById400Response' deprecated: false put: tags: - Event summary: Update Event operationId: Event_updateEventById description: '' parameters: - name: id in: path schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/EventUpdateEventByIdRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "event": { "id": "1", "comment": null, "created_at": 1540920251, "subscriptions": [ { "oid": "1", "source_id": "1", "source": "stripe", "canceled_at": 1540920254, "started_at": 1538422033, "processed": true, "active": false, "quantity": 0, "discount": 0, "mrr": 0, "add_on_mrr": 0, "plan": null } ], "reason": { "id": "1", "text": "Too expensive" }, "customer": { "oid": "customer_1", "source_id": "1", "source": "stripe", "created": 1538422031, "email": "email@example.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/example.com", "display_name": "Customer 1", "notes": null, "ltv": 0 } } } schema: $ref: '#/components/schemas/EventUpdateEventByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/EventUpdateEventById400Response' deprecated: false /v1/cancellation_insights/reasons/{id}: get: tags: - Reason summary: Show Reason operationId: Reason_showDetails description: '' parameters: - name: id in: path schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- { "reason": { "id": "172877c7-8b79-4948-a255-e020b80b3821", "text": "Technical issues", "sort_key": 0 } } schema: $ref: '#/components/schemas/ReasonShowDetailsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/ReasonShowDetails400Response' deprecated: false delete: tags: - Reason summary: Delete Reason operationId: Reason_deleteById description: '' parameters: - name: id in: path schema: type: string required: true responses: '202': description: '202' content: application/json: examples: Result: value: '' schema: $ref: '#/components/schemas/ReasonDeleteByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/ReasonDeleteById400Response' deprecated: false put: tags: - Reason summary: Update Reason operationId: Reason_updateReasonById description: '' parameters: - name: id in: path schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ReasonUpdateReasonByIdRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "reason": { "id": "172877c7-8b79-4948-a255-e020b80b3821", "text": "Technical issues", "sort_key": 0 } } schema: $ref: '#/components/schemas/ReasonUpdateReasonByIdResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/ReasonUpdateReasonById400Response' deprecated: false /v1/cancellation_insights/reasons: get: tags: - Reason summary: List Reasons operationId: Reason_listReasons description: '' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "reasons": [ { "id": "172877c7-8b79-4948-a255-e020b80b3821", "text": "Technical issues", "sort_key": 0 }, { "id": "3609459a-6929-491f-b5b1-e02142772703", "text": "Shutting down the company", "sort_key": 2 }, { "id": "190ab9a6-9449-479e-b414-4905bbe3450e", "text": "Missing features I need", "sort_key": 3 }, { "id": "60991a6f-58b8-4ea7-8898-8facde7dab49", "text": "Switching to another product", "sort_key": 4 }, { "id": "5b6392c5-480a-427d-bdad-4dee9ebd1699", "text": "Not sure how to use the data & tools", "sort_key": 5 }, { "id": "9fc2561c-6553-4a57-94a9-d6001820ae59", "text": "Other (please explain below)", "sort_key": 6 }, { "id": "ff9e2598-b6f5-49ee-bbad-9c536b67c55b", "text": "Not using it enough", "sort_key": 6 } ], "meta": { "pagination": { "has_more": false, "page": 0, "per_page": 30 } } } schema: $ref: '#/components/schemas/ReasonListReasonsResponse' '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: '#/components/schemas/ReasonListReasons400Response' deprecated: false post: tags: - CancellationInsight summary: Create Reason operationId: CancellationInsight_createNewReason description: '' requestBody: content: application/json: schema: $ref: '#/components/schemas/CancellationInsightCreateNewReasonRequest' responses: '200': description: '200' content: application/json: examples: Result: value: |- { "reason": { "id": "172877c7-8b79-4948-a255-e020b80b3821", "text": "Technical issues", "sort_key": 0 } } schema: $ref: >- #/components/schemas/CancellationInsightCreateNewReasonResponse '400': description: '400' content: application/json: examples: Result: value: '{}' schema: $ref: >- #/components/schemas/CancellationInsightCreateNewReason400Response deprecated: false components: securitySchemes: sec0: type: apiKey in: header name: Authorization x-bearer-format: bearer x-default: APIKEY schemas: SourceCreatePlanRequest: type: object required: - oid - name - currency - amount - interval - interval_count properties: oid: description: Your unique ID for the plan type: string name: description: >- Your internal name for this plan. This will be displayed in the Plan Breakout section type: string currency: description: 'The ISO code of the currency of this plan. E.G: usd' type: string amount: description: How much is this plan? (In cents) type: integer format: int32 interval: description: day, month or year type: string interval_count: type: integer format: int32 trial_duration: description: >- The duration of this trial. This is to be used in conjunction with trial_duration_unit type: integer default: 0 format: int32 trial_duration_unit: description: This is to be used in conjunction with trial_duration type: string default: day SourceUpdatePlanRequest: type: object required: - name properties: name: description: The new name of this plan type: string SourceCreateCustomerRecordRequest: type: object required: - oid properties: name: type: string notes: description: >- Your own notes for this customer. These will be displayed in the profile type: string email: description: >- An email address for this customer. This is used to lookup extra profile information type: string oid: description: Your unique ID for the customer type: string created: description: A unix timestamp of when this customer was created. Defaults to now. type: string default: NOW format: date-time SourceUpdateCustomerInformationRequest: type: object properties: name: type: string notes: type: string created: description: Unix timestamp of when this customer was created type: string format: date-time email: description: Email for this customer type: string SourceCreateSubscriptionRequest: type: object required: - oid - started_at - plan_oid - customer_oid properties: oid: description: Your unique ID for the subscription type: string started_at: description: A unix timestamp of when this subscription started type: string format: date-time canceled_at: description: >- 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. type: string format: date-time plan_oid: description: Your unique ID for the plan type: string customer_oid: description: Your unique ID for the customer type: string addons: type: array items: properties: oid: type: string amount: type: integer format: int32 quantity: type: integer format: int32 required: - oid - amount - quantity type: object quantity: type: integer default: 1 format: int32 discount: description: Integer value (in the same currency as the plan) type: integer format: int32 SourceUpdateSubscriptionRequest: type: object required: - plan_oid properties: plan_oid: description: Your unique ID for the plan type: string occurred_at: description: A unix timestamp of when this change occurred. Defaults to now type: string default: NOW format: date-time addons: description: In cents. The OID can be anything you want. type: array items: properties: oid: type: string amount: type: integer format: int32 quantity: type: integer format: int32 required: - oid - amount - quantity type: object quantity: type: integer default: 1 format: int32 discount: description: Integer value (in the same currency as the plan) type: integer format: int32 SourceCancelSubscriptionRequest: type: object required: - canceled_at properties: canceled_at: description: >- A unix timestamp of when this subscription was, or should be canceled. type: string format: date-time AnnotationCreateNewRequest: type: object required: - metric - annotation - date - global - user_id properties: metric: description: Which metric is this for? type: string annotation: description: The annotation text type: string date: description: YYYY-MM-DD type: string format: date global: description: Should this show on all graphs? type: boolean user_id: description: Who added this annotation? type: string GoalCreateNewGoalRequest: type: object required: - metric - start_amount - end_amount - start_date - end_date - name properties: metric: type: string start_amount: description: In cents type: integer format: int32 end_amount: description: In cents type: integer format: int32 start_date: type: string format: date end_date: type: string format: date name: description: The goal name type: string SourceCreateChargeOneOffRequest: type: object required: - oid - amount - currency - customer_oid properties: oid: description: Your unique reference for this charge type: string amount: description: The charge amount (in cents) type: integer format: int32 currency: description: 'The ISO code of the currency of this plan. E.G: usd' type: string customer_oid: description: Your unique ID for the customer type: string created: description: Unix timestamp of when this was created type: string default: NOW format: date-time status: description: The status of this charge. Can be paid or failed. Defaults to paid. type: string default: paid fee: type: integer default: 0 format: int32 subscription_oid: description: >- This can only be supplied when Subscription Auto Charging is disabled. Please contact support if you want to handle your subscription charges manually. type: string SourceCreateOneOffRefundRequest: type: object required: - oid - amount - currency - customer_oid - charge_oid properties: oid: description: Your unique reference for this charge type: string amount: description: The charge amount (in cents) type: integer format: int32 currency: description: 'The ISO code of the currency of this plan. E.G: usd' type: string customer_oid: description: Your unique ID for the customer type: string charge_oid: description: Which charge do you want to refund? This must be an API charge. type: string created: description: Unix timestamp of when this was created type: string default: NOW format: date-time SegmentCreateRequestRequest: type: object required: - query properties: query: type: array items: properties: category: type: string field: type: string value: description: Can be an string, integer, or boolean type: string method: type: string required: - category - field - value - method type: object name: type: string SegmentUpdateByIdRequest: type: object properties: name: type: string query: type: array items: properties: category: type: string field: type: string value: description: Can be an string, integer, or boolean type: string method: type: string required: - category - field - value - method type: object SegmentFindWithoutSaveRequest: type: object required: - query properties: query: type: array items: properties: category: type: string field: type: string value: description: Can be an string, integer, or boolean type: string method: type: string required: - category - field - value - method type: object AttributeSetPropertiesRequest: type: object properties: attributes: type: array items: properties: customer_oid: description: Supply this, or customer_email type: string customer_email: description: Supply this, or customer_oid type: string field_id: type: string value: description: For an array field, use a comma seperated string type: string required: - customer_oid - customer_email - field_id - value type: object AttributeCreateFieldRequest: type: object required: - field_type - title properties: title: type: string field_type: description: string, integer, date, boolean, array type: string AttributeUpdateFieldRequest: type: object required: - title properties: title: type: string EventCreateInsightEventRequest: type: object required: - reason_id properties: reason_id: type: string comment: type: string customer_oid: type: string subscription_oids: type: array items: type: string EventUpdateEventByIdRequest: type: object properties: reason_id: type: string comment: type: string ReasonUpdateReasonByIdRequest: type: object required: - text properties: text: type: string sort_key: type: integer format: int32 CancellationInsightCreateNewReasonRequest: type: object required: - text properties: text: type: string sort_key: type: integer format: int32 AccountGetDetailsResponse: type: string example: |- { "account": { "id": 'account_id', "default_currency": { "id": "usd", "alternate_symbols": [ "US$" ], "decimal_mark": ".", "disambiguate_symbol": "US$", "html_entity": "$", "iso_code": "USD", "iso_numeric": "840", "name": "United States Dollar", "priority": 1, "smallest_denomination": 1, "subunit": "Cent", "subunit_to_unit": 100, "symbol": "$", "symbol_first": true, "thousands_separator": "," }, "company": "Example Company", "created_at": 123456789 } } AccountGetDetails400Response: type: object properties: {} SourceListSourcesResponse: type: object properties: sources: type: array items: type: object properties: id: type: string example: source_id provider: type: string example: stripe provider_id: type: string example: SourceListSources400Response: type: object properties: {} SourceGetPlansListResponse: type: object properties: plans: type: array items: type: object properties: oid: type: string example: plan_1 source_id: type: string example: '123' source: type: string example: baremetrics name: type: string example: Plan 1 interval: type: string example: year interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: {} active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 450000 default: 0 SourceGetPlansList400Response: type: object properties: {} SourceCreatePlanResponse: type: object properties: plan: type: object properties: oid: type: string example: plan_2 source_id: type: string example: '123' source: type: string example: baremetrics name: type: string example: Plan 2 interval: type: string example: year interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: {} active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 450000 default: 0 SourceCreatePlan400Response: type: object properties: error: type: string example: Error message here SourceDeletePlanResponse: type: object properties: {} SourceDeletePlan400Response: type: object properties: {} SourceGetPlanResponse: type: object properties: plan: type: object properties: oid: type: string example: plan_2 source_id: type: string example: '123' source: type: string example: baremetrics name: type: string example: Plan 2 interval: type: string example: year interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: {} active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 450000 default: 0 SourceGetPlan400Response: type: object properties: {} SourceUpdatePlanResponse: type: object properties: plan: type: object properties: oid: type: string example: plan_2 source_id: type: string example: '123' source: type: string example: baremetrics name: type: string example: Plan 2 interval: type: string example: year interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: {} active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 450000 default: 0 SourceUpdatePlan400Response: type: object properties: {} SourceGetCustomerListResponse: type: object properties: customers: type: array items: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_1 source: type: string example: stripe created: type: integer example: 1492605754 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: type: string example: Here are some notes ltv: type: integer example: 50000 default: 0 is_active: type: boolean example: true default: true is_canceled: type: boolean example: false default: true current_mrr: type: integer example: 1000 default: 0 current_plans: type: array items: type: object properties: oid: type: string example: plan_1 source_id: type: string example: source_1 source: type: string example: stripe name: type: string example: Plan 1 interval: type: string example: month interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: type: integer example: 1492605754 default: 0 active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 1000 default: 0 SourceGetCustomerList400Response: type: object properties: {} SourceCreateCustomerRecordResponse: type: object properties: customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_1 source: type: string example: stripe created: type: integer example: 1492605754 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: type: string example: Here are some notes ltv: type: integer example: 0 default: 0 is_active: type: boolean example: false default: true is_canceled: type: boolean example: false default: true current_mrr: type: integer example: 0 default: 0 current_plans: type: array items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. SourceCreateCustomerRecord400Response: type: object properties: error: type: string example: Error message here SourceDeleteCustomerResponse: type: object properties: {} SourceDeleteCustomer400Response: type: object properties: {} SourceGetCustomerDetailsResponse: type: object properties: customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_1 source: type: string example: stripe created: type: integer example: 1492605754 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: type: string example: Here are some notes ltv: type: integer example: 50000 default: 0 is_active: type: boolean example: true default: true is_canceled: type: boolean example: false default: true current_mrr: type: integer example: 1000 default: 0 current_plans: type: array items: type: object properties: oid: type: string example: plan_1 source_id: type: string example: source_1 source: type: string example: stripe name: type: string example: Plan 1 interval: type: string example: month interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: type: integer example: 1492605754 default: 0 active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 1000 default: 0 SourceGetCustomerDetails400Response: type: object properties: {} SourceListCustomerEventsResponse: type: object properties: events: type: array items: type: object properties: id: type: string example: id_1 event_type: type: string example: new_customer source: type: string example: baremetrics source_id: type: string example: baremetrics_1 timestamp: type: integer example: 1475452800 default: 0 SourceListCustomerEvents400Response: type: object properties: {} SourceUpdateCustomerInformationResponse: type: object properties: customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_1 source: type: string example: stripe created: type: integer example: 1492605754 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: type: string example: Here are some notes ltv: type: integer example: 50000 default: 0 is_active: type: boolean example: true default: true is_canceled: type: boolean example: false default: true current_mrr: type: integer example: 1000 default: 0 current_plans: type: array items: type: object properties: oid: type: string example: plan_1 source_id: type: string example: source_1 source: type: string example: stripe name: type: string example: Plan 1 interval: type: string example: month interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: type: integer example: 1492605754 default: 0 active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 1000 default: 0 SourceUpdateCustomerInformation400Response: type: object properties: error: type: string example: Error message here SourceGetSubscriptionsResponse: type: string example: |- { "subscriptions": [ { "oid": "subscription_1", "source_id": "source_1", "source": "stripe", "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "canceled_at": null, "started_at": 1492605754, "processed": true, "active": true, "quantity": 1, "discount": 0, "plan": { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } } ] } SourceGetSubscriptions400Response: type: object properties: {} SourceCreateSubscriptionResponse: type: object properties: event: type: object properties: info: type: object properties: oid: type: string example: subscription_51 started_at: type: integer example: 1474381618 default: 0 plan_oid: type: string example: '1476719008009' customer_oid: type: string example: '1476719006346' canceled_at: {} quantity: type: integer example: 1 default: 0 addons: type: array items: type: object properties: oid: type: string example: addon_1 amount: type: integer example: 100 default: 0 quantity: type: integer example: 1 default: 0 id: type: string example: 48X1ZZHtRaBtfN type: type: string example: subscription.created occurred_at: type: integer example: 1474381618 default: 0 received_at: type: integer example: 1480421211 default: 0 SourceCreateSubscription400Response: type: object properties: error: type: string example: Error message here SourceRemoveSubscriptionResponse: type: object properties: {} SourceRemoveSubscription400Response: type: object properties: {} SourceGetSubscriptionResponse: type: string example: |- { "subscription": { "oid": "subscription_1", "source_id": "source_1", "source": "stripe", "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "canceled_at": null, "started_at": 1492605754, "processed": true, "active": true, "quantity": 1, "discount": 0, "plan": { "oid": "plan_1", "source_id": "source_1", "source": "stripe", "name": "Plan 1", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1492605754, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 1000 } ] } } } SourceGetSubscription400Response: type: object properties: {} SourceUpdateSubscriptionResponse: type: object properties: event: type: object properties: info: type: object properties: plan_oid: type: string example: '1476719008009' occurred_at: type: integer example: 1480421495 default: 0 quantity: type: integer example: 1 default: 0 addons: type: array items: type: object properties: oid: type: string example: addon_1 amount: type: integer example: 100 default: 0 quantity: type: integer example: 1 default: 0 id: type: string example: 48X4cZ3T25MKkL type: type: string example: subscription.updated occurred_at: type: integer example: 1480421495 default: 0 received_at: type: integer example: 1480421495 default: 0 SourceUpdateSubscription400Response: type: object properties: error: type: string example: Error message here SourceCancelSubscriptionResponse: type: object properties: event: type: object properties: info: type: object properties: canceled_at: type: integer example: 1480421362 default: 0 addons: type: array items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. id: type: string example: 48X3C1W4w5vCbx type: type: string example: subscription.canceled occurred_at: type: integer example: 1480421362 default: 0 received_at: type: integer example: 1480421362 default: 0 SourceCancelSubscription400Response: type: object properties: error: type: string example: Error message here AnnotationListResponse: type: object properties: annotations: type: array items: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr annotation: type: string example: New Feature 1 date: type: string example: '2015-03-31' global: type: boolean example: true default: true user: type: object properties: id: type: string example: user_id email: type: string example: user@baremetrics.com admin: type: boolean example: true default: true name: type: string example: User Name AnnotationList400Response: type: object properties: {} AnnotationCreateNewResponse: type: object properties: annotation: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr annotation: type: string example: New Feature 1 date: type: string example: '2015-03-31' global: type: boolean example: true default: true user: type: object properties: id: type: string example: user_id email: type: string example: user@baremetrics.com admin: type: boolean example: true default: true name: type: string example: User Name AnnotationCreateNew400Response: type: object properties: {} AnnotationRemoveByIdResponse: type: object properties: {} AnnotationRemoveById400Response: type: object properties: {} AnnotationGetDetailsResponse: type: object properties: annotation: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr annotation: type: string example: New Feature 1 date: type: string example: '2015-03-31' global: type: boolean example: true default: true user: type: object properties: id: type: string example: user_id email: type: string example: user@baremetrics.com admin: type: boolean example: true default: true name: type: string example: User Name AnnotationGetDetails400Response: type: object properties: {} GoalGetListResponse: type: object properties: goals: type: array items: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr end_amount: type: integer example: 2000 default: 0 start_amount: type: integer example: 1000 default: 0 end_date: type: string example: '2016-06-30' start_date: type: string example: '2016-01-02' name: type: string example: MRR Growth GoalGetList400Response: type: object properties: {} GoalCreateNewGoalResponse: type: object properties: goal: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr end_amount: type: integer example: 2000 default: 0 start_amount: type: integer example: 1000 default: 0 end_date: type: string example: '2016-06-30' start_date: type: string example: '2016-01-02' name: type: string example: Goal 1 GoalCreateNewGoal400Response: type: object properties: {} GoalRemoveResponse: type: object properties: {} GoalRemove400Response: type: object properties: {} GoalGetByIdResponse: type: object properties: goal: type: object properties: id: type: string example: our_unique_id metric: type: string example: mrr end_amount: type: integer example: 2000 default: 0 start_amount: type: integer example: 1000 default: 0 end_date: type: string example: '2016-06-30' start_date: type: string example: '2016-01-02' name: type: string example: MRR Growth GoalGetById400Response: type: object properties: {} UserListUsersResponse: type: object properties: users: type: array items: type: object properties: id: type: string example: our_unique_id email: type: string example: user@baremetrics.com admin: type: boolean example: true default: true name: type: string example: User Name UserListUsers400Response: type: object properties: {} UserGetUserByIdResponse: type: object properties: user: type: object properties: id: type: string example: our_unique_id email: type: string example: user@baremetrics.com admin: type: boolean example: true default: true name: type: string example: User Name UserGetUserById400Response: type: object properties: {} SourceGetChargeListResponse: type: string example: |- { "charges": [ { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } ] } SourceGetChargeList400Response: type: object properties: {} SourceCreateChargeOneOffResponse: type: string example: |- { "charge": { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } } SourceCreateChargeOneOff400Response: type: object properties: {} SourceRemoveOneOffChargeResponse: type: object properties: {} SourceRemoveOneOffCharge400Response: type: object properties: {} SourceGetChargeDetailsResponse: type: string example: |- { "charge": { "oid": "your_unique_id", "source_id": "source_id", "source": "baremetrics", "status": "paid", "created": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "subscription": null, "amount": 450000, "currency": "USD", "original_amount": 450000, "fee": 500, "original_fee": 500 } } SourceGetChargeDetails400Response: type: object properties: {} SourceGetRefundsResponse: type: object properties: refunds: type: array items: type: object properties: oid: type: string example: your_unique_id source_id: type: string example: source_id source: type: string example: stripe charge_oid: type: string example: charge_oid created: type: integer example: 1510789071 default: 0 customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_id source: type: string example: stripe created: type: integer example: 1445122336 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 116148 default: 0 amount: type: integer example: 8700 default: 0 SourceGetRefunds400Response: type: object properties: {} SourceCreateOneOffRefundResponse: type: string example: "{\n \"refund\": {\n \"oid\": \"your_unique_id\",\n \"source_id\": \"source_id\",\n \"source\": \"baremetrics\",\n \"created\": 1475452800,\n \"customer\": {\n \"oid\": \"customer_1\",\n \"source_id\": \"source_1\",\n \"source\": \"stripe\",\n \"created\": 1492605754,\n \"email\": \"customer_1@baremetrics.com\",\n \"name\": \"Customer 1\",\n \"display_image\": \"https://logo.clearbit.com/baremetrics.com\",\n \"display_name\": \"Customer 1\",\n \"notes\": \"Here are some notes\",\n \"ltv\": 50000,\n },\n \"charge\": {\n \t\"oid\": \"123\",\n \"source_id\": \"source_id\",\n \"source\": \"baremetrics\",\n \"status\": \"paid\",\n \"created\": 1475452800,\n \"currency\": \"usd\",\n \"amount\": 450000,\n \"original_amount\": 450000\n },\n \"amount\": 450000\n }\n}" SourceCreateOneOffRefund400Response: type: object properties: {} SourceRemoveOneOffRefundResponse: type: object properties: {} SourceRemoveOneOffRefund400Response: type: object properties: {} SourceGetRefundDetailsResponse: type: object properties: oid: type: string example: your_unique_id source_id: type: string example: source_id source: type: string example: stripe charge_oid: type: string example: charge_oid created: type: integer example: 1510789071 default: 0 customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_id source: type: string example: stripe created: type: integer example: 1445122336 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 116148 default: 0 amount: type: integer example: 8700 default: 0 SourceGetRefundDetails400Response: type: object properties: {} SourceGetEventsResponse: type: string example: |- { "events": [ { "id": "id_1", "event_type": "charge", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, } } ], "meta": { "pagination": { "has_more": false, "page": 0, "per_page": 30 } } } SourceGetEvents400Response: type: object properties: {} SourceGetEventByIdResponse: type: string example: |- { "event": { "id": "id_1", "event_type": "charge", "source": "baremetrics", "source_id": "baremetrics_1", "timestamp": 1475452800, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, } } } SourceGetEventById400Response: type: object properties: {} MetricShowSummaryResponse: type: object properties: metrics: type: array items: type: object properties: human_date: type: string example: '2016-11-26' date: type: integer example: 1480118400 default: 0 active_customers: type: integer example: 642 default: 0 active_subscriptions: type: integer example: 642 default: 0 add_on_mrr: type: integer example: 0 default: 0 arpu: type: integer example: 9383 default: 0 arr: type: integer example: 72289044 default: 0 cancellations: type: integer example: 0 default: 0 coupons: type: integer example: 43300 default: 0 downgrades: type: integer example: 0 default: 0 failed_charges: type: integer example: 1 default: 0 fees: type: integer example: 7373 default: 0 ltv: type: integer example: 159039 default: 0 mrr: type: integer example: 6024087 default: 0 net_revenue: type: integer example: 233498 default: 0 new_customers: type: integer example: 0 default: 0 other_revenue: type: integer example: 0 default: 0 reactivated_customers: type: integer example: 0 default: 0 refunds: type: integer example: 0 default: 0 revenue_churn: type: integer example: 543 default: 0 trial_conversions: type: integer example: 0 default: 0 upgrades: type: integer example: 1 default: 0 user_churn: type: integer example: 590 default: 0 MetricShowSummary400Response: type: object properties: {} MetricShowDetailsResponse: type: object properties: metrics: type: array items: type: object properties: date: type: integer example: 1480118400 default: 0 human_date: type: string example: '2016-11-26' value: type: integer example: 6024087 default: 0 notes: {} previous: type: object properties: date: type: integer example: 1477526400 default: 0 human_date: type: string example: '2016-10-27' value: type: integer example: 5941979 default: 0 percent: type: number example: 1.4 default: 0 notes: {} MetricShowDetails400Response: type: object properties: {} MetricListCustomersResponse: type: string example: |- { "metrics": [ { "date": 1475107200, "human_date": "2016-09-29", "value": 2, "customers": [ { "mrr": 5000, "customer": { "oid": "customer_1", "source_id": "source_1", "source": "stripe", "created": 1492605754, "email": "customer_1@baremetrics.com", "name": "Customer 1", "display_image": "https://logo.clearbit.com/baremetrics.com", "display_name": "Customer 1", "notes": "Here are some notes", "ltv": 50000, }, "current_plan": { "oid": "mrr_50_mo", "source_id": "stripe_1", "source": "stripe", "name": "Startup $50 - MRR - Monthly", "interval": "month", "interval_count": 1, "trial_duration": null, "trial_duration_unit": null, "created": 1450216295, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 5000 } ] }, "previous_plan": { "oid": "free", "source_id": "stripe_1", "source": "stripe", "name": "Free", "interval": "month", "interval_count": 1, "trial_duration": 14, "trial_duration_unit": "day", "created": 1438620623, "active": true, "setup_fees": 0, "amounts": [ { "currency": "USD", "symbol": "$", "symbol_right": false, "amount": 0 } ] } } ] } ] } MetricListCustomers400Response: type: object properties: {} MetricShowPlanBreakoutResponse: type: object properties: metrics: type: array items: type: object properties: date: type: integer example: 1477872000 default: 0 human_date: type: string example: '2016-10-31' value: type: integer example: 52664 default: 0 plan: type: object properties: oid: type: string example: startup_yearly_790 source_id: type: string example: 3ULWIj59pU016O source: type: string example: stripe name: type: string example: Startup (Yearly) interval: type: string example: year interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: type: integer example: 1394818080 default: 0 active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 79000 default: 0 MetricShowPlanBreakout400Response: type: object properties: {} MetricShowCohortsResponse: type: array items: type: object properties: end: type: string example: '2017-08-31' mrr: type: integer example: 569521 default: 0 begin: type: string example: '2017-08-01' cells: type: array items: type: object properties: end: type: string example: '2017-08-31' user: type: object properties: total: type: integer example: 1563 default: 0 absolute: type: integer example: 1533 default: 0 percentage: type: number example: 0.98 default: 0 begin: type: string example: '2017-08-01' revenue: type: object properties: total: type: integer example: 569521 default: 0 absolute: type: integer example: 554122 default: 0 percentage: type: number example: 0.97 default: 0 absolute_formatted: type: string example: $5,541 total_formatted: type: string example: $569,521 customers: type: integer example: 1563 default: 0 mrr_formatted: type: string example: $5,695 MetricShowCohorts400Response: type: object properties: {} SegmentGetFieldsResponse: type: object properties: baremetrics: type: array items: type: object properties: title: type: string example: OID field: type: string example: oid type: type: string example: string methods: type: array items: type: string example: equals clearbit: type: array items: type: object properties: title: type: string example: Clearbit Company Country field: type: string example: company.geo.country type: type: string example: string methods: type: array items: type: string example: equals SegmentGetFields400Response: type: object properties: {} SegmentListSegmentsResponse: type: object properties: segments: type: array items: type: object properties: id: type: string example: '1' name: type: string example: Active Customers query: type: array items: type: object properties: category: type: string example: baremetrics field: type: string example: subscriptions.is_active method: type: string example: 'true' value: type: string example: 'true' created_at: type: integer example: 1492523687 default: 0 updated_at: type: integer example: 1492614366 default: 0 SegmentListSegments400Response: type: object properties: {} SegmentCreateRequestResponse: type: object properties: segment: type: object properties: id: type: string example: '1' name: type: string example: Active Customers query: type: array items: type: object properties: category: type: string example: baremetrics field: type: string example: subscriptions.is_active method: type: string example: boolean value: type: string example: 'true' created_at: type: integer example: 1492523687 default: 0 updated_at: type: integer example: 1492614366 default: 0 SegmentCreateRequest400Response: type: object properties: {} SegmentRemoveByIdResponse: type: object properties: {} SegmentRemoveById400Response: type: object properties: {} SegmentShowDetailsResponse: type: object properties: segment: type: object properties: id: type: string example: '1' name: type: string example: Active Customers query: type: array items: type: object properties: category: type: string example: baremetrics field: type: string example: subscriptions.is_active method: type: string example: 'true' value: type: string example: 'true' created_at: type: integer example: 1492523687 default: 0 updated_at: type: integer example: 1492614366 default: 0 SegmentShowDetails400Response: type: object properties: {} SegmentUpdateByIdResponse: type: object properties: segment: type: object properties: id: type: string example: '1' name: type: string example: Active Customers query: type: array items: type: object properties: category: type: string example: baremetrics field: type: string example: subscriptions.is_active method: type: string example: 'true' value: type: string example: 'true' created_at: type: integer example: 1492523687 default: 0 updated_at: type: integer example: 1492614366 default: 0 SegmentUpdateById400Response: type: object properties: {} SegmentFindWithoutSaveResponse: type: object properties: customers: type: array items: type: object properties: oid: type: string example: customer_1 source_id: type: string example: source_1 source: type: string example: stripe created: type: integer example: 1492605754 default: 0 email: type: string example: customer_1@baremetrics.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/baremetrics.com display_name: type: string example: Customer 1 notes: type: string example: Here are some notes ltv: type: integer example: 50000 default: 0 is_active: type: boolean example: true default: true is_canceled: type: boolean example: false default: true current_mrr: type: integer example: 1000 default: 0 current_plans: type: array items: type: object properties: oid: type: string example: plan_1 source_id: type: string example: source_1 source: type: string example: stripe name: type: string example: Plan 1 interval: type: string example: month interval_count: type: integer example: 1 default: 0 trial_duration: {} trial_duration_unit: {} created: type: integer example: 1492605754 default: 0 active: type: boolean example: true default: true setup_fees: type: integer example: 0 default: 0 amounts: type: array items: type: object properties: currency: type: string example: USD symbol: type: string example: $ symbol_right: type: boolean example: false default: true amount: type: integer example: 1000 default: 0 SegmentFindWithoutSave400Response: type: object properties: {} AttributeSetPropertiesResponse: type: object properties: {} AttributeSetProperties400Response: type: object properties: error: type: string example: Title has already been taken AttributeSetProperties409Response: type: object properties: error: type: string example: Title has already been taken duplicated_id: type: integer example: 6 default: 0 AttributeGetFieldsResponse: type: object properties: attribute_fields: type: array items: type: object properties: title: type: string example: Intercom Last Opened id: type: integer example: 4 default: 0 field_type: type: string example: date title_with_type: type: string example: '[date] Intercom Last Opened' AttributeGetFields400Response: type: object properties: {} AttributeCreateFieldResponse: type: object properties: attribute_field: type: object properties: title: type: string example: Intercom Last Opened id: type: integer example: 4 default: 0 field_type: type: string example: date title_with_type: type: string example: '[date] Intercom Last Opened' AttributeCreateField400Response: type: object properties: {} AttributeUpdateFieldResponse: type: object properties: attribute_fields: type: object properties: title: type: string example: Intercom Last Opened id: type: integer example: 4 default: 0 field_type: type: string example: date title_with_type: type: string example: '[date] Intercom Last Opened' AttributeUpdateField400Response: type: object properties: {} EventListCancellationInsightEventsResponse: type: object properties: events: type: array items: type: object properties: id: type: string example: '1' comment: {} created_at: type: integer example: 1540920251 default: 0 subscriptions: type: array items: type: object properties: oid: type: string example: '1' source_id: type: string example: '1' source: type: string example: stripe canceled_at: type: integer example: 1540920254 default: 0 started_at: type: integer example: 1538422033 default: 0 processed: type: boolean example: true default: true active: type: boolean example: false default: true quantity: type: integer example: 0 default: 0 discount: type: integer example: 0 default: 0 mrr: type: integer example: 0 default: 0 add_on_mrr: type: integer example: 0 default: 0 plan: {} reason: type: object properties: id: type: string example: '1' text: type: string example: Too expensive customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: '1' source: type: string example: stripe created: type: integer example: 1538422031 default: 0 email: type: string example: email@example.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/example.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 0 default: 0 meta: type: object properties: pagination: type: object properties: has_more: type: boolean example: true default: true page: type: integer example: 0 default: 0 per_page: type: integer example: 1 default: 0 EventListCancellationInsightEvents400Response: type: object properties: {} EventCreateInsightEventResponse: type: object properties: event: type: object properties: id: type: string example: '1' comment: {} created_at: type: integer example: 1540920251 default: 0 subscriptions: type: array items: type: object properties: oid: type: string example: '1' source_id: type: string example: '1' source: type: string example: stripe canceled_at: type: integer example: 1540920254 default: 0 started_at: type: integer example: 1538422033 default: 0 processed: type: boolean example: true default: true active: type: boolean example: false default: true quantity: type: integer example: 0 default: 0 discount: type: integer example: 0 default: 0 mrr: type: integer example: 0 default: 0 add_on_mrr: type: integer example: 0 default: 0 plan: {} reason: type: object properties: id: type: string example: '1' text: type: string example: Too expensive customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: '1' source: type: string example: stripe created: type: integer example: 1538422031 default: 0 email: type: string example: email@example.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/example.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 0 default: 0 EventCreateInsightEvent400Response: type: object properties: {} EventGetEventByIdResponse: type: object properties: event: type: object properties: id: type: string example: '1' comment: {} created_at: type: integer example: 1540920251 default: 0 subscriptions: type: array items: type: object properties: oid: type: string example: '1' source_id: type: string example: '1' source: type: string example: stripe canceled_at: type: integer example: 1540920254 default: 0 started_at: type: integer example: 1538422033 default: 0 processed: type: boolean example: true default: true active: type: boolean example: false default: true quantity: type: integer example: 0 default: 0 discount: type: integer example: 0 default: 0 mrr: type: integer example: 0 default: 0 add_on_mrr: type: integer example: 0 default: 0 plan: {} reason: type: object properties: id: type: string example: '1' text: type: string example: Too expensive customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: '1' source: type: string example: stripe created: type: integer example: 1538422031 default: 0 email: type: string example: email@example.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/example.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 0 default: 0 EventGetEventById400Response: type: object properties: {} EventUpdateEventByIdResponse: type: object properties: event: type: object properties: id: type: string example: '1' comment: {} created_at: type: integer example: 1540920251 default: 0 subscriptions: type: array items: type: object properties: oid: type: string example: '1' source_id: type: string example: '1' source: type: string example: stripe canceled_at: type: integer example: 1540920254 default: 0 started_at: type: integer example: 1538422033 default: 0 processed: type: boolean example: true default: true active: type: boolean example: false default: true quantity: type: integer example: 0 default: 0 discount: type: integer example: 0 default: 0 mrr: type: integer example: 0 default: 0 add_on_mrr: type: integer example: 0 default: 0 plan: {} reason: type: object properties: id: type: string example: '1' text: type: string example: Too expensive customer: type: object properties: oid: type: string example: customer_1 source_id: type: string example: '1' source: type: string example: stripe created: type: integer example: 1538422031 default: 0 email: type: string example: email@example.com name: type: string example: Customer 1 display_image: type: string example: https://logo.clearbit.com/example.com display_name: type: string example: Customer 1 notes: {} ltv: type: integer example: 0 default: 0 EventUpdateEventById400Response: type: object properties: {} ReasonDeleteByIdResponse: type: string example: '' ReasonDeleteById400Response: type: object properties: {} ReasonShowDetailsResponse: type: object properties: reason: type: object properties: id: type: string example: 172877c7-8b79-4948-a255-e020b80b3821 text: type: string example: Technical issues sort_key: type: integer example: 0 default: 0 ReasonShowDetails400Response: type: object properties: {} ReasonUpdateReasonByIdResponse: type: object properties: reason: type: object properties: id: type: string example: 172877c7-8b79-4948-a255-e020b80b3821 text: type: string example: Technical issues sort_key: type: integer example: 0 default: 0 ReasonUpdateReasonById400Response: type: object properties: {} ReasonListReasonsResponse: type: object properties: reasons: type: array items: type: object properties: id: type: string example: 172877c7-8b79-4948-a255-e020b80b3821 text: type: string example: Technical issues sort_key: type: integer example: 0 default: 0 meta: type: object properties: pagination: type: object properties: has_more: type: boolean example: false default: true page: type: integer example: 0 default: 0 per_page: type: integer example: 30 default: 0 ReasonListReasons400Response: type: object properties: {} CancellationInsightCreateNewReasonResponse: type: object properties: reason: type: object properties: id: type: string example: 172877c7-8b79-4948-a255-e020b80b3821 text: type: string example: Technical issues sort_key: type: integer example: 0 default: 0 CancellationInsightCreateNewReason400Response: type: object properties: {} security: - sec0: [] x-readme: headers: [] explorer-enabled: true proxy-enabled: false x-readme-fauxas: true _id: 58b53c0d1065f9c438aa1efb:5ebe83e5184849006ff9b8e2