Skip to content

The open period's invoice as it stands

GET
https://billing.ezghcloud.com/v1/organizations/{orgId}/invoices/upcoming

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired
    format: uuid

Returns

200

OK

JSON
  • organizationIdstringrequired
  • periodStartstringrequired
    format: date-time
  • periodEndstringrequired
    format: date-time
  • issuesAtstringrequired
    format: date-time
  • currencystringrequired
  • estimatedbooleanrequired
  • subtotalMicrosstringrequired

    Micros.

    pattern: ^-?[0-9]+(\.[0-9]+)?$
  • totalCentsstringrequired

    Cents.

    pattern: ^-?[0-9]+(\.[0-9]+)?$
  • roundingMicrosstringrequired

    Micros.

    pattern: ^-?[0-9]+(\.[0-9]+)?$
  • linesarray ofobjectrequired
    13 properties
    • positionintegerrequired
    • kindstringrequired

      usage, other_usage (lines under half a cent) or other_projects (a service's smallest projects, past the line limit).

    • servicestring | nullrequired
    • projectIdstring | nullrequired
    • projectNamestring | nullrequired

      The project's name when the invoice was drafted.

    • projectSlugstring | nullrequired
    • skustring | nullrequired
    • descriptionstringrequired
    • quantitystringrequired

      In the SKU's unit.

      pattern: ^-?[0-9]+(\.[0-9]+)?$
    • unitPricestring | nullrequired

      Dollars per unit; null for folded lines and SKUs whose price changed within the period.

    • amountstringrequired

      Exact dollars.

      pattern: ^-?[0-9]+(\.[0-9]+)?$
    • amountMicrosstringrequired

      Micros.

      pattern: ^-?[0-9]+(\.[0-9]+)?$
    • amountCentsstringrequired

      What's billed, in cents.

      pattern: ^-?[0-9]+(\.[0-9]+)?$

401

unauthenticated: no valid credential.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

403

access_denied: the caller isn't allowed to (the message names the action); forbidden_origin: a cookie-authenticated write from another site.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

404

not_found: the organization (or one the caller doesn't belong to), or the resource, doesn't exist.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

429

too_many_requests: slow down.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

500

internal_error: a bug; the details are in the logs, under the request ID.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

503

unavailable, ledger_unavailable or payments_unavailable: retry later.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired
Navigation

Type to search…

↑↓ navigate↵ selectEsc close