Skip to main content
POST
Add a rate

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Add a new rate

rate_card_id
string<uuid>
required

ID of the rate card to update

product_id
string<uuid>
required

ID of the product to add a rate for

starting_at
string<date-time>
required

inclusive effective date

entitled
boolean
required
rate_type
enum<string>
required
Available options:
FLAT,
flat,
PERCENTAGE,
percentage,
TIERED,
tiered
pricing_group_values
object

Optional. List of pricing group key value pairs which will be used to calculate the price.

billing_frequency
enum<string>

Optional. Frequency to bill subscriptions with. Required for subscription type products with Flat rate.

Available options:
MONTHLY,
QUARTERLY,
ANNUAL,
WEEKLY,
monthly,
quarterly,
annual,
weekly
ending_before
string<date-time>

exclusive end date

price
number

Default price. For FLAT and SUBSCRIPTION rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.

credit_type_id
string<uuid>

The Metronome ID of the credit type to associate with price, defaults to USD (cents) if not passed. Used by all rate_types except type PERCENTAGE. PERCENTAGE rates use the credit type of associated rates.

Example:

"2714e483-4ff1-48e4-9e25-ac732e8f24f2"

tiers
object[]

Only set for TIERED rate_type.

commit_rate
object

A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit.

Response

Success

data
object
required