# User

User information endpoints

## Get current user information

> Returns information about the currently authenticated user including profile data,\
> preferences, and selected address.

```json
{"openapi":"3.1.0","info":{"title":"CMS API - Content Management & Pages","version":"1.0.0"},"tags":[{"name":"User","description":"User information endpoints"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/current_user/":{"get":{"tags":["User"],"operationId":"getCurrentUser","summary":"Get current user information","description":"Returns information about the currently authenticated user including profile data,\npreferences, and selected address.","parameters":[{"$ref":"#/components/parameters/CookieHeader"}],"responses":{"200":{"description":"User information retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}}},"schemas":{"CurrentUser":{"type":"object","description":"Information about the currently authenticated user. Contains profile data (name, email, phone),\npreferences (email/SMS/call permissions), segment information (price list, stock list, currency),\nselected delivery address, and authentication status. Requires authenticated session cookie.","required":["pk"],"properties":{"pk":{"type":"integer"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"call_allowed":{"type":"boolean"},"attributes":{"type":"object","description":"Additional user attributes","additionalProperties":true},"hashed_email":{"type":"string","description":"MD5 hash of the email address"},"date_joined":{"type":"string","format":"date-time"},"last_login":{"type":"string","format":"date-time"},"gender":{"type":"string","enum":["M","F","O"]},"date_of_birth":{"type":"string","format":"date"},"is_email_verified":{"type":"boolean","description":"Whether the user's email is verified"},"is_social_networks_connected":{"type":"boolean","description":"Whether the user has connected social accounts"},"segment":{"type":"object","description":"User's current segment information","properties":{"pk":{"type":"integer"},"price_list":{"type":"integer"},"stock_list":{"type":"integer"},"currency":{"type":"string"}}},"client_type":{"type":"string","description":"Client type identifier"},"selected_address":{"type":"object","description":"Currently selected delivery address","properties":{"pk":{"type":"integer"},"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}}}},"ErrorResponse":{"type":"object","description":"Standard error response format for API errors. Contains error detail message and optional error code.\nUsed for authentication errors and other API-level error responses.","required":["detail"],"properties":{"detail":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Optional error code for programmatic error handling"}}}},"responses":{"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/cms/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
