Skip to main content

Customers API (C17, C18)

Feature 004, user story 4. A customer is a CUSTOMER org linked to your operator org by a customer profile (ORG#<op>/REL#CUSTOMER#<customer>). These routes cover the customer list, create, view and edit, closing an account, and the customer drawer, which loads in a single call.

:::caution Deployed; no captured run yet Deployed on dev (verified live 2026-10-13). The list's default status=ACTIVE path queries GSI3, deployed 2026-10-13, so it is expected to work now, not yet re-verified on dev. The DynamoDB key fix for get, PATCH and :close (previously 500; an unknown customerOrgId is now 404) is deployed to dev 2026-10-13; not yet re-verified with a signed-in call. As of 2026-10-13 these routes are in lib/routes.ts (ListCustomers, CreateCustomer, GetCustomer, UpdateCustomer, CloseCustomer, GetCustomerOverview). Handler: packages/api/src/handlers/customers.ts. Core: packages/core/src/customers/repository.ts. They are unit-tested, and docs/openapi.yaml passes the parity test. Integration tests (customers-004.int.test.ts, customer-overview-004.int.test.ts) have been written but not run. Every JSON example below is illustrative: it was derived from the Zod schemas (CustomerProfile, CreateCustomerInput, UpdateCustomerInput, CloseCustomerInput, CustomerListQuery, CustomerListResponse, CustomerOverview), not captured from a real response. The issue #14 changes (Crown org acting on any customer, operatorOrgId on create, hasPlants) were committed 2026-11-13 and are not deployed; they are unit-tested only. :::

Common rules​

TopicRule
AuthCognito JWT (Authorization: Bearer <id token>), on every route
Org{orgId} in the path is authoritative. If an X-Org-Id header differs from it, the response is 400 VALIDATION_FAILED with details.header: "X-Org-Id". Platform members are exempt
PermissionCategory customers. Read needs ≥ VIEW; create and edit need ≥ EDIT; changing portalLevel, setting/changing/removing portalPermsLimit, and :close need ≥ MANAGE
VersioningGET, PATCH and close responses carry ETag: "<version>", and the body also has version. PATCH and :close require If-Match: "<version>"
BodiesContent-Type: application/json, strict schemas (unknown field → 422)
Not yoursA customer org that is not a customer of {orgId} → 404 NOT_FOUND
Scoped callersA member whose scope is not ALL sees only the customers of their own plants: the list is filtered (since 2026-11-25 its first page carries tiles and total computed over the customers they can see) and any other customer is 404 NOT_FOUND on detail, overview, PATCH and :close (Role boundaries, 2026-11-12). An Installer is not such a caller: since ADR 0026 D3.1 its scope is always ALL, so it sees every customer of its Business
Contact details (RBAC-S7, 2026-11-23)contact (name, job title, phone, email) and lastContact are returned only to a caller with customers ≥ MANAGE in the Business (Business, Crown staff). Below that — the Installer template holds customers: VIEW — both fields are absent on the list, detail and overview profile. A Business that wants its Installers to reach customers raises its Installer role to customers: MANAGE. A custom role at customers: EDIT may still set them, but the response does not echo them back. For these callers q does not match the contact name or email either (list and search suggestions), so a search cannot confirm an address
Crown orgA Crown Super Admin / Administrator calling the list on the Crown org gets every Business's customers and Independent End Users (Crown-wide list): operatorOrgId is the Business, refs.orgs its name, personal orgs carry personal: true; first-page tiles are platform-wide (2026-11-12). Add operatorOrgId=<businessOrgId> to see one Business's list, with its own tiles. The same caller can also open, edit, close and create any customer from the Crown path: see Crown org: any customer (issue #14, 2026-11-13)
DeletingThere is no DELETE. Close the account instead (:close). DELETE gets API Gateway's plain 404

Routes​

MethodPathLevelHeaders
GET/v1/orgs/{orgId}/customersVIEW—
POST/v1/orgs/{orgId}/customersEDIT (MANAGE if portalLevel > VIEW)Idempotency-Key required
GET/v1/orgs/{orgId}/customers/{customerOrgId}VIEW—
PATCH/v1/orgs/{orgId}/customers/{customerOrgId}EDIT (MANAGE to change portalLevel)If-Match required
POST/v1/orgs/{orgId}/customers/{customerOrgId}:closeMANAGEIf-Match required, Idempotency-Key optional
GET/v1/orgs/{orgId}/customers/{customerOrgId}/overviewVIEW—

:close is a colon-verb (CR-2). API Gateway registers it as POST …/customers/{customerOrgId}, and the handler splits :close out of the path value. Any other verb, or a bare POST with no verb, returns 404 NOT_FOUND.

CustomerProfile​

FieldTypeNotes
customerOrgId, operatorOrgIdULID
codestringCU-NNNN, platform-wide. Missing on relationships created before 004
namestring1–160
customerTypeRESIDENTIAL | COMMERCIAL | INDUSTRIALMissing on relationships created before 004
business, citystringoptional, ≤ 120
contact{name?, jobTitle?, phone?, email?}phone E.164; email lowercased
customerSincedatedefaults to the creation date; when a row never recorded one, the API returns the row's (personal row: the personal org's) creation date (2026-11-27)
statusACTIVE | CHURNED
portalLevelNONE | VIEW | MONITOR | EDIT | SERVICE | FULLdefault VIEW
portalPermsLimitPermsLimit (partial map category → Level)Present only when set. Lowers the portal tier's ceiling per category (ADR 0014 phase 2a)
tagIdsULID[]≤ 20 tags; each must be ACTIVE and apply to CUSTOMER
lastContact{on: date, note?: ≤200}
closedAt, closedBy, closeReasonpresent once closed
plantCountintSince 2026-11-25: exact — the ADR 0017 plantsLive (ACTIVE + ARCHIVED plants, written in the same transaction as each plant write) whenever the customer's Crown-wide entry belongs to this Business, which is every live customer once backfill:customer-list has run. Falls back to the facet counter (approximate) only for a customer with no entry
personaltrueCrown-wide list, detail and overview only: an Independent End User's personal org
operatorSuspendedtrue or absentBug fix 2026-12-02. Crown-wide list only: the row's Business is SUSPENDED. The row is still listed and counted; it can be opened (GET) but not edited (PATCH / :close → 404). Show a "Business suspended" badge
endUser{sub, accountStatus: ACTIVE | SUSPENDED | BLOCKED}2026-11-25. On a personal row and on a Business's End User customer; only for callers with customers ≥ MANAGE (like contact). See End User access
version, createdAt, updatedAt

End Users are customers (2026-11-25)​

Console request 2026-11-24. Built and unit-tested on dev; not yet run against a deployment. An End User attached to a Business is one of its customers and appears in this list, its detail and its overview like any other customer:

  • Share: plant-transfers makes the receiver a customer of the Business the plant is in (Business mode, and Crown mode when the receiver is an End User of a Business).
  • Join with own plants: an End User whose personal plants moved into the Business on joining (ADR 0026 D5).

The customer org is the End User's personal org (customerOrgId = that org; it stays closed for the user while they belong to the Business). The shared plant's customerOrgId becomes that org, so plantCount, hasPlants, the overview's plants and the scoped (Installer) list all count it.

The row is an ordinary CustomerProfile: name = the user's display name, contact.email = their email, portalLevel: "NONE" (they reach their plants through their membership, not a portal), customerSince = the day they became a customer. No code or business. Owner 2026-11-27: customerType is RESIDENTIAL and city is the city of the first linked plant that has one (filled later when missing, never overwritten; counted in tiles.cities and matched by the city filter). Since 2026-11-27 its contact is completed on every read from the user's profile: name (display name), jobTitle and email fill whatever the stored contact leaves out; the stored email wins. Since 2026-11-25 the row also carries endUser (see End User access).

EventProfile
Share, or join with own plantscreated ACTIVE (a CHURNED one is reopened)
plant-unshares (removed 2026-11-27, ADR 0035)stays ACTIVE; the plant goes back to the Business (customerOrgId = the Business), so the customer can show 0 plants
:detach / :remove of the End Userclosed: CHURNED, portalLevel: NONE, closeReason END_USER_DETACHED / MEMBER_REMOVED. On the Crown-wide list the person shows as an Independent End User again only when their personal org is ACTIVE. A personal org kept CLOSED (the usual case for an End User who belonged to a Business) is neither listed nor counted (owner decision 2026-12-01, report Q3/F12)

Plants shared before 2026-11-25 need the human-run npm run backfill:end-user-customers.

plantCount is exact since 2026-11-25 (read from the same plantsLive that hasPlants filters on). Known gap: q: a new End User customer matches only once its search tokens are written. If a plant already named a separate customer (a company customer created on the web before 2026-11-20), sharing it moves it to the End User.

List — GET /v1/orgs/{orgId}/customers​

Query parameters: customerType, city (exact match, case-insensitive), status (ACTIVE default | CHURNED | ALL), portalLevel, tagId (one ULID), q (2–64 characters: matches name, code, contact name/email, city), sort (name | -name), hasPlants (true only), limit (1–50; default 15 on the first page, 10 with a cursor (lazy loading)), cursor.

  • sort is not allowed together with q. Together with tagId, only name is allowed. Breaking either rule → 400 VALIDATION_FAILED.
  • hasPlants=true keeps only customers with at least one live plant (ACTIVE or ARCHIVED). It works in every list mode (per-org, scoped, Crown-wide and one Business). The count is exact: it is read from the customer's ADR 0017 list entry (plantsLive), not from the approximate plantCount. A customer created before the customer list backfill ran has no entry and is left out. Any other value → 400 VALIDATION_FAILED. Pages can be short (issue #14, 2026-11-13).
  • q results come from search tokens that are updated asynchronously. A customer created a moment ago may not match yet.
  • q also matches the names of the customer's plants (2026-11-24, console item 4.4). The customer profile keeps a plantNames map ({plantId: name}) that the stream-router updates when a plant is created, renamed, moved to another customer or deleted; the profile change then re-tokenises the customer. Plants named before the change need npm run backfill:customer-plant-names followed by npm run rebuild:projections. On dev the stream-router is not deployed (KI-43), so there the map and tokens only refresh when those two scripts run.
  • tiles (active, totalOnRecord, noPortalAccess, capacityKwp, cities, approximate: true) is only returned on the first page. Keep it from that response; later pages omit it. Since 2026-11-25 (console requests C1/C2):
    • a scoped caller gets tiles and total too, counted over the customers they can see: active / totalOnRecord / total by status; noPortalAccess, cities and capacityKwp (each customer's plants in the Business) over their ACTIVE customers. Other filters and q are ignored, as on the org tiles.
    • the Crown-wide list carries tiles.cities across every Business (ACTIVE Business customers per normalised city), kept on the platform customer counters by the create, edit, close and create-plant-with-new-customer writes. Absent with operatorOrgId=none (Independent End Users have no city). Existing customers count only after npm run backfill:customer-list -- --stage dev --apply runs over every org (no --org); run on dev 2026-11-25 (Operations).
    • Q3 / F12 (2026-12-01). On dev, page 1 said 48 customers while paging returned 39. The 9 were Independent End User rows whose personal org is CLOSED: they were counted but never listed. The rule now (owner decision, option a): a personal org that is not ACTIVE is filed under CUSTOMERS#ALL#CLOSED and is neither listed nor counted. Existing rows move when a human reruns npm run backfill:customer-list -- --stage dev --apply over every org, which also rewrites the platform counters.
    • Bug fix 2026-12-02: on the Crown-wide list the rows and the tiles count the same customers. A suspended Business's customers are in both (rows flagged operatorSuspended: true). A closed Business's customers are in neither: :close subtracts them from the platform counters once, and backfill:customer-list leaves them out. To fix counters that were already wrong before this change, rerun the backfill over every org.
  • The cursor is tied to the exact filters and sort that produced it. If any filter changes, drop the cursor and start from page 1. Reusing it → 400 INVALID_CURSOR. Pages can come back short and still carry a nextCursor; keep paging until nextCursor is absent.

Illustrative 200:

{
"items": [{ "customerOrgId": "01JB…", "operatorOrgId": "01JA…", "code": "CU-0042", "name": "Alpha Mills",
"customerType": "INDUSTRIAL", "status": "ACTIVE", "portalLevel": "VIEW", "tagIds": [],
"plantCount": 3, "version": 4 }],
"nextCursor": "eyJ2Ijoy…",
"tiles": { "active": 120, "totalOnRecord": 131, "noPortalAccess": 9, "capacityKwp": 5400.5, "approximate": true },
"refs": { "orgs": {}, "tags": {} }
}

:::note Admin-web 2026-11-24 Page 1 of the list also carries total and tiles.cities[] (the city filter options). On the Crown-wide list, operatorOrgId=none keeps only Independent End Users. q matches the name, code, contact name, contact email, city and (since 2026-11-24) the customer's plant names — see the list rules above. See Admin-web list totals, counts and filter options. :::

Create — POST /v1/orgs/{orgId}/customers​

Body: name, customerType (required); business?, city?, contact?, customerSince?, portalLevel? (default VIEW), portalPermsLimit?, tagIds?, invite?: {email}, operatorOrgId?.

operatorOrgId (issue #14) names the Business that will own the customer. It is required when a Crown Super Admin / Administrator creates from the Crown org (see Crown org: any customer). Anywhere else it may only repeat {orgId}; another value → 400 VALIDATION_FAILED, details.field: "operatorOrgId".

portalPermsLimit (ADR 0014 phase 2a) narrows the portal tier per category — effective ceiling is min(tier ceiling, limit), never higher than the tier — except on a FULL portal, where portalPermsLimit may raise plants and sharing up to MANAGE (e.g. { "plants": "MANAGE", "sharing": "MANAGE" }, illustrative) so portal users can archive/restore their plants and re-share one plant with an individual. Without those keys FULL keeps EDIT for both; switching them on needs you to hold MANAGE there (else ESCALATION). Rules: needs customers ≥ MANAGE (403); with portalLevel: NONE → 422 VALIDATION_FAILED, details.field: "portalPermsLimit"; if the limited ceiling exceeds your own levels → 403 FORBIDDEN, details.reason: "ESCALATION". {} counts as no limit. On PATCH, setting portalLevel: NONE without portalPermsLimit clears a stored limit. Without a limit the pre-ADR rule stays: portalLevel above VIEW needs MANAGE. Since 2026-11-03 the escalation check runs on every tier or limit change (removing a limit included), except plain portalLevel: VIEW with no limit — the default portal, so customers-only roles such as Sales can still create customers. Example body (illustrative): {"name":"Ali Traders","customerType":"COMMERCIAL","portalLevel":"FULL","portalPermsLimit":{"commands":"NONE","devices":"VIEW"}}. See Roles & permissions.

Returns 201 with the flat profile, plus invitation: {inviteId, status: "PENDING_DELIVERY"} when invite was sent. Headers: Location: /v1/orgs/{orgId}/customers/{customerOrgId} and ETag. Emits org.upserted.v1.

Idempotency: generate one Idempotency-Key (1–128 characters [A-Za-z0-9_-]) per form submission, and send the same key again on retries.

SituationWhat the API does
Same key and same bodyReturns the original response with Idempotent-Replayed: true
Same key, different body422 IDEMPOTENCY_KEY_REUSED
First request still running409 IDEMPOTENCY_IN_PROGRESS. Wait and retry with the same key
No key428 PRECONDITION_REQUIRED, details.header: "Idempotency-Key"

Get / edit​

GET …/{customerOrgId} → 200 CustomerProfile + ETag.

PATCH …/{customerOrgId} with If-Match: "<version>". Send only the fields you are changing. null clears business, city, contact or lastContact. An empty body is rejected with 422.

  • Changing portalLevel needs customers ≥ MANAGE (otherwise 403 FORBIDDEN). Any change to it writes an access-log entry CUSTOMER_PORTAL_CHANGED. Lowering it also emits access.revoked.v1 (reason PORTAL_NARROWED), which logs out portal users whose access was reduced.
  • portalPermsLimit replaces the whole map; null or {} removes it. Same 403/422 rules as on create, checked against the resulting portalLevel. Lowering any category also counts as narrowing (PORTAL_NARROWED). The access-log entry carries changes.portalPermsLimit: {from, to}.
  • A rename emits org.upserted.v1.
  • A CHURNED customer can only have lastContact edited. Any other field → 409 INVALID_STATE.

Close — POST …/{customerOrgId}:close​

If-Match is required. Idempotency-Key is optional; send one if the client might retry. The body is optional: {reason?: ≤200}.

The result: status becomes CHURNED, portalLevel becomes NONE, and closedAt, closedBy and closeReason are set. It also writes access-log CUSTOMER_CLOSED and emits access.revoked.v1 (reason CUSTOMER_CLOSED). Returns 200 with the closed profile and a new ETag. The account's plants are untouched.

End User customer (2026-11-30, BE-4; deployed to dev 2026-11-30). When the closed customer is a connected End User's personal org (source: END_USER), the close then runs the same steps as :detach: their End User membership in the Business is removed (access ends at once) and their plants move back to their personal org. This runs after the close is committed and is best effort: if it fails, the close stays and the Business can still :detach the member from Team. Before this fix the End User stayed ACTIVE with full access after the close.

Open work orders and open alerts (BE-06, 2026-12-02). openWorkOrders (the COUNT#WOCUST#OPEN#<c> counter) is returned when the caller has service ≥ VIEW in the operator org, and on the Crown-wide list when the platform role has service ≥ VIEW (personal rows included). openAlerts {critical, warning, info, total} is on every row: a snapshot TCP sends as customer.alerts.v1 whenever an alert on one of the customer's plants opens, closes or changes severity (and for every customer when TCP's persistence worker starts). HTTP stores it at ORG#<operator>/COUNT#ALERTSCUST#<customer> (highest seq wins) and never reads telemetry. Until TCP has sent a snapshot the row shows zeros. Needs the integration stack (busEnabled) and TCP's relay deployed.

Overview (drawer) — GET …/{customerOrgId}/overview​

One call returns:

  • profile
  • plants (first 25 rows, WebPlantListItem, filtered to the plants the caller can see; nextCursor → continue with GET /v1/orgs/{orgId}/plants?customerOrgId=…)
  • devices, service, reports
  • permissions (portalLevel, portalPermsLimit? when set, portalUserCount?, shares)
  • refs

devices is always available (N-46 per-customer plant sums, approximate). service needs service ≥ VIEW and reports needs reports ≥ VIEW; reports.lastDeliveredAt is the customer's last delivered report (absent when none). Hide a panel when available is false; do not show zeros. Alerts and health come from the TCP backend over WSS, not from here.

End User access (2026-11-25)​

Console request 2026-11-25 (Customers page). Built and unit-tested; not yet run against a deployment.

  • Contact on a personal row. On the Crown-wide list, detail and overview, an Independent End User's row carries contact.name (their display name), contact.jobTitle (2026-11-27) and contact.email (their account email), read from their user profile. The personal org's owner is its creator. RBAC-S7 applies: omitted below customers MANAGE.
  • Counts and dates on a personal row (2026-11-27). deviceCount, capacityKwp (with approximate: true) come from the personal org's own plant sums, on the list, detail and overview (devices is available: true). customerSince is the personal org's creation date.
  • Type and city (owner 2026-11-27). Every End User row has customerType: "RESIDENTIAL". city is the city of their first plant that has one: stored on a Business's End User customer row, read live for a personal row. The customerType and city filters (and q) include personal rows; tiles.cities counts Business End User customers but not personal rows. Rows linked before 2026-11-27 get both when npm run backfill:end-user-customers -- --stage dev --apply is rerun (human-run).
  • Not available for End Users. contact.phone is never set: the user profile does not collect a phone.
  • Portal access vs account access. portalLevel is the customer portal signal only. An End User (personal row or a Business's End User customer) is always portalLevel: "NONE" and reaches their plants through their account and membership. Whether they can sign in is endUser.accountStatus: SUSPENDED (2026-12-01) when their membership in the row's org is suspended — the personal org on a personal row, else operatorOrgId; BLOCKED when a block from before ADR 0036 is still in force (it wins over SUSPENDED); otherwise ACTIVE. The console should label End Users' access from endUser, not "None".
  • Manage access. portalLevel on personal and End User rows stays not editable (PATCH on a personal row is still 409 INVALID_STATE). Use endUser.sub instead:
    • Crown staff (team ≥ MANAGE): POST /v1/orgs/{operatorOrgId}/members/{endUser.sub}:suspend / :restore (Activate). For an Independent End User {operatorOrgId} is their personal org (the row's own customerOrgId); Super Admin and Administrator reach it through the Crown platform fallback, access-logged there. :block is retired (ADR 0036, 2026-11-27): 410 BLOCK_RETIRED; :unblock remains only for accounts blocked before. The text below describes the former :block. Blocking sets tokensValidAfter, signs the user out in Cognito and emits access.revoked.v1 USER_BLOCKED, so a signed-in user loses access at once and cannot sign in later. ACCOUNT_AND_PLANTS also suspends their plants.
    • A Business never activates or deactivates an End User (owner decision 2026-11-25). It manages plants only (share, unshare, detach). POST /v1/orgs/{orgId}/members/{sub}:suspend / :restore on an End User by anyone other than a Super Admin or Administrator → 403 FORBIDDEN, details.reason: "END_USER_CROWN_ONLY". Crown staff may still use those routes, and :unblock for accounts blocked before. The console shows Manage access to Admin and Super Admin only.
  • endUser is returned only to callers with customers ≥ MANAGE, like contact. For a Business it is read-only.

Crown org: any customer​

Issue #14 (ADR 0017 §5), committed 2026-11-13, not deployed. A Crown Super Admin or Administrator (ACTIVE, scope ALL) can act on any customer from the Crown org's own path, without switching to the owning Business. These are the rows the Crown-wide list returns. Other callers in the Crown org keep the per-org behaviour.

RouteBusiness customerIndependent End User (personal org)
GET /v1/orgs/{crownOrgId}/customers/{customerOrgId}The Business's profileA read-only profile: personal: true, operatorOrgId = its own id, portalLevel: "NONE", tagIds: [], exact plantCount, version = the org's version, plus contact and endUser (customers ≥ MANAGE, 2026-11-25), deviceCount, capacityKwp, approximate, customerSince, customerType: RESIDENTIAL and first-plant city (2026-11-27)
GET …/{customerOrgId}/overviewThe Business's drawerThat profile, its plants from the platform-wide plant list, devices from its own plant sums (2026-11-27), and service, reports and permissions.shares as available: false
PATCH …/{customerOrgId}Edits the Business's relationship409 INVALID_STATE (there is no relationship to edit)
POST …/{customerOrgId}:closeCloses the Business's relationship409 INVALID_STATE
POST /v1/orgs/{crownOrgId}/customersCreates the customer under the Business named by operatorOrgId (required)—
  • The owning Business is found from the customer's relationship. The call then runs in that Business through the platform fallback, with the platform role's own levels. The usual portal and escalation checks apply (a Super Admin is exempt). Create, PATCH and :close write a PLATFORM_ACCESS access-log entry in that Business.
  • Create without operatorOrgId → 400 VALIDATION_FAILED, details.field: "operatorOrgId". An operatorOrgId that is not an ACTIVE, non-personal Business (unknown, suspended, personal, or the Crown org itself) → 404 NOT_FOUND. The Location header keeps the Crown path, which resolves the new customer.
  • An unknown customerOrgId, or a customer of a closed Business → 404 NOT_FOUND. A customer of a suspended Business can be read (GET, overview) but PATCH / :close → 404 NOT_FOUND (Bug fix 2026-12-02).

Errors and what the FE should do​

StatusCodeWhenFE action
400VALIDATION_FAILEDbad or unknown query parameter (details.allowed), X-Org-Id ≠ path org; details.field: "operatorOrgId" when create on the Crown org has none, or create elsewhere names another orgFix the request; this is a bug, not something the user can fix
400INVALID_CURSORcursor reused with different filters, or malformedDrop the cursor and reload page 1
400MALFORMED_REQUESTbody is not valid JSONBug
403FORBIDDENcustomers level too low (including portalLevel or portalPermsLimit changes without MANAGE); details.reason: "ESCALATION" when the portal ceiling (any tier above VIEW, or any limit change incl. removal) exceeds your own levelsHide or disable the action for this role
404NOT_FOUNDnot a customer of this org, or an unknown colon-verb; Crown org: unknown customer, customer of a closed Business (a suspended one's only on PATCH / :close), or an operatorOrgId that is not a usable BusinessRemove the row and show "customer not found"
409VERSION_CONFLICTstale If-Match (details.currentVersion)Refetch, show the user the latest values, and let them reapply
409INVALID_STATEclose on a customer that is already closed; editing a CHURNED customer (other than lastContact); Crown org: PATCH or :close on an Independent End User's personal rowRefetch and show it as closed
409CONFLICTa concurrent change or code allocation collidedRetry once with the same key and If-Match
409IDEMPOTENCY_IN_PROGRESSthe first request with this key is still runningRetry after a short wait with the same key
415UNSUPPORTED_MEDIA_TYPEmissing JSON content typeBug
422VALIDATION_FAILEDbody errors (details.fieldErrors); tag missing, inactive, or not a customer tag; details.field: "portalPermsLimit" when a limit is sent with portal level NONEShow the errors on the form fields
422IDEMPOTENCY_KEY_REUSEDsame key, different bodyGenerate a new key for the new submission
428PRECONDITION_REQUIREDmissing Idempotency-Key or If-Match (details.header)Bug: always send the header
503DEPENDENCY_UNAVAILABLEDynamoDB throttledRetry with backoff, using the same key

Web console additions​

See Web console additions (N-37 … N-51) for the newer, not-yet-deployed fields and routes on this area.