Skip to main content
POST
/
v1
/
packages
/
create
Create a package
curl --request POST \
  --url https://api.metronome.com/v1/packages/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My package",
  "rate_card_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "billing_provider": "stripe",
  "delivery_method": "direct_to_billing_provider"
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Create a new package

name
string
required
contract_name
string
uniqueness_key
string

Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.

Required string length: 1 - 128
net_payment_terms_days
number
rate_card_id
string<uuid>
rate_card_alias
string

Selects the rate card linked to the specified alias as of the contract's start date.

duration
object
billing_anchor_date
enum<string>
Available options:
contract_start_date,
first_billing_period
commits
object[]
credits
object[]
recurring_commits
object[]
recurring_credits
object[]
multiplier_override_prioritization
enum<string>

Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit.

Available options:
LOWEST_MULTIPLIER,
lowest_multiplier,
EXPLICIT,
explicit
overrides
object[]
scheduled_charges
object[]
scheduled_charges_on_usage_invoices
enum<string>

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's timestamp must match the usage invoice's ending_before date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

Available options:
ALL
usage_statement_schedule
object
billing_provider
enum<string>
Available options:
aws_marketplace,
azure_marketplace,
gcp_marketplace,
stripe,
netsuite
delivery_method
enum<string>
Available options:
direct_to_billing_provider,
aws_sqs,
tackle,
aws_sns
spend_threshold_configuration
object
prepaid_balance_threshold_configuration
object
subscriptions
object[]

Response

Success

data
object
required