N1Developer docsv1

Invoices · v1

QUERY

invoiceSummary

Mock

Mock. This operation is part of the approved contract but its module is not built yet. Run Core with N1_API_MODE=mock N1_DEV_AUTH=stub to get deterministic demo-shop data from it. The real server answers NOT_IMPLEMENTED until it ships; the schema and examples here will not change when it does.

Counts and amounts for the invoices header

Counts and amounts over every invoice, for the invoice screen’s header. Owner, admin and accountant. Needed because the list is paged: a client can no longer add up the whole list itself.

POST/graphqlapp audience

Who can call this. Owner, admin, accountant.

Headers

  • AuthorizationstringRequired

    Bearer <token>, issued for this endpoint's audience. The token decides the shop and roles; nothing in the request body can change them.

    Example: Bearer eyJhbGciOiJFZERTQSJ9…

  • Content-TypestringRequired

    Always application/json. Only POST is accepted.

    Example: application/json

  • X-Request-IdstringOptional

    Your id for this request (8–128 characters of A–Z a–z 0–9 . _ : -). Echoed back in the response header and in every error, so you can quote it when reporting a problem. Core makes one if you send none.

    Example: app-7f3c2a9e-checkout

Arguments

This operation takes no arguments.

Returns

  • invoiceSummaryInvoiceSummary!Required

    Counts and amounts over every invoice, for the invoice screen’s header. Owner, admin and accountant. Needed because the list is paged: a client can no longer add up the whole list itself.

    Show children
    • billedThisMonthFloat!Required

      Paise billed on invoices issued this calendar month.

      Example: 238360

    • newInt!Required

      Invoices that are NEW.

      Example: 3

    • outstandingFloat!Required

      Paise on invoices not yet paid.

      Example: 1602900

    • overdueInt!Required

      Invoices that are OVERDUE.

      Example: 5

    • overdueAmountFloat!Required

      The overdue part of outstanding, in paise.

      Example: 1194620

    • paidInt!Required

      Invoices that are PAID.

      Example: 4

    • totalInt!Required

      Invoices in all.

      Example: 12

Errors

CodeHTTPWhen
FORBIDDEN403Signed in, but the role or tenant does not allow the action.

Every error has the same body. See Errors.

Rate limit tier

Tier: per user. Over the limit you get RATE_LIMITED (HTTP 429) with a Retry-After header. See Response handling.

Search documentation

Search operations, types and errors from the generated contract.