SHOP SETUP / Users and roles
users
MockMock. 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.
The shop’s people, paged
The shop’s people, paged. Search matches name, email and phone.
/graphqlapp audienceWho can call this. Owner and admin. 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 - 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
- afterStringOptional
endCursor of the previous page.
- beforeStringOptional
startCursor of the next page, when paging backwards.
- filterUserFilterOptional
Narrow by role or status.
Show children
- roleRoleNameOptional
Only this role.
- statusUserStatusOptional
Only active or only inactive people.
- firstIntOptional
Page size, 1–100 (default 20).
Example:
3 - lastIntOptional
Page size when paging backwards, 1–100.
- searchStringOptional
Free text, 1–100 characters.
- sortUserSortOptional
Order (default: name, A to Z).
Example:
{"field":"NAME","direction":"ASC"}Show children
- directionSortDirection!Required
Ascending or descending.
- fieldUserSortField!Required
What to order by.
Returns
- usersUserConnection!Required
The shop’s people, paged. Search matches name, email and phone.
Show children
- edges[UserEdge!]!Required
The rows on this page, in order.
Example:
[{"cursor":"WyJhc2hhIGRlbW8iLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDAwMDAwYTEiXQ","node":{"id":"0192f0c1-0000-7000-8000-0000000000a1","name":"Asha Demo","email":"asha@demo-shop.example","phone":"+91 90000 00001","role":"OWNER","status":"ACTIVE","lastLoginAt":"2026-10-12T04:30:00.000Z"}},{"cursor":"WyJiYWxhIGRlbW8iLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDAwMDAwYTIiXQ","node":{"id":"0192f0c1-0000-7000-8000-0000000000a2","name":"Bala Demo","email":"bala@demo-shop.example","phone":"+91 90000 00002","role":"ADMIN","status":"ACTIVE","lastLoginAt":"2026-10-13T05:30:00.000Z"}},{"cursor":"WyJjaGl0cmEgZGVtbyIsIjAxOTJmMGMxLTAwMDAtNzAwMC04MDAwLTAwMDAwMDAwMDBhMyJd","node":{"id":"0192f0c1-0000-7000-8000-0000000000a3","name":"Chitra Demo","email":"chitra@demo-shop.example","phone":"+91 90000 00003","role":"ACCOUNTANT","status":"ACTIVE","lastLoginAt":"2026-10-14T06:30:00.000Z"}}]Show children
- cursorString!Required
Opaque position of this row in the list.
Example:
"WyJhc2hhIGRlbW8iLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDAwMDAwYTEiXQ" - nodeUser!Required
The User.
Example:
{"id":"0192f0c1-0000-7000-8000-0000000000a1","name":"Asha Demo","email":"asha@demo-shop.example","phone":"+91 90000 00001","role":"OWNER","status":"ACTIVE","lastLoginAt":"2026-10-12T04:30:00.000Z"}Show children
- createdAtString!Required
UTC time the user was added.
- emailStringOptional
Sign-in email, if any.
Example:
"asha@demo-shop.example" - idID!Required
Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-0000000000a1" - lastLoginAtStringOptional
UTC time of the last sign-in; null if never.
Example:
"2026-10-12T04:30:00.000Z" - nameString!Required
Full name.
Example:
"Asha Demo" - phoneStringOptional
Sign-in phone, if any.
Example:
"+91 90000 00001" - roleRoleName!Required
Their role in this shop.
Example:
"OWNER"ACCOUNTANTCustomers, invoices and payments.ADMINManages people, settings and customers on the owner’s behalf.OPERATORRuns machines and logs production.OWNERRuns the shop. Everything, including who else can sign in.QCInspects parts and records results.SUPERVISORPlans and watches the shop floor.
- statusUserStatus!Required
Whether they can sign in.
Example:
"ACTIVE"ACTIVECan sign in.INACTIVECannot sign in; their sessions were revoked. History stays.
- pageInfoPageInfo!Required
Whether more pages exist, and the cursors to reach them.
Example:
{"hasNextPage":true,"endCursor":"WyJjaGl0cmEgZGVtbyIsIjAxOTJmMGMxLTAwMDAtNzAwMC04MDAwLTAwMDAwMDAwMDBhMyJd"}Show children
- endCursorStringOptional
Cursor of the last row; pass it as
afterto get the next page. Null when the page is empty.Example:
"WyJjaGl0cmEgZGVtbyIsIjAxOTJmMGMxLTAwMDAtNzAwMC04MDAwLTAwMDAwMDAwMDBhMyJd" - hasNextPageBoolean!Required
Whether another page follows this one.
Example:
true - hasPreviousPageBoolean!Required
Whether another page comes before this one.
- startCursorStringOptional
Cursor of the first row; pass it as
beforeto page backwards. Null when the page is empty.
- totalCountInt!Required
All rows matching the filter and search, not just this page.
Example:
8
Errors
| Code | HTTP | When |
|---|---|---|
VALIDATION_FAILED | 400 | Input failed Zod or route schema validation. details lists each field path and problem. |
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.