Profile Screen

Include profile details API and profile update API.

Profile APIs

The Profile APIs manage user profiles on the e-commerce platform, allowing users to view and update their personal information. These APIs handle profile details such as name, email, country, and language preferences.

Profile apis

1. Get Profile API

The Get Profile API retrieves the user's profile information from the e-commerce platform.

Endpoint

  • {{baseurl}}/api/v1/customer/profile

Method

  • GET

Request Parameters:

None

Request Body:

None

Authorization:

The API requires a bearer token in the request header for authentication. Users must include their valid bearer token in the "Authorization" header of the HTTP request to access their profile information.

Response Format:

The API responds with a JSON object containing the user's profile details, including name, email, country ID, and language ID.

2. Update Profile API

The Update Profile API allows users to modify their profile information, such as name, email, country, and language preferences.

Endpoint

  • {{baseurl}}/api/v1/customer/profile-update

Method

  • POST

Request Parameters:

None

Request Body:

The request body should include the updated profile details, such as name, email, country ID, and language ID, as follows:

Authorization:

The API requires a bearer token in the request header for authentication. Users must include their valid bearer token in the "Authorization" header of the HTTP request to update their profile.

Response Format:

The API responds with a JSON object indicating the status of the profile update request. If the email has been changed, the API may return a message indicating that email verification is required.

Features:

  • The Get Profile API enables users to view their profile information, including name, email, country, and language preferences.

  • The Update Profile API allows users to modify their profile details, such as name, email, country, and language preferences.

  • If the email is changed during profile update, the API triggers an email verification process for added security.

Usage:

  • The Get Profile API is used to display the user's current profile details, providing a personalized experience.

  • The Update Profile API is called when users want to update their profile information, such as changing the name or updating the email address.

Last updated