Skip to main content
POST
/
customers
/
{customer_id}
/
plans
/
add
Add a plan to a customer
curl --request POST \
  --url https://api.metronome.com/v1/customers/{customer_id}/plans/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "plan_id": "d2c06dae-9549-4d7d-bc04-b78dd3d241b8",
  "starting_on": "2021-02-01T00:00:00Z",
  "ending_before": "2022-02-01T00:00:00Z"
}'
{
  "data": {
    "id": "8b24d3dc-6db5-432d-9416-8439b3fbf242"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

customer_id
string<uuid>
required

Body

application/json

The customer ID, plan ID, and date range for the plan to be applied

plan_id
string<uuid>
required
starting_on
string<date-time>
required

RFC 3339 timestamp for when the plan becomes active for this customer. Must be at 0:00 UTC (midnight).

ending_before
string<date-time>

RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight).

net_payment_terms_days
number

Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).

price_adjustments
object[]

A list of price adjustments can be applied on top of the pricing in the plans. See the price adjustments documentation for details.

trial_spec
object

A custom trial can be set for the customer's plan. See the trial configuration documentation for details.

overage_rate_adjustments
object[]

An optional list of overage rates that override the rates of the original plan configuration. These new rates will apply to all pricing ramps.

Response

200 - application/json

Success

data
object
required
I