> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/users/module-4/profile.md).

# Profile

Authenticated profile retrieval and updates

## GET /users/profile/

> Retrieve user profile

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}}},"schemas":{"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile/":{"get":{"tags":["Profile"],"operationId":"getProfile","summary":"Retrieve user profile","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"}],"responses":{"200":{"description":"Profile retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"401":{"description":"Authentication required"}}}}}}
```

## Update user profile

> Updates profile fields. Required fields are driven by\
> \`USER\_REQUIRED\_FIELDS\` (System Configuration).

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}},"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","required":true,"description":"CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)","schema":{"type":"string"}}},"schemas":{"UserProfileUpdate":{"allOf":[{"$ref":"#/components/schemas/UserProfile"}]},"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile/":{"put":{"tags":["Profile"],"operationId":"updateProfile","summary":"Update user profile","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"},{"$ref":"#/components/parameters/CSRFTokenHeader"}],"description":"Updates profile fields. Required fields are driven by\n`USER_REQUIRED_FIELDS` (System Configuration).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"}}}}}}
```

## PATCH /users/profile/

> Partially update user profile

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}},"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","required":true,"description":"CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)","schema":{"type":"string"}}},"schemas":{"UserProfileUpdate":{"allOf":[{"$ref":"#/components/schemas/UserProfile"}]},"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile/":{"patch":{"tags":["Profile"],"operationId":"partialUpdateProfile","summary":"Partially update user profile","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"},{"$ref":"#/components/parameters/CSRFTokenHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"}}}}}}
```

## GET /users/profile-with-loyalty/

> Retrieve loyalty-enabled profile

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}}},"schemas":{"UserProfileWithLoyalty":{"allOf":[{"$ref":"#/components/schemas/UserProfile"},{"type":"object","required":["code","resend"],"properties":{"code":{"type":["string","null"],"description":"Verification code for phone changes"},"resend":{"type":"boolean","description":"Request a new verification code"}}}]},"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile-with-loyalty/":{"get":{"tags":["Profile"],"operationId":"getProfileWithLoyalty","summary":"Retrieve loyalty-enabled profile","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"}],"responses":{"200":{"description":"Profile retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithLoyalty"}}}},"401":{"description":"Authentication required"}}}}}}
```

## Update profile with loyalty sync

> Updates profile and, when configured, synchronizes loyalty data using\
> \`CUSTOMER\_LOYALTY\_CARD\_SERVICE\` (Dynamic Configuration). Phone changes\
> require SMS verification (\`code\` + \`resend\` flow).

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}},"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","required":true,"description":"CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)","schema":{"type":"string"}}},"schemas":{"UserProfileWithLoyaltyUpdate":{"allOf":[{"$ref":"#/components/schemas/UserProfileWithLoyalty"}]},"UserProfileWithLoyalty":{"allOf":[{"$ref":"#/components/schemas/UserProfile"},{"type":"object","required":["code","resend"],"properties":{"code":{"type":["string","null"],"description":"Verification code for phone changes"},"resend":{"type":"boolean","description":"Request a new verification code"}}}]},"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile-with-loyalty/":{"put":{"tags":["Profile"],"operationId":"updateProfileWithLoyalty","summary":"Update profile with loyalty sync","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"},{"$ref":"#/components/parameters/CSRFTokenHeader"}],"description":"Updates profile and, when configured, synchronizes loyalty data using\n`CUSTOMER_LOYALTY_CARD_SERVICE` (Dynamic Configuration). Phone changes\nrequire SMS verification (`code` + `resend` flow).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithLoyaltyUpdate"}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithLoyalty"}}}},"202":{"description":"Verification code sent for phone confirmation"},"400":{"description":"Validation error"},"401":{"description":"Authentication required"}}}}}}
```

## PATCH /users/profile-with-loyalty/

> Partially update profile with loyalty sync

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Profile","description":"Authenticated profile retrieval and updates"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"security":[{"SessionCookie":[]}],"components":{"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"header","name":"Cookie","description":"Session cookie (e.g., `sessionid=abc123`)"}},"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}},"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","required":true,"description":"CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)","schema":{"type":"string"}}},"schemas":{"UserProfileWithLoyaltyUpdate":{"allOf":[{"$ref":"#/components/schemas/UserProfileWithLoyalty"}]},"UserProfileWithLoyalty":{"allOf":[{"$ref":"#/components/schemas/UserProfile"},{"type":"object","required":["code","resend"],"properties":{"code":{"type":["string","null"],"description":"Verification code for phone changes"},"resend":{"type":"boolean","description":"Request a new verification code"}}}]},"UserProfile":{"type":"object","required":["id","first_name","last_name","email_allowed","sms_allowed","whatsapp_allowed","call_allowed","email","phone","gender","language_code","attributes","date_joined"],"properties":{"id":{"type":"integer"},"first_name":{"type":"string","maxLength":50},"last_name":{"type":"string","maxLength":50},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"whatsapp_allowed":{"type":"boolean"},"call_allowed":{"type":["boolean","null"]},"avatar":{"type":["string","null"],"format":"binary"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["male","female"]},"genders":{"type":"array","description":"Allowed gender values","items":{"type":"string","enum":["male","female"]}},"language_code":{"type":"string"},"attributes":{"type":"object","additionalProperties":true},"date_joined":{"type":"string","format":"date-time"}}}}},"paths":{"/users/profile-with-loyalty/":{"patch":{"tags":["Profile"],"operationId":"partialUpdateProfileWithLoyalty","summary":"Partially update profile with loyalty sync","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"},{"$ref":"#/components/parameters/CSRFTokenHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithLoyaltyUpdate"}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileWithLoyalty"}}}},"202":{"description":"Verification code sent for phone confirmation"},"400":{"description":"Validation error"},"401":{"description":"Authentication required"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/users/module-4/profile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
