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)required
    In the path. The Praecise account id: sub in ID tokens.
  • idstring (uuid)required
    In the path. The relationship's id.
  • productstringrequired
    In the path. The writing product's client id.
  • refstringrequired
    In the path. The product's own reference.

Request bodyapplication/json, required

  • kindstringrequired
    One of: subscription, covered, usage.
  • coversstring
    For a covered line: the ref of the subscription line that pays for it.
  • labelstringrequired
    At most 140 characters.
  • labelsobject
  • planstring
    At most 60 characters.
  • statestring
    One of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
  • periodobject
    • startstring (date-time)
    • endstring (date-time)
  • amountobject
    • valueintegerrequired
      Whole minor units. At least 0.
    • currencystringrequired
      Pattern: ^[A-Z]{3}$.
  • manage_urlstring (uri)

Responses

  • 200application/json
    Replaced, or the same again.
    • lineobject
      • kindstringrequired
        One of: subscription, covered, usage.
      • coversstring
        For a covered line: the ref of the subscription line that pays for it.
      • labelstringrequired
        At most 140 characters.
      • labelsobject
      • planstring
        At most 60 characters.
      • statestring
        One of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
      • periodobject
        • startstring (date-time)
        • endstring (date-time)
      • amountobject
        • valueintegerrequired
          Whole minor units. At least 0.
        • currencystringrequired
          Pattern: ^[A-Z]{3}$.
      • manage_urlstring (uri)
  • 201application/json
    New.
    • lineobject
      • kindstringrequired
        One of: subscription, covered, usage.
      • coversstring
        For a covered line: the ref of the subscription line that pays for it.
      • labelstringrequired
        At most 140 characters.
      • labelsobject
      • planstring
        At most 60 characters.
      • statestring
        One of: trialing, active, past_due, unpaid, paused, canceled, incomplete, incomplete_expired.
      • periodobject
        • startstring (date-time)
        • endstring (date-time)
      • amountobject
        • valueintegerrequired
          Whole minor units. At least 0.
        • currencystringrequired
          Pattern: ^[A-Z]{3}$.
      • manage_urlstring (uri)
  • 400application/json
    A field is wrong; the error says which.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 401application/json
    No valid client id and secret.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 403application/json
    Another product's line, or an account that has not signed in to the caller.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 404application/json
    No such account, relationship, line or invoice.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 409application/json
    Several relationships and none named, a currency that differs, or a closed relationship.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 429application/json
    Over the limit for a minute. Retry-After says when to try again.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 503application/json
    Billing is not switched on. Nothing to do; do not retry in a loop.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring

This page as Markdown