Praecise account/ Reference/ Billing
Put or replace one of the caller's lines
put/api/billing/{account}/relationships/{id}/lines/{product}/{ref}
Before you call
- Credential
Authorization: Basic $KEY- Callers
The server of a product in the account service's client list.
Parameters
- accountstring (uuid)requiredIn the path. The Praecise account id:
subin ID tokens. - idstring (uuid)requiredIn the path. The relationship's id.
- productstringrequiredIn the path. The writing product's client id.
- refstringrequiredIn the path. The product's own reference.
Request bodyapplication/json, required
- kindstringrequiredOne of: subscription, covered, usage.
- coversstringFor a covered line: the ref of the subscription line that pays for it.
- labelstringrequiredAt most 140 characters.
- labelsobject
- planstringAt most 60 characters.
- statestringOne of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
- periodobject
- startstring (date-time)
- endstring (date-time)
- amountobject
- valueintegerrequiredWhole minor units. At least 0.
- currencystringrequiredPattern: ^[A-Z]{3}$.
- valueintegerrequired
- manage_urlstring (uri)
Responses
- 200application/jsonReplaced, or the same again.
- lineobject
- kindstringrequiredOne of: subscription, covered, usage.
- coversstringFor a covered line: the ref of the subscription line that pays for it.
- labelstringrequiredAt most 140 characters.
- labelsobject
- planstringAt most 60 characters.
- statestringOne of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
- periodobject
- startstring (date-time)
- endstring (date-time)
- amountobject
- valueintegerrequiredWhole minor units. At least 0.
- currencystringrequiredPattern: ^[A-Z]{3}$.
- valueintegerrequired
- manage_urlstring (uri)
- kindstringrequired
- lineobject
- 201application/jsonNew.
- lineobject
- kindstringrequiredOne of: subscription, covered, usage.
- coversstringFor a covered line: the ref of the subscription line that pays for it.
- labelstringrequiredAt most 140 characters.
- labelsobject
- planstringAt most 60 characters.
- statestringOne of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
- periodobject
- startstring (date-time)
- endstring (date-time)
- amountobject
- valueintegerrequiredWhole minor units. At least 0.
- currencystringrequiredPattern: ^[A-Z]{3}$.
- valueintegerrequired
- manage_urlstring (uri)
- kindstringrequired
- lineobject
- 400application/jsonA field is wrong; the error says which.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 401application/jsonNo valid client id and secret.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 403application/jsonAnother product's line, or an account that has not signed in to the caller.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 404application/jsonNo such account, relationship, line or invoice.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 409application/jsonSeveral relationships and none named, a currency that differs, or a closed relationship.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 429application/jsonOver the limit for a minute.
Retry-Aftersays when to try again.- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 503application/jsonBilling is not switched on. Nothing to do; do not retry in a loop.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired