# Models

## The AjaxSignupResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"AjaxSignupResponse":{"type":"object","properties":{"location":{"type":"string","description":"URL to redirect to after successful signup."}}}}}}
```

## The AkifastAccountCheckRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"AkifastAccountCheckRequest":{"type":"object","required":["uid"],"properties":{"uid":{"type":"string","description":"The unique identifier for the Akifast social account. Validated against existing social accounts."}}}}}}
```

## The ActivateCurrencyRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"ActivateCurrencyRequest":{"type":"object","required":["currency_code"],"properties":{"currency_code":{"type":"string","description":"The currency code to activate (e.g., 'TRY', 'USD'). Must be one of the available currencies."}}}}}}
```

## The PasswordResetRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"PasswordResetRequest":{"type":"object","required":["new_password1","new_password2"],"properties":{"new_password1":{"type":"string","format":"password","description":"The new password. Validated against the system's password validators (e.g., minimum length, common passwords)."},"new_password2":{"type":"string","format":"password","description":"Confirmation of the new password. Must match 'new_password1'."}}}}}}
```

## The ContactUsRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"ContactUsRequest":{"type":"object","required":["subject","full_name","email","message"],"properties":{"subject":{"type":"integer","description":"ID of the contact subject. Determines if an order reference is required."},"full_name":{"type":"string","maxLength":70},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":70},"message":{"type":"string"},"file":{"type":"string","format":"binary","description":"Optional file attachment. Validated for allowed extensions and size limits."},"order":{"type":"integer","description":"ID of the related order. Required if the selected subject implies an order context. Must belong to the authenticated user."},"operation":{"type":"string","maxLength":30,"description":"Operation type key. Validated against configured contact email recipients (`CONTACT_US_EMAIL_TO`)."}}}}}}
```

## The ContactUsSubject object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"ContactUsSubject":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the contact subject."},"text":{"type":"string","description":"Localized subject text."},"is_order_needed":{"type":"boolean","description":"Indicates if an order ID is required for this subject."}}}}}}
```

## The Conversation object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"Conversation":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the conversation."},"subject":{"type":"string","description":"The subject of the conversation."},"user":{"$ref":"#/components/schemas/UserMessage","description":"The user associated with the conversation."},"datasource":{"$ref":"#/components/schemas/DataSource","description":"The data source associated with the conversation (if applicable)."},"item_object":{"type":"object","description":"Details of the related item (Product or OrderItem). Structure depends on `item_content`."},"item_content":{"type":"string","description":"Model name of the item content (e.g., 'product', 'orderitem')."},"message_set":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"List of messages in the conversation."},"conversation_type":{"$ref":"#/components/schemas/EnumValue","description":"The type of conversation."},"last_message_date":{"type":"string","format":"date-time","description":"Timestamp of the last message in the conversation."},"is_public":{"type":"boolean","description":"Indicates if the conversation is public."},"is_answered":{"type":"boolean","description":"Indicates if the conversation has been answered."}}},"UserMessage":{"type":"object","properties":{"id":{"type":"integer","description":"User ID."},"first_name":{"type":"string","description":"User's first name."},"last_name":{"type":"string","description":"User's last name."},"email":{"type":"string","description":"User's email address."},"phone":{"type":"string","description":"User's phone number."},"gender":{"$ref":"#/components/schemas/EnumValue","description":"User's gender."}}},"EnumValue":{"type":"object","properties":{"value":{"type":"string","description":"The internal value of the enum choice."},"label":{"type":"string","description":"The human-readable label of the enum choice."}}},"DataSource":{"type":"object","properties":{"id":{"type":"integer","description":"DataSource ID."},"name":{"type":"string","description":"Name of the data source."}}},"Message":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the message."},"message_content":{"type":"string","description":"The content of the message."},"user_type":{"$ref":"#/components/schemas/EnumValue","description":"The type of user who sent the message."},"content_object":{"$ref":"#/components/schemas/MessageContent","description":"Details of the sender (User or DataSource)."},"content_type":{"type":"string","description":"The type of the sender (e.g., 'user', 'datasource')."},"created_date":{"type":"string","format":"date-time","description":"Timestamp when the message was created."}}},"MessageContent":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the sender."},"email":{"type":"string","description":"Email of the sender."},"first_name":{"type":"string","description":"First name of the sender."},"last_name":{"type":"string","description":"Last name of the sender."},"phone":{"type":"string","description":"Phone number of the sender."},"gender":{"type":"string","description":"Gender of the sender."},"name":{"type":"string","description":"Name of the sender (if DataSource)."},"title":{"type":"string","description":"Title of the sender (if applicable)."}}}}}}
```

## The CreateConversationRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"CreateConversationRequest":{"type":"object","required":["message_content","user_type","content_id","content_type"],"properties":{"message_content":{"type":"string","maxLength":500,"description":"The body of the message."},"user_type":{"type":"string","enum":["guest","registered"],"description":"Type of user creating the conversation."},"content_id":{"type":"integer","minimum":1,"description":"ID of the related content object (e.g., User ID)."},"content_type":{"type":"string","enum":["user","datasource"],"description":"Slug of the content type. Determines the context of the conversation."},"conversation":{"type":"integer","description":"ID of existing conversation to reply to."},"datasource":{"type":"integer","description":"ID of the datasource (if applicable)."},"user":{"type":"integer","description":"ID of the user."},"subject":{"type":"string","maxLength":500,"description":"Subject of the conversation."},"item_content":{"type":"string","enum":["product","orderitem"],"description":"Model name of the item content. Used to link conversation to specific items."},"item_id":{"type":"integer","description":"ID of the specific item."},"conversation_type":{"type":"string","enum":["message","question","review"],"description":"Type of conversation."},"is_public":{"type":"boolean","description":"Whether the conversation is public."}},"description":"Request body for creating a conversation or message.\n\n**Validation:**\n- `DataSource` cannot reply to a review.\n- Users must match the authenticated user and content owner."}}}}
```

## The Message object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"Message":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the message."},"message_content":{"type":"string","description":"The content of the message."},"user_type":{"$ref":"#/components/schemas/EnumValue","description":"The type of user who sent the message."},"content_object":{"$ref":"#/components/schemas/MessageContent","description":"Details of the sender (User or DataSource)."},"content_type":{"type":"string","description":"The type of the sender (e.g., 'user', 'datasource')."},"created_date":{"type":"string","format":"date-time","description":"Timestamp when the message was created."}}},"EnumValue":{"type":"object","properties":{"value":{"type":"string","description":"The internal value of the enum choice."},"label":{"type":"string","description":"The human-readable label of the enum choice."}}},"MessageContent":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the sender."},"email":{"type":"string","description":"Email of the sender."},"first_name":{"type":"string","description":"First name of the sender."},"last_name":{"type":"string","description":"Last name of the sender."},"phone":{"type":"string","description":"Phone number of the sender."},"gender":{"type":"string","description":"Gender of the sender."},"name":{"type":"string","description":"Name of the sender (if DataSource)."},"title":{"type":"string","description":"Title of the sender (if applicable)."}}}}}}
```

## The MessageContent object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"MessageContent":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the sender."},"email":{"type":"string","description":"Email of the sender."},"first_name":{"type":"string","description":"First name of the sender."},"last_name":{"type":"string","description":"Last name of the sender."},"phone":{"type":"string","description":"Phone number of the sender."},"gender":{"type":"string","description":"Gender of the sender."},"name":{"type":"string","description":"Name of the sender (if DataSource)."},"title":{"type":"string","description":"Title of the sender (if applicable)."}}}}}}
```

## The UserMessage object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"UserMessage":{"type":"object","properties":{"id":{"type":"integer","description":"User ID."},"first_name":{"type":"string","description":"User's first name."},"last_name":{"type":"string","description":"User's last name."},"email":{"type":"string","description":"User's email address."},"phone":{"type":"string","description":"User's phone number."},"gender":{"$ref":"#/components/schemas/EnumValue","description":"User's gender."}}},"EnumValue":{"type":"object","properties":{"value":{"type":"string","description":"The internal value of the enum choice."},"label":{"type":"string","description":"The human-readable label of the enum choice."}}}}}}
```

## The DataSource object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"DataSource":{"type":"object","properties":{"id":{"type":"integer","description":"DataSource ID."},"name":{"type":"string","description":"Name of the data source."}}}}}}
```

## The UserEmail object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"UserEmail":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the email address. Read-only."},"email":{"type":"string","format":"email","description":"The email address. Required when adding a new email."},"verified":{"type":"boolean","description":"Indicates if the email address has been verified. Read-only."},"primary":{"type":"boolean","description":"Indicates if this is the primary email address for the user. Read-only."}}}}}}
```

## The UserEmailChangeRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"UserEmailChangeRequest":{"type":"object","required":["user","email","password"],"properties":{"user":{"type":"integer","description":"User ID."},"email":{"type":"string","format":"email","description":"The new email address. Must be different from the current email and not already in use."},"password":{"type":"string","format":"password","description":"The user's current password. Required for verification."}}}}}}
```

## The UserCityRequest object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"UserCityRequest":{"type":"object","required":["city"],"properties":{"city":{"type":"string","description":"City name or ID. Validated against available cities in the system."}}}}}}
```

## The EnumValue object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"EnumValue":{"type":"object","properties":{"value":{"type":"string","description":"The internal value of the enum choice."},"label":{"type":"string","description":"The human-readable label of the enum choice."}}}}}}
```

## The ValidationErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"ValidationErrorResponse":{"type":"object","description":"Standard DRF validation error response","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}
```

## The DetailErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"DetailErrorResponse":{"type":"object","properties":{"detail":{"type":"string"}}}}}}
```

## The SimpleErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"SimpleErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The PasswordResetErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"PasswordResetErrorResponse":{"type":"object","properties":{"validlink":{"type":"boolean"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}
```

## The CaptchaErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"components":{"schemas":{"CaptchaErrorResponse":{"type":"object","properties":{"form_errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}
```


---

# 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/users/module-2/models.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.
