Skip to content

An invoice with its lines

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

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired
    format: uuid
  • invoiceIdstringrequired

    The invoice's ID (a UUID).

Returns

200

OK

JSON
  • idstringrequired
  • numberstring | nullrequired

    Assigned when the invoice is issued.

  • statusstringrequired

    open, paid, void or uncollectible. Treat other values as unknown.

  • overduebooleanrequired

    Open, not carried forward, and past its due date.

  • carriedForwardbooleanrequired

    Below the minimum charge: added to the next invoice instead.

  • carriedIntoInvoiceIdstring | nullrequired

    The invoice it was carried into, once there is one.

  • periodStartstringrequired
    format: date-time
  • periodEndstringrequired
    format: date-time
  • currencystringrequired
  • collectionMethodstring | nullrequired

    charge_automatically (the default card) or send_invoice.

  • totalCentsstringrequired

    Cents.

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

    Carried from earlier invoices, in cents.

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

    Cents.

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

    Cents.

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

    Cents.

    pattern: ^-?[0-9]+(\.[0-9]+)?$
  • dueAtstring | nullrequired
    format: date-time
  • issuedAtstring | nullrequired

    When it was issued and numbered.

    format: date-time
  • finalizedAtstring | nullrequired

    The same as issuedAt.

    format: date-time
  • paidAtstring | nullrequired
    format: date-time
  • organizationIdstringrequired
  • subtotalMicrosstringrequired

    The lines' exact sum, in micros.

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

    subtotalMicros less totalCents, in micros.

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

    Who it was issued to.

    3 properties
    • namestring | nullrequired
    • emailstring | nullrequired
    • addressobject | nullrequired

      As issued: line1, line2, city, region, postalCode, country.

  • hostedInvoiceUrlstring | nullrequired

    Stripe's payment page.

  • paymentAttemptsintegerrequired
  • lastPaymentErrorstring | nullrequired
  • pdfobjectornullrequired

    Null until the PDF is delivered.

    2 variants

    One of the following:

    • object
    • null
  • 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