POST
/
plans
Header
Body
curl --request POST \
  --url https://eu.sequencehq.com/api/plans \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "currency": "GBP",
  "eligibleCustomerIds": [],
  "label": "Sample plan - EU",
  "name": "Sample plan",
  "priceIds": [
    "723a5433-7771-4ce6-bd0d-2324016bd9c2",
    "429c04bc-29c8-4d13-8a2e-ae8fcc583dfa"
  ]
}'
{
  "createdAt": "2022-09-01T16:47:00Z",
  "currency": "GBP",
  "eligibleCustomerIds": [],
  "id": "fe0916b3-6a3f-4e02-abf0-dfcc6b3bc471",
  "label": "Sample plan - EU",
  "minimum": "100.00",
  "name": "Sample plan",
  "parentId": "10f0390c-ba18-404d-ae4e-256257eaa0fd",
  "prices": [
    {
      "billingFrequency": "MONTHLY",
      "billingType": "IN_ARREARS",
      "createdAt": "2022-06-28T16:47:00Z",
      "currency": "GBP",
      "deletedAt": "2022-06-28T16:47:00Z",
      "externalIds": [
        {
          "key": "Xero",
          "value": "123"
        }
      ],
      "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
      "name": "Demo Product",
      "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9",
      "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
      "structure": {
        "isPricePercentage": false,
        "pricePerUnit": "0.25",
        "pricingType": "LINEAR",
        "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712"
      },
      "updatedAt": "2022-06-28T16:47:00Z"
    }
  ],
  "schedulesCount": 0,
  "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
  "status": "LIVE",
  "type": "REUSABLE",
  "updatedAt": "2022-09-01T16:47:00Z",
  "version": 1,
  "versionChangeBehaviour": "IMMEDIATE",
  "versionEffectiveFrom": "2022-09-01T00:00:00Z"
}

Headers

Authorizationrequired
string

Your API credentials. Eg. Basic {credentials}.

Idempotency-Key
string

Specifying a unique ID for this request here lets you retry it without risk of performing the same operation twice.

Body

application/json
currencyrequired
enum<string>
Available options:
GBP,
EUR,
USD,
CAD,
ZAR,
ARS,
UYU,
COP,
MXN,
AUD
eligibleCustomerIdsrequired
any[]
labelrequired
string
minimum
string
namerequired
string
parentId
string
priceIdsrequired
string[]
type
enum<string>
Available options:
CUSTOM,
REUSABLE

Response

201 - application/json
createdAtrequired
string
currencyrequired
enum<string>
Available options:
GBP,
EUR,
USD,
CAD,
ZAR,
ARS,
UYU,
COP,
MXN,
AUD
eligibleCustomerIdsrequired
any[]
idrequired
string
labelrequired
string
minimum
string
namerequired
string
parentId
string
pricesrequired
object[]
schedulesCountrequired
integer
sequenceAccountIdrequired
string
statusrequired
enum<string>
Available options:
DRAFT,
LIVE,
RETIRED
typerequired
enum<string>
Available options:
CUSTOM,
REUSABLE
updatedAtrequired
string
versionrequired
integer
versionChangeBehaviourrequired
enum<string>
Available options:
NEVER,
IMMEDIATE,
NEXT_BILLING_DATE
versionEffectiveFrom
string