For the complete documentation index, see llms.txt. This page is also available as Markdown.

User

User account management endpoints

Activate Currency

post

Sets the active currency for the user's session.

Business Logic:

  • Validates the currency code against available currencies.

  • Updates the session with the new currency.

Dynamic Settings:

  • AVAILABLE_CURRENCIES: List of valid currency codes (e.g., ['TRY', 'USD', 'EUR']).

Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Body
currency_codestringRequired

The currency code to activate (e.g., 'TRY', 'USD'). Must be one of the available currencies.

Responses
204

Currency activated successfully

No content

post/users/activate-currency/
POST /users/activate-currency/ HTTP/1.1
Host: sandbox.akinon.com
X-CSRFToken: abc123def456ghi789
Cookie: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "currency_code": "text"
}

No content

Anonymize User

patch

Anonymizes the current user account.

Business Logic:

  • Requires SELF_ANONYMIZATION_ENABLED setting to be true.

  • Marks the user as anonymized and logs them out.

  • No request body is required as the operation targets the authenticated user.

Authorizations
sessionidstringRequired
Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Responses
200

User anonymized successfully

No content

patch/users/anonymize/
PATCH /users/anonymize/ HTTP/1.1
Host: sandbox.akinon.com
X-CSRFToken: abc123def456ghi789
Cookie: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Accept: */*

No content

Validate Password Reset Token

get

Checks if the password reset link (UID and token) is valid.

Path parameters
uidb64stringRequired

Base64 encoded user ID

tokenstringRequired

Password reset token

Responses
200

Validation result

application/json
validlinkbooleanOptional
get/users/api-reset/{uidb64}/{token}/
GET /users/api-reset/{uidb64}/{token}/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
200

Validation result

{
  "validlink": true
}

Reset Password

post

Resets the user's password using the provided token and new password.

Business Logic:

  • Validates the uidb64 and token to ensure the reset link is valid.

  • Validates that new_password1 and new_password2 match.

  • Validates new_password1 against configured password validators (AUTH_PASSWORD_VALIDATORS).

  • Updates the user's password and saves the old password in history.

  • Sets the user type to 'registered'.

Path parameters
uidb64stringRequired

Base64 encoded user ID

tokenstringRequired

Password reset token

Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Body
new_password1string · passwordRequired

The new password. Validated against the system's password validators (e.g., minimum length, common passwords).

new_password2string · passwordRequired

Confirmation of the new password. Must match 'new_password1'.

Responses
200

Password reset successfully

No content

post/users/api-reset/{uidb64}/{token}/
POST /users/api-reset/{uidb64}/{token}/ HTTP/1.1
Host: sandbox.akinon.com
X-CSRFToken: abc123def456ghi789
Cookie: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 55

"new_password1='password'&new_password2='password'"

No content

Change User City

post

Updates the user's city preference.

Business Logic:

  • Updates the 'city' attribute in the user's profile or session.

Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Body
citystringRequired

City name or ID. Validated against available cities in the system.

Responses
200

City updated successfully

application/json
cityintegerOptional

ID of the updated city.

post/users/change_city/
POST /users/change_city/ HTTP/1.1
Host: sandbox.akinon.com
X-CSRFToken: abc123def456ghi789
Cookie: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "city": "text"
}
{
  "city": 1
}

Last updated

Was this helpful?