Skip to main content
POST
Create plan

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Body

application/json
product
string
required

Product ID.

name
string
required
Maximum string length: 56
description
string
required
Maximum string length: 200
frequency
string
required

Frequency ID (e.g. monthly).

currency
string
required

ISO currency code.

amount
number
required
sku
string | null
Maximum string length: 32
exempt
boolean
default:false
usage_scheme
enum<string>
default:licensed
Available options:
licensed,
metered
usage_aggregation
enum<string> | null
Available options:
last_record,
max,
sum
tiers_mode
enum<string> | null

Pricing mode for tiered plans. unit and range are deprecated aliases of volume and package respectively.

Available options:
package,
volume,
graduated,
package_overage,
unit,
range
tiers
object[]
unit_label
string | null
Maximum string length: 4
status
enum<string>
default:active
Available options:
active,
archived

Response

Plan created.

product
string
required

Product ID.

name
string
required
Maximum string length: 56
description
string
required
Maximum string length: 200
frequency
string
required

Frequency ID (e.g. monthly).

currency
string
required

ISO currency code.

amount
number
required
id
string
read-only
sku
string | null
Maximum string length: 32
exempt
boolean
default:false
usage_scheme
enum<string>
default:licensed
Available options:
licensed,
metered
usage_aggregation
enum<string> | null
Available options:
last_record,
max,
sum
tiers_mode
enum<string> | null

Pricing mode for tiered plans. unit and range are deprecated aliases of volume and package respectively.

Available options:
package,
volume,
graduated,
package_overage,
unit,
range
tiers
object[]
unit_label
string | null
Maximum string length: 4
status
enum<string>
default:active
Available options:
active,
archived
archived
string<date-time> | null
read-only
created
string<date-time>
read-only
updated
string<date-time>
read-only