← API reference
CANONICAL TYPE REFERENCE

CustomerAccountSummaryPayload

A customer's trading position over a date window: their orders, estimates and invoices, plus invoiced/paid/outstanding money totals derived from those invoices.

The requested customer. Null only when no customer with that id exists in the caller's tenant, in which case errors explains why.

The customer's orders whose orderDate falls in the requested window, most recent first.

The customer's estimates whose issueDate falls in the requested window, most recent first.

The customer's invoices whose issueDate falls in the requested window, most recent first. Includes credit notes as well as invoices.

Sum of totalAmount over the returned invoices of kind invoice; credit notes are excluded. Reflects the requested date window only.

totalPaidFloat!

Sum of paidAmount over the same invoices counted by totalInvoiced (credit notes excluded).

totalInvoiced minus totalPaid — what the customer still owes on invoices in the window. Can go negative if an invoice is overpaid.

Field-level lookup errors; empty on success. Carries customerId: customer not found when no such customer exists for the tenant.

View exact SDL
"""
A customer's trading position over a date window: their orders, estimates and invoices, plus invoiced/paid/outstanding money totals derived from those invoices.
"""
type CustomerAccountSummaryPayload {
  """
  The requested customer. Null only when no customer with that id exists in the caller's tenant, in which case `errors` explains why.
  """
  customer: CustomerState
  """
  The customer's orders whose orderDate falls in the requested window, most recent first.
  """
  orders: [OrderState!]!
  """
  The customer's estimates whose issueDate falls in the requested window, most recent first.
  """
  estimates: [EstimateState!]!
  """
  The customer's invoices whose issueDate falls in the requested window, most recent first. Includes credit notes as well as invoices.
  """
  invoices: [InvoiceState!]!
  """
  Sum of totalAmount over the returned invoices of kind `invoice`; credit notes are excluded. Reflects the requested date window only.
  """
  totalInvoiced: Float!
  """
  Sum of paidAmount over the same invoices counted by `totalInvoiced` (credit notes excluded).
  """
  totalPaid: Float!
  """
  `totalInvoiced` minus `totalPaid` — what the customer still owes on invoices in the window. Can go negative if an invoice is overpaid.
  """
  totalOutstanding: Float!
  """
  Field-level lookup errors; empty on success. Carries `customerId: customer not found` when no such customer exists for the tenant.
  """
  errors: [FieldError!]!
}

One stable address across all schema views. Follow a field’s type to explore connections between domains.