Praecise account/ Reference/ Billing

Put or replace one of the caller's invoices

put/api/billing/{account}/relationships/{id}/invoices/{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

  • 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

Responses

  • 200application/json
    Replaced, or the same again.
    • invoiceobject
      • 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
  • 201application/json
    New.
    • invoiceobject
      • 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
  • 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