User Profile

Get user profile details and update profile details.

Get Profile Details

GET ‎‎https://<domain>/<api prefix>/<version>/user/get/profile/

This API endpoint will give you the user profile details.

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access-token

HTTP/1.1 200 OK
Content-Type: application/json

Body:
{
    "status_code": 200,
    "errors": {},
    "data": {
        "UserProfile": [
            {
                "username": "<username>",
                "first_name": "<first name>",
                "last_name": "<last name>",
                "email": "<email>",
                "phone_code": "<phone code>",
                "phone_number": "<phone number>",
                "country_code": "<country code>"
            }
        ]
        "ProfileImage": "<image_path>",
        "UserLocInfo":{
            "lan": "<language_key>",
            "tz": "<timezone>",
            "currency": "<currency_code>"
        }
    }
}

Sample code

Node

PHP

Update Profile Details

POST ‎‎‎‎‎‎‎‎https://<domain>/<api prefix>/<version>/user/update/profile/

This API endpoint will update user profile details.

If the email address is changed, need to add token checksum field and token field for verification.

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access-token

Request Body

Name
Type
Description

first_name

string

first name

last_name

string

last name

email*

string

email address

phone_number

string

phone number

languages

string

language code

Get Local Info

currencies

string

currency code

Get Local Info

timezones

string

token_field

string

Required when user update mail id,

Get Checksum Token

token_checksum_field

string

Required when user update mail id,

Get Checksum Token

Sample code

Node

PHP

Error Responses

Status Code

Error Type

Field

Description

400

Validation Error

email

Enter a valid email address.

This field is required.

400

Validation Error

phone_number

Phone number must be entered in the format: '999999999'. Up to 15 digits allowed.

400

Validation Error

first_name

Ensure this field has no more than 255 characters.

400

Validation Error

last_name

Ensure this field has no more than 255 characters.

400

Validation Error

token_checksum_field

This field is required.

400

Validation Error

token_field

This field is required.

Token is not matching.

Upload profile image

POST ‎‎‎‎https://<domain>/<api prefix>/<version>/user/profile-image/

This API endpoint is for uploading a user profile image

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access-token

Request Body

Name
Type
Description

image*

object

image file(Type file)

cropped_image*

object

image file(Type file)

Sample code

Node

PHP

Error Responses

Status Code

Error Type

Field

Description

400

Validation Error

image

Upload a valid image. The file you uploaded was either not an image or a corrupted image.

400

Validation Error

cropped_image

Upload a valid image. The file you uploaded was either not an image or a corrupted image.

429

Throttled

Your daily profile update limit exceeded. Expected available in <HH> hours <M minutes and ss seconds.

Get Local Info

GET ‎https://<domain>/<api prefix>/<version>/get/local-info/

This API endpoint will return list site-local info such as currency list, language list, and timezones list.

Headers

Name
Type
Description

apikey*

string

Apikey

Authorization*

string

Bearer access token

Sample Code

Node

PHP

Last updated

Was this helpful?