PDV and cashier accounts
Operational accounts are created by management, scoped to one specific workspace — a PDV account for workspace A doesn't work in workspace B, even within the same organization.
| Endpoint | What it does |
|---|---|
GET /v1/management/organizations/{organizationId}/workspaces/{workspaceId}/operator-accounts | Lists the workspace's accounts. owner, admin, and auditor can list. |
POST .../operator-accounts | Creates an immutable pdv or cashier account. owner/admin only. The generated password is returned once — the API never recovers it afterward. |
POST .../operator-accounts/{operatorAccountId}/password/rotate | Generates a new password, invalidates the previous one immediately. owner/admin only. |
DELETE .../operator-accounts/{operatorAccountId} | Permanently deactivates the account — there's no reactivating; create a new one if needed. Its sales/top-up history is preserved. |
Username and password are never chosen by hand
username is generated in the format PDV-00184723 / CX-00921547; the
optional description (up to 200 characters) is the free-text field
management uses to identify the account ("Main entrance PDV"). The password
follows its own character/length policy — it's not configurable.
Listing: sorting and pagination
This was a point adjusted recently at the frontend's request: sorting now
happens in the database, before LIMIT — sorting only the current
page's items doesn't work with cursor pagination.
Query params:
type=pdv|cashier
status=active|disabled
search=<text> # searches username or description
limit=<1-100, default 50>
cursor=<opaque, comes from nextCursor>
sortBy=status|type|description|username
sortDirection=asc|desc
- Without
sortBy: fixed order — active before disabled,cashierbeforepdv, description alphabetically,idas a tie-break. - With
sortBy: sorts only by that column;sortDirectioncontrols the direction;idas a tie-break in the same direction.
:::warning The cursor is tied to the sort that produced it
The cursor returned in nextCursor is only valid for the same
sortBy/sortDirection combination. When the table's column or direction
changes, start pagination over (no cursor). Using a cursor with a
different sort than the one that produced it responds with 400 OPERATOR_ACCOUNT_CURSOR_SORT_MISMATCH.
:::