# Social

Social account integration endpoints

## Check Akifast Account Existence

> Checks if a user has an existing Akifast account using their UID.\
> \
> \*\*Business Logic:\*\*\
> \- Verifies if the provided UID exists in the \`SocialAccount\` records for the 'akifast' provider.

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"tags":[{"name":"Social","description":"Social account integration endpoints"}],"servers":[{"description":"Server base URL","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce server URL"}}}],"security":[],"paths":{"/social/has-akifast/":{"post":{"tags":["Social"],"summary":"Check Akifast Account Existence","description":"Checks if a user has an existing Akifast account using their UID.\n\n**Business Logic:**\n- Verifies if the provided UID exists in the `SocialAccount` records for the 'akifast' provider.","operationId":"checkAkifastAccount","parameters":[{"$ref":"#/components/parameters/CSRFTokenHeader"},{"$ref":"#/components/parameters/CookieHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AkifastAccountCheckRequest"}}}},"responses":{"200":{"description":"Account exists"},"400":{"description":"Invalid UID or account does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}}},"components":{"parameters":{"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","description":"CSRF token for write operations (POST, PUT, PATCH, DELETE).\nRequired for security when using session authentication.\nObtain token from cookie 'csrftoken' or meta tag in HTML.","required":true,"schema":{"type":"string"}},"CookieHeader":{"name":"Cookie","in":"header","description":"Session ID and CSRF token cookies.\nFormat: `sessionid=<id>; osessionid=<id>; csrftoken=<token>`","required":true,"schema":{"type":"string"}}},"schemas":{"AkifastAccountCheckRequest":{"type":"object","required":["uid"],"properties":{"uid":{"type":"string","description":"The unique identifier for the Akifast social account. Validated against existing social accounts."}}},"ValidationErrorResponse":{"type":"object","description":"Standard DRF validation error response","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}
```

## Social Signup Form

> Renders the social signup form.\
> \
> \*\*Note:\*\* This endpoint returns HTML content for the signup page.

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"tags":[{"name":"Social","description":"Social account integration endpoints"}],"servers":[{"description":"Server base URL","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce server URL"}}}],"security":[{"cookieAuth":[]}],"components":{"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}}},"paths":{"/social/signup/":{"get":{"tags":["Social"],"summary":"Social Signup Form","description":"Renders the social signup form.\n\n**Note:** This endpoint returns HTML content for the signup page.","operationId":"getSocialSignupForm","responses":{"200":{"description":"HTML Signup Form","content":{"text/html":{"schema":{"type":"string"}}}}}}}}}
```

## Complete Social Signup

> Completes the signup process for a social account.\
> \
> \*\*Business Logic:\*\*\
> \- Handles the form submission for social account registration.\
> \- Creates the user account and links the social account.

```json
{"openapi":"3.1.0","info":{"title":"User API","version":"1.0.0"},"tags":[{"name":"Social","description":"Social account integration endpoints"}],"servers":[{"description":"Server base URL","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce server URL"}}}],"security":[{"cookieAuth":[]}],"components":{"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"parameters":{"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","description":"CSRF token for write operations (POST, PUT, PATCH, DELETE).\nRequired for security when using session authentication.\nObtain token from cookie 'csrftoken' or meta tag in HTML.","required":true,"schema":{"type":"string"}},"CookieHeader":{"name":"Cookie","in":"header","description":"Session ID and CSRF token cookies.\nFormat: `sessionid=<id>; osessionid=<id>; csrftoken=<token>`","required":true,"schema":{"type":"string"}}},"schemas":{"AjaxSignupResponse":{"type":"object","properties":{"location":{"type":"string","description":"URL to redirect to after successful signup."}}},"CaptchaErrorResponse":{"type":"object","properties":{"form_errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/social/signup/":{"post":{"tags":["Social"],"summary":"Complete Social Signup","description":"Completes the signup process for a social account.\n\n**Business Logic:**\n- Handles the form submission for social account registration.\n- Creates the user account and links the social account.","operationId":"completeSocialSignup","parameters":[{"$ref":"#/components/parameters/CSRFTokenHeader"},{"$ref":"#/components/parameters/CookieHeader"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"username":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful signup (Ajax)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AjaxSignupResponse"}}}},"302":{"description":"Redirects to the success URL (e.g., home page) upon successful signup (Standard)."},"400":{"description":"Form validation error","content":{"text/html":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaErrorResponse"}}}}}}}}}
```


---

# 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/social.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.
