POST /user/update

Updates the `field_name` `value` in the users table for a UID that is secluded to a specific list of allowed columns

// POST
https://api.suitsbooks.nl/user/update

// BODY
{
    "user_id": "a29faa58-3d54-412e-b071-679912d9ac35",
    "field_name": "country",
    "value": "belgium"
}

Example Response

{
    "data": [
        {
            "field_name": "city",
            "user_id": "a29faa58-3d54-412e-b071-679912d9ac35",
            "value": "belgium"
        }
    ],
    "message": "User field updated successfully",
    "success": true
}

Mutable columns list

  • mfa_setup - If the user has finalized their 2FA flow within their account.

  • avatar - This should be a FileResponse url containing an image that comes from our own servers.

  • country - Users primary country of residence

  • city - Users primary city of residence

  • address_line_1 - Users billable address line 1

  • address_line_2 - Users billable address line 2

  • postal_code - Users matching postal code (No format is expected)

  • state - When applicable dictating by their country of residence a state can be populated

  • full_name - Users legal full name

  • first_name - Users legal first name

  • last_name - Users legal last name

  • status - This is a system state that should only ever be globally amended by the authentication server or onboarding

  • last_mfa_challenge_at - EPOCH Unix seconds time when the last 2FA challenge happened

  • awaiting_mfa_challenge - Boolean state that tells the api whether or not to force the user thru a 2FA challenge

  • display_name - Display name set by the user, can be a fictional name or an alias

  • theme - This is controlled by the ClientProvider to sync their themes across devices

  • is_verified - Whether or not the user has been KYC verified

  • is_frozen - This will force the user in a read-only state

  • is_flagged - When a user shows suspicious behaviour he can be flagged for manual reviewal at a later hour, all audit logs will be partioned into a seperate bin too that doesn’t get wiped

Updated on