{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/demandware/json-schema/demandware-passwordless-login-request-schema.json",
  "title": "PasswordlessLoginRequest",
  "description": "A request for a passwordless login token. This is only available for registered users using B2C Commerce.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/demandware-auth-v1-openapi.yml#/components/schemas/PasswordlessLoginRequest",
  "required": [
    "channel_id",
    "mode",
    "user_id"
  ],
  "type": "object",
  "properties": {
    "user_id": {
      "maxLength": 128,
      "type": "string",
      "description": "User ID for logging in."
    },
    "mode": {
      "type": "string",
      "description": "Password Action delivery modes",
      "enum": [
        "callback",
        "sms",
        "email"
      ]
    },
    "locale": {
      "type": "string",
      "description": "The locale of the template. Required when the mode is `email` or `sms`."
    },
    "usid": {
      "type": "string",
      "description": "The shopper's unique identifier, if known. If not provided, a new USID is generated."
    },
    "channel_id": {
      "maxLength": 100,
      "type": "string",
      "description": "The channel (B2C Commerce site) that the user is associated with."
    },
    "callback_uri": {
      "type": "string",
      "description": "The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body.\n\nWildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url."
    },
    "last_name": {
      "maxLength": 100,
      "type": "string",
      "description": "The user's last name. Required when `register_customer` is `true`. \nThe `last_name` parameter is not used when `register_customer` parameter is not added or is `false`."
    },
    "email": {
      "maxLength": 128,
      "type": "string",
      "description": "The user's email address. Required when `register_customer` is `true` and `user_id` is not an email address. \nThe `email` parameter is not used when `register_customer` parameter is not added or is `false`."
    },
    "first_name": {
      "maxLength": 100,
      "type": "string",
      "description": "The user's first name. Optional when `register_customer` is `true`. \nThe `first_name` parameter is not used when `register_customer` parameter is not added or is `false`."
    },
    "phone_number": {
      "maxLength": 48,
      "type": "string",
      "description": "The user's phone number. Optional when `register_customer` is `true`. \nThe `phone_number` parameter is not used when `register_customer` parameter is not added or is `false`."
    },
    "customer_no": {
      "maxLength": 100,
      "type": "string",
      "description": "The customer number assigned to the shopper profile when `register_customer` is set to `true`. \nIf the `customer_no` already exists, the request fails. \nThe `customer_no` parameter is optional and only used when `register_customer` is set to `true`."
    }
  }
}