Skip to main content
POST
/
v1
/
contract-pricing
/
rate-cards
/
addRate
Add a rate
curl --request POST \
  --url https://api.metronome.com/v1/contract-pricing/rate-cards/addRate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "rate_card_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "product_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
  "starting_at": "2020-01-01T00:00:00.000Z",
  "entitled": true,
  "rate_type": "FLAT",
  "price": 100,
  "credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2"
}'
{
  "data": {
    "rate_type": "FLAT",
    "price": 100
  }
}

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