User
User account management endpoints
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']).
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.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789The currency code to activate (e.g., 'TRY', 'USD'). Must be one of the available currencies.
Currency activated successfully
Invalid currency code
No content
Anonymizes the current user account.
Business Logic:
Requires
SELF_ANONYMIZATION_ENABLEDsetting to be true.Marks the user as anonymized and logs them out.
No request body is required as the operation targets the authenticated user.
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.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789User anonymized successfully
No content
Self-anonymization is disabled
No content
Resets the user's password using the provided token and new password.
Business Logic:
Validates the
uidb64andtokento ensure the reset link is valid.Validates that
new_password1andnew_password2match.Validates
new_password1against configured password validators (AUTH_PASSWORD_VALIDATORS).Updates the user's password and saves the old password in history.
Sets the user type to 'registered'.
Base64 encoded user ID
Password reset token
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.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789The new password. Validated against the system's password validators (e.g., minimum length, common passwords).
Confirmation of the new password. Must match 'new_password1'.
Password reset successfully
No content
Invalid token or password mismatch
No content
Updates the user's city preference.
Business Logic:
Updates the 'city' attribute in the user's profile or session.
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.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789City name or ID. Validated against available cities in the system.
City updated successfully
City not found
Last updated
Was this helpful?

