User
Type: schema
TypeScript Definition
typescript
User: {{
/** @description The unique ID of the user. */
readonly id: string;
/** @description User’s first name. */
first_name: string | null;
/** @description User’s last name. */
last_name: string | null;
/**
* Format: email
* @description User’s email I’d.
*/
email: string | null;
/** @description Boolean indicating whether the email is verified. */
readonly is_email_verified: boolean;
/** @description 10 digit phone number without country code. */
phone: string | null;
/**
* @description Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
* Use this key along with phone. Not necessary for email.
*/
country_code: string | null;
/** @description Boolean indicating whether the phone is verified. */
readonly is_phone_verified: boolean;
/** @description URL to the user's profile image. */
profile_image_url: string | null;
/** @description Indicates whether the user is anonymous. */
readonly is_anonymous: boolean;
/** @description Indicates whether the user is currently logged in. */
readonly is_logged_in: boolean;
login_methods: ("email" | "phone" | "whatsapp" | "password")[];
/** @description User's notification preferences are categorized by transactional, promotional, and newsletter types. */
notification_preferences: components["schemas"]["NotificationPreferences"];
/**
* Format: datetime
* @description Timestamps indicate when the user's account was created.
*/
readonly created_at?: string;
/**
* Format: datetime
* @description Timestamps indicating when the user account was last modified.
*/
readonly modified_at?: string;
};
/** ProductVariant */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["NotificationPreferences"] | NotificationPreferences |
OpenAPI Schema
json
{
"title": "User",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/User",
"description": "API reference for the User schema"
},
"required": [
"id",
"first_name",
"last_name",
"email",
"is_email_verified",
"phone",
"country_code",
"is_phone_verified",
"profile_image_url",
"is_anonymous",
"is_logged_in",
"login_methods",
"notification_preferences"
],
"properties": {
"id": {
"description": "The unique ID of the user.",
"type": "string",
"readOnly": true
},
"first_name": {
"description": "User’s first name.",
"type": [
"string",
"null"
]
},
"last_name": {
"description": "User’s last name.",
"type": [
"string",
"null"
]
},
"email": {
"description": "User’s email I’d.",
"type": [
"string",
"null"
],
"format": "email"
},
"is_email_verified": {
"description": "Boolean indicating whether the email is verified.",
"type": "boolean",
"readOnly": true
},
"phone": {
"description": "10 digit phone number without country code.",
"type": [
"string",
"null"
]
},
"country_code": {
"description": "Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.\nUse this key along with phone. Not necessary for email.",
"type": [
"string",
"null"
]
},
"is_phone_verified": {
"description": "Boolean indicating whether the phone is verified.",
"type": "boolean",
"readOnly": true
},
"profile_image_url": {
"description": "URL to the user's profile image.",
"type": [
"string",
"null"
]
},
"is_anonymous": {
"description": "Indicates whether the user is anonymous.",
"type": "boolean",
"readOnly": true
},
"is_logged_in": {
"description": "Indicates whether the user is currently logged in.",
"type": "boolean",
"readOnly": true
},
"login_methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"email",
"phone",
"whatsapp",
"password"
]
}
},
"notification_preferences": {
"description": "User's notification preferences are categorized by transactional, promotional, and newsletter types.",
"$ref": "#/components/schemas/NotificationPreferences"
},
"created_at": {
"description": "Timestamps indicate when the user's account was created.",
"type": "string",
"format": "datetime",
"readOnly": true
},
"modified_at": {
"description": "Timestamps indicating when the user account was last modified.",
"type": "string",
"format": "datetime",
"readOnly": true
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions