Updating a profile
Updating profile informations
You can update the "name", "email", "phone", "occupation", "gender", "birthdate", "level" and "address" informations for the profile.
curl --request PATCH '<base_url>/api/v2/profile/<profile_uuid>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <profile_token>' \
--data '{
"email": "email",
"phone": "phone",
"birthdate": "birthdate in YYYY-MM-DD format",
"name": "first_name last_name",
"level": null/new_level int,
"occupation": "string",
"gender": "M/F",
"address": {
"city": "string",
"province": "string",
"address": "string"
}
}'
Updating profile status
There are multiple status types for profiles in Amani System.
- CREATED
- INCOMPLETE
- PENDING_REVIEW
- APPROVED
- REJECTED
- BLACKLISTED
- PENDING_APPROVAL
- PENDING_UPLOAD
- INACTIVE
⚠️ Profile token is not allowed for this request.
curl --request PUT '<base_url>/api/v2/profile/<profile_uuid>/status' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer user_token' \
--data ' {
"status": "status_type"
}'
Response shows the result of the update.
{
"result": true/false, // Update was succesfull or not
"status": "Approved", // Current profile status
}