AlmondTill/G3N API

resetConsumerPassword

mutation · in the family Identity and access

What it does

Reset a shopper’s password, as staff — the recovery lane.

Staff: set a consumer's password credential directly: writes a NEW argon2id credential; arms self-service on a staff-created profile; refused on a doomed (de-identified) consumer. Existing sessions stay live — pair with revokeConsumerSessions for a takeover response. Template class; requires the unrestricted capability.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Identity and access — Who can sign in and what each role allows — users, roles and their assignments.

Roles that may call it:

Careful

An account-takeover-sensitive act; it is recorded, and the customer should be verified first.

Arguments

NameTypeRequiredNotes
consumerIdID ID!yes
newPasswordString String!yes

Returns

Boolean Boolean! — True or false.

Example request

graphql
mutation ExampleResetConsumerPassword($consumerId: ID!, $newPassword: String!) {
  resetConsumerPassword(consumerId: $consumerId, newPassword: $newPassword)
}

Variables:

json
{
  "consumerId": "01900000-0000-7000-8000-3cbb3ce90000",
  "newPassword": "<new password>"
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "resetConsumerPassword": true
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer