Praecise account/ Reference/ Billing

One relationship, with the caller's own lines and invoices

get/api/billing/{account}/relationships/{id}

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.

Responses

  • 200application/json
    The relationship.
    • relationshipobject
      • idstring (uuid)
      • namestring
      • countrystring
      • tax_idstring
      • currencystring
        Set by the first amount; does not change.
      • statestring
        One of: open, closed.
      • processor_refstring
        The payer at the card processor; only to the product that set it.
      • newboolean
        Make a further relationship (on the person's word).
    • lineslist of object
      • 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)
    • invoiceslist of object
      • numberstringrequired
        At most 64 characters.
      • datestring (date)required
      • amountobjectrequired
        • valueintegerrequired
          Whole minor units. At least 0.
        • currencystringrequired
          Pattern: ^[A-Z]{3}$.
      • statestringrequired
        One of: draft, open, paid, void, uncollectible.
      • urlstring (uri)required
  • 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
  • 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