πΎ Update user informations
Update informations of an account
Allowed fields to be modified:
- firstname
- lastname
- society
- civility
- language
- address1
- address2
- address3
- postalCode
- country
- city
- state
Further informations: The country code must follow the https://en.wikipedia.org/wiki/ISO_3166-1 Column "Alpha3-code" The language must be (for now)
- fre-FR
- eng-GB
Description
ENDPOINT | DESCRIPTION | METHODE | EXEMPLE |
---|---|---|---|
/_plugin/Comexposium/thirdParty/updateUser | Cette route met Γ jour toutes les informations concernant les utilisateurs | POST | https://api.preprod.comexposium-sso.com/_plugin/Comexposium/thirdParty/updateUser |
Body
{
"email": "[email protected]",
"data": "{\"firstname\": \"userFirstname\",\"lastname\": \"userLastname\",\"society\": \"userSociety\", \"civility\": \"0\"//men, \"1\" // βwomenβ}\"",
"appToken": "f9c7c303bbc3531781fe52b6e4123d5e40ba8581"
}
Exemple d'appel
curl -X POST "https://api.preprod.comexposium-sso.com/_plugin/Comexposium/thirdParty/updateUser \" -H "accept: application/json" -H "Authorization: Bearer myBearerToken"" -d '{ "email": "[email protected]", "data": {"firstname": "userFirstname", "lastname": "userLastname", "society": "userSociety", "civility": "1"}, "appToken": "bf2a3d992662961be37727602f982ff9a0942473"
}'
Details
Responses
You can only get a 200 or 401 status code by using this endpoint, you will find results in the statusCode attribute.
Success
{ "requestId": "c19e144d-760a-498f-a122-aacdf2c0f6a0", "status": 200, "error": null, "controller": "Comexposium/thirdPartyController", "action": "updateUserInformationsThirdParty", "collection": null, "index": null, "volatile": null, "result": { "statusCode": 0, "message": "generic_success" } }
Exemple:
{
"requestId": "885f2a79-67d7-44c1-88ca-ddbf2d53a94e",
"status": 200,
"error": null,
"controller": "Comexposium/thirdPartyController",
"action": "getUserForThirdParty",
"collection": null,
"index": null,
"volatile": null,
"result": {
"statusCode": 0,
"message": "generic_success",
"data": {
"profileData": {
"firstname": "Madame A",
"lastname": "A",
"mobilephone:indicatif": "+33",
"civility": "0",
"mobilephone:content": "00000000000",
"country": "ABW"
},
"status": "active"
}
}
}
Errors
statusCode: 138 || 171 || 172 || 173: Internal error
statusCode: 137: Missing credentials
statusCode: 139: Email does not exists
statusCode: 140: wrong configuration in application Token, contact Comexposium for more informations
statusCode: 149: Invalid applicationToken
statusCode: 181: applicationToken not authorized to modify
Exemple:
{
"requestId": "38624151-9832-44d8-a05f-cf8602ba09fa",
"status": 200,
"error": null,
"controller": "Comexposium/thirdPartyController",
"action": "getUserForThirdParty",
"collection": null,
"index": null,
"volatile": null,
"result": {
"statusCode": 139,
"message": "generic_error"
}
}