N1 APIDemo shop

CUSTOMERS / Customers

MUTATION

updateCustomer

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.

Replace a customer’s details and contacts

Compare

Replace a customer’s details and contacts. Owner, admin and accountant.

POST/graphqlapp audience

Who can call this. Owner, admin and accountant. You can run it against Local or Staging from the request panel, with a demo-shop token.

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

  • Idempotency-KeystringRequired

    A key you generate once per user action (a UUID). Retrying with the same key never applies the change twice.

    Example: 0192f0c1-9b2a-7d40-8c3e-1f5a6b7c8d9e

  • 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

  • idID!Required

    The customer id.

    Example: "0192f0c1-0000-7000-8000-0000000c0003"

  • inputCustomerInput!Required

    The full customer.

    Example: {"name":"Cauvery Fasteners 3","gstin":"27DEMOZ0001A1Z5","phone":"+91 98000 99001","email":"purchase@zenith-demo.example","paymentTermsDays":45,"billingAddress":{"line1":"7 Demo Mill Road","line2":null,"city":"Pune","state":"Maharashtra","pincode":"411001"},"contacts":[{"name":"Meera Demo","designation":"Purchase manager","phone":"+91 98000 99002","email":"meera@zenith-demo.example"}]}

    Show children
    • billingAddressAddressInput!Required

      Where invoices go.

    • contacts[CustomerContactInput!]Optional

      People at the customer, at most 20.

    • emailStringOptional

      Main email.

    • gstinStringOptional

      GSTIN, if registered.

    • nameString!Required

      Company name.

    • paymentTermsDaysInt!Required

      Days after the invoice date that payment is due, 0–365.

    • phoneStringOptional

      Main phone.

    • shippingAddressAddressInputOptional

      Where parts go, when different from billing.

    • statusCustomerStatusOptional

      Default ACTIVE.

Returns

  • updateCustomerCustomer!Required

    Replace a customer’s details and contacts. Owner, admin and accountant.

    Show children
    • billingAddressAddress!Required

      Where invoices go.

      Show children
      • cityString!Required

        City or town.

      • line1String!Required

        Building, street.

      • line2StringOptional

        Area, landmark.

      • pincodeString!Required

        6-digit PIN code.

      • stateString!Required

        State name.

    • contacts[CustomerContact!]!Required

      People at the customer, at most 20.

      Show children
      • designationStringOptional

        Job title.

      • emailStringOptional

        Email address.

      • idID!Required

        Stable id (UUIDv7).

      • nameString!Required

        Full name.

      • phoneStringOptional

        Phone number.

    • createdAtString!Required

      UTC time the customer was added.

    • emailStringOptional

      Main email.

    • gstinStringOptional

      GSTIN, if registered.

    • idID!Required

      Stable id (UUIDv7).

      Example: "0192f0c1-0000-7000-8000-0000000c0003"

    • nameString!Required

      Company name.

      Example: "Cauvery Fasteners 3"

    • paymentTermsDaysInt!Required

      Days after the invoice date that payment is due; 0 = on delivery.

      Example: 45

    • phoneStringOptional

      Main phone.

    • shippingAddressAddressOptional

      Where parts go, when different from billing.

      Show children
      • cityString!Required

        City or town.

      • line1String!Required

        Building, street.

      • line2StringOptional

        Area, landmark.

      • pincodeString!Required

        6-digit PIN code.

      • stateString!Required

        State name.

    • statusCustomerStatus!Required

      Whether new orders can be taken.

      • ACTIVEOrders can be taken.
      • INACTIVEKept for history; hidden from pickers. Use this instead of deleting a customer who has orders.
    • updatedAtString!Required

      UTC time of the last change.

      Example: "2026-10-12T05:00:00.000Z"

Errors

CodeHTTPWhen
CUSTOMER_NOT_FOUND404The id is unknown in this shop (another shop's ids answer the same).

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.