Skip to navigation

Update a rate card version

Draft scaffold — not implemented or available in the API.

Edits a draft rate card version, including when it takes effect, and adds a revision. Fields you leave out are kept. Only a draft can be updated.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

rateCardstringRequiredformat: "^[a-z0-9_]{1,64}$"
The rate card's key.
versionstringRequiredformat: "^[1-9]\d{0,8}$"
The version number.

Headers

Paid-BetaenumRequired

This endpoint is in the rate_cards=v1 beta. Send this header to use it.

Allowed values:

Request

Body
currencieslist of stringsOptional
On a card priced in money, the currencies every rate prices. A committed version offers every currency that earlier committed versions of its card offered.
displayNamestring or nullOptional<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

meterslist of objectsOptional
The meter versions the version prices, each meter at most once. Every target's meter is listed.
modifierslist of objectsOptionalDefaults to []
The version's modifiers.
rateslist of objectsOptional
The version's rates.
startsAtdatetimeOptional
When the version takes effect. Commit rejects one in the past, or equal to another version's of the card.

Response

200
idstring
The version's ID.
objectenum

The type of object. Always rateCardVersion.

Allowed values:
createdAtdatetime
When the object was created.
copiedFrominteger or null

The version this draft was copied from when it was created, or null.

currencieslist of strings or null

The currencies every rate prices, or null on a card priced in a credit currency.

displayNamestring or null<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

livemodeboolean

true for an object on a live account, false on a test account.

meterslist of objects
The meter versions the version prices.
modifierslist of objects
The version's modifiers.
rateCardstringformat: "^[a-z0-9_]{1,64}$"
The key of the rate card.
rateslist of objects
The version's rates.
revisioninteger

The number of the draft’s latest edit. Every update or restore adds one, and so does a change in what the draft would do, such as an order changing under a migration.

startsAtdatetime or null
When the version takes effect. Commit rejects one in the past, or equal to another version's of the card.
statusenum

Where the change is in its lifecycle. After commit, it follows from the change’s dates. draft: being prepared; nothing is binding yet. scheduled: committed, and waiting for its startsAt. inEffect: committed, and its startsAt has passed. superseded: a later version is in effect. More statuses may be added.

Allowed values:
updatedAtdatetime
When the object was last changed.
versioninteger
The version number.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error