v1

latestOpenAPI 3.0.3Apache 2.02026-08-062991191002.1 KB
Subscription

Creates a Subscription resource.

Creates a Subscription resource.

post/subscriptions

Request body

idstring

Unique identifier for this subscription note that no particular pattern in this field is guaranteed, only that this field is unique e.g. "quickbooks-726"

integrationstring

The key of the integration source e.g. "quickbooks", or "xero"

srcIdstring

The unique identifier of the source 3rd party integration e.g. "GH2JK-67283H-YW82KHX-2883KK-KS78S"

statusboolean nullable

Status of the subscription e.g. expired

balanceinteger nullable

Amount in balance for the subscription in cents e.g. 500045

totalRevenueinteger nullable

Total revenue from this specific subscription in cents e.g. 387687

productPriceinteger nullable

Price of the subscribed product in cents e.g. 4999

currencyCodestring nullable

Currency code e.g. "EUR"

currentPeriodStartstring nullable

Current period start datetime e.g. "2014-11-18" e.g. "1655792028"

currentPeriodEndstring nullable

Current period end datetime e.g. "2014-11-18" e.g. "1653977628"

nextPeriodStartstring nullable

Date next period starts e.g. "2014-11-18" e.g. "1653977628"

cancelAtEndOfPeriodboolean nullable

Boolean on if plan is canelled at the end of the current period

signupIdstring nullable

Signup id e.g. "user123"

signupRevenuestring nullable

Signup revenue e.g. "250"

couponCodestring nullable

Coupon code e.g. "PROMOCODE"

customerIdstring nullable

Customer id e.g. "123"

productIdstring nullable

Id for the subscribed product e.g. "321"

creditCardIdstring nullable

Credit card id e.g. "4250"

createdstring date-time nullable

The date and time the subscription is first created e.g. "2013-11-18T02:17:40.080Z"

modifiedstring date-time nullable

Date entry was last modified e.g. "2013-11-18T02:17:40.080Z"

customerFirstNamestring nullable

Customer first name e.g. "Jane"

customerLastNamestring nullable

Customer last name e.g. "Doe"

startDatestring date-time nullable

Start datetime of the subscription e.g. "2013-11-18T02:17:40.080Z"

endDatestring date-time nullable

End datetime of the subscription e.g. "2015-11-18T02:17:40.080Z"

planNamestring nullable

Name of the plan of which this subscription is an instance e.g. "Basic Plan"

activatedstring nullable

Indicates when the subscription was activated e.g. "Jan 23 2023"

remainingIntervalsinteger nullable

Number of remaining subscription intervals e.g. 12

monthlyRevenueinteger nullable

Revenue per month in cents e.g. 500000

netMonthlyRevenueinteger nullable

Monthly revenue after taxes e.g. 300000

contractStartDatestring date-time nullable

Date contract starts * e.g. "2013-11-18T02:17:40.080Z"

expiredTimestampstring date-time nullable

When the current subscription expires e.g. "2013-11-18T02:17:40.080Z"

planIntervalstring nullable

Length of each subscription plan e.g. "Monthly"

numOfIntervalsinteger nullable

Number of subscription intervals e.g. 12

Example request

{
  "id": "quickbooks-726",
  "integration": "quickbooks",
  "srcId": "GH2JK-67283H-YW82KHX-2883KK-KS78S",
  "status": true,
  "balance": 500045,
  "totalRevenue": 387687,
  "productPrice": 4999,
  "currencyCode": "EUR",
  "currentPeriodStart": "1655792028",
  "currentPeriodEnd": "1653977628",
  "nextPeriodStart": "1653977628",
  "cancelAtEndOfPeriod": true,
  "signupId": "user123",
  "signupRevenue": "250",
  "couponCode": "PROMOCODE",
  "customerId": "123",
  "productId": "321",
  "creditCardId": "4250",
  "created": "2013-11-18T02:17:40.080Z",
  "modified": "2013-11-18T02:17:40.080Z",
  "customerFirstName": "Jane",
  "customerLastName": "Doe",
  "startDate": "2013-11-18T02:17:40.080Z",
  "endDate": "2015-11-18T02:17:40.080Z",
  "planName": "Basic Plan",
  "activated": "Jan 23 2023",
  "remainingIntervals": 12,
  "monthlyRevenue": 500000,
  "netMonthlyRevenue": 300000,
  "contractStartDate": "2013-11-18T02:17:40.080Z",
  "expiredTimestamp": "2013-11-18T02:17:40.080Z",
  "planInterval": "Monthly",
  "numOfIntervals": 12
}

Response

Subscription resource created

idstring

Unique identifier for this subscription note that no particular pattern in this field is guaranteed, only that this field is unique e.g. "quickbooks-726"

integrationstring

The key of the integration source e.g. "quickbooks", or "xero"

srcIdstring

The unique identifier of the source 3rd party integration e.g. "GH2JK-67283H-YW82KHX-2883KK-KS78S"

statusboolean nullable

Status of the subscription e.g. expired

balanceinteger nullable

Amount in balance for the subscription in cents e.g. 500045

totalRevenueinteger nullable

Total revenue from this specific subscription in cents e.g. 387687

productPriceinteger nullable

Price of the subscribed product in cents e.g. 4999

currencyCodestring nullable

Currency code e.g. "EUR"

currentPeriodStartstring nullable

Current period start datetime e.g. "2014-11-18" e.g. "1655792028"

currentPeriodEndstring nullable

Current period end datetime e.g. "2014-11-18" e.g. "1653977628"

nextPeriodStartstring nullable

Date next period starts e.g. "2014-11-18" e.g. "1653977628"

cancelAtEndOfPeriodboolean nullable

Boolean on if plan is canelled at the end of the current period

signupIdstring nullable

Signup id e.g. "user123"

signupRevenuestring nullable

Signup revenue e.g. "250"

couponCodestring nullable

Coupon code e.g. "PROMOCODE"

customerIdstring nullable

Customer id e.g. "123"

productIdstring nullable

Id for the subscribed product e.g. "321"

creditCardIdstring nullable

Credit card id e.g. "4250"

createdstring date-time nullable

The date and time the subscription is first created e.g. "2013-11-18T02:17:40.080Z"

modifiedstring date-time nullable

Date entry was last modified e.g. "2013-11-18T02:17:40.080Z"

customerFirstNamestring nullable

Customer first name e.g. "Jane"

customerLastNamestring nullable

Customer last name e.g. "Doe"

startDatestring date-time nullable

Start datetime of the subscription e.g. "2013-11-18T02:17:40.080Z"

endDatestring date-time nullable

End datetime of the subscription e.g. "2015-11-18T02:17:40.080Z"

planNamestring nullable

Name of the plan of which this subscription is an instance e.g. "Basic Plan"

activatedstring nullable

Indicates when the subscription was activated e.g. "Jan 23 2023"

remainingIntervalsinteger nullable

Number of remaining subscription intervals e.g. 12

monthlyRevenueinteger nullable

Revenue per month in cents e.g. 500000

netMonthlyRevenueinteger nullable

Monthly revenue after taxes e.g. 300000

contractStartDatestring date-time nullable

Date contract starts * e.g. "2013-11-18T02:17:40.080Z"

expiredTimestampstring date-time nullable

When the current subscription expires e.g. "2013-11-18T02:17:40.080Z"

planIntervalstring nullable

Length of each subscription plan e.g. "Monthly"

numOfIntervalsinteger nullable

Number of subscription intervals e.g. 12

Example response

{
  "id": "quickbooks-726",
  "integration": "quickbooks",
  "srcId": "GH2JK-67283H-YW82KHX-2883KK-KS78S",
  "status": true,
  "balance": 500045,
  "totalRevenue": 387687,
  "productPrice": 4999,
  "currencyCode": "EUR",
  "currentPeriodStart": "1655792028",
  "currentPeriodEnd": "1653977628",
  "nextPeriodStart": "1653977628",
  "cancelAtEndOfPeriod": true,
  "signupId": "user123",
  "signupRevenue": "250",
  "couponCode": "PROMOCODE",
  "customerId": "123",
  "productId": "321",
  "creditCardId": "4250",
  "created": "2013-11-18T02:17:40.080Z",
  "modified": "2013-11-18T02:17:40.080Z",
  "customerFirstName": "Jane",
  "customerLastName": "Doe",
  "startDate": "2013-11-18T02:17:40.080Z",
  "endDate": "2015-11-18T02:17:40.080Z",
  "planName": "Basic Plan",
  "activated": "Jan 23 2023",
  "remainingIntervals": 12,
  "monthlyRevenue": 500000,
  "netMonthlyRevenue": 300000,
  "contractStartDate": "2013-11-18T02:17:40.080Z",
  "expiredTimestamp": "2013-11-18T02:17:40.080Z",
  "planInterval": "Monthly",
  "numOfIntervals": 12
}