Customer account management


Get customer account information


This method gets a customer’s account information.

This method requires customer authentication.

Note: The API key must have the API_PERSONAL_INFORMATION_CLIENT_READ permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Related To:
ClientAccountInformation

Class:
ClientImpl

Declaration:

Future<ClientAccountInformation> getAccount() async

Return Value:
ClientAccountInformation

Example:

final ClientAccountInformation clientAccountInformation = await Synerise.client.getAccount().catchError((error)

Update customer account information


This method updates a customer’s account information.

This method requires the context object with the customer’s account information. Omitted fields are not modified.

This method requires customer authentication.

Note: The API key must have the API_PERSONAL_INFORMATION_CLIENT_UPDATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Related To:
ClientAccountUpdateContext

Class:
ClientImpl

Declaration:

Future<void> updateAccount(ClientAccountUpdateContext context) async

Parameters:

Parameter Type Mandatory Default Description
context ClientAccountUpdateContext yes - Object with customer’s email, password, and other optional data

Return Value:
No value is returned.

Example:

ClientAccountUpdateContext clientAccountUpdateContext =  ClientAccountUpdateContext(
email: email,
password: password,
firstName: firstName,
lastName: lastName,
sex: sex,
phone: phone,
company: company,
address: address,
city: city,
zipcode: zipcode,
countrycode: countrycode,
province: province);

await  Synerise.client.updateAccount(clientAccountUpdateContext).catchError((error)

Change customer’s account password


This method changes a customer’s password.

This method requires customer authentication.

Note: Returns the HTTP 403 status code if the provided old password is invalid.
Note: The API key must have the SAUTH_CHANGE_PASSWORD_CLIENT_UPDATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> changePassword(String oldPassword,  String password) async

Parameters:

Parameter Type Mandatory Default Description
newPassword String yes - Customer’s new password
oldPassword String yes - Customer’s old password

Return Value:
No value is returned.

Example:

await  Synerise.client.changePassword(oldPassword, password).catchError((error)

Request password reset for customer account


This method requests a customer’s password reset with email. The customer will receive a token to the provided email address. That token is then used for the confirmation of password reset.

This method requires the customer’s email.

This method is a global operation and doesn’t require customer authentication.

Note: The API key must have the SAUTH_PASSWORD_RESET_CLIENT_CREATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> requestPasswordReset(String email) async 

Parameters:

Parameter Type Mandatory Default Description
email String yes - Customer’s email

Return Value:
No value is returned.

Example:

await  Synerise.client.requestPasswordReset(email).catchError((error)

Confirm password reset for customer account


This method confirm a customer’s password reset with the new password and token provided by password reset request.

This method requires the customer’s new password and the confirmation token received by e-mail.

This method is a global operation and doesn’t require customer authentication.

Note: The API key must have the SAUTH_PASSWORD_RESET_CLIENT_CREATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> confirmPasswordReset(String password, String token) async

Parameters:

Parameter Type Mandatory Default Description
email String yes - Customer’s email
token String yes - Customer’s token provided in an email

Return Value:
No value is returned.

Example:

await  Synerise.client.confirmPasswordReset(email, token).catchError((error)

Delete customer account


This method deletes a customer’s account.

This method requires customer authentication.

Note: Returns the HTTP 403 status code is returned if the provided password is invalid.
Note: The API key must have the SAUTH_CLIENT_DELETE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Related To:
ClientIdentityProvider

Class:
ClientImpl

Declaration:

Future<void> deleteAccount(String clientAuthFactor,  IdentityProvider identityProvider,  String? authId) async

Parameters:

Parameter Type Mandatory Default Description
clientAuthFactor String yes - Customer’s password or token from the identity provider
identityProvider ClientIdentityProvider yes - Customer’s identity provider
authID String yes null Optional identifier of authorization

Return Value:
No value is returned.

Example:

await  Synerise.client.deleteAccount(clientAuthFactor, identityProvider, authId).catchError((error)

Request email change for customer account


This method requests a customer’s email change.

This method is a global operation and doesn’t require customer authentication.

Note: Returns the HTTP 403 status code if the provided token or the password is invalid.
Note: The API key must have the SAUTH_CHANGE_EMAIL_CLIENT_UPDATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> requestEmailChange(String email, String password, [String? externalToken, String? authID]) async {

Parameters:

Parameter Type Mandatory Description
email String yes Customer’s new email
password String yes Customer’s password
externalToken String no Customer’s token (if OAuth, Facebook, and so on)
authID String no Optional identifier of authorization

Return Value:
No value is returned.

Example:

await Synerise.client.requestEmailChange(email, password).catchError((error) {

Confirm email change for customer account


This method confirms an email change.

This method is a global operation and doesn’t require customer authentication.

Note: Returns the HTTP 403 status code if the provided token is invalid.
Note: The API key must have the SAUTH_CHANGE_EMAIL_CLIENT_UPDATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> confirmAccountActivationByPin(String email, String pinCode) async {

Parameters:

Parameter Type Mandatory Description
token String yes Customer’s token provided in an email
newsletterAgreement bool yes Agreement for sending newsletters to the provided email

Return Value:
No value is returned.

Example:

await Synerise.client.confirmEmailChange(token, true).catchError((error) {

Request phone update on customer account


Requests a customer’s phone update. A confirmation code is sent to the phone number.

This method is a global operation and doesn’t require customer authentication.

Note: The API key must have the API_PERSONAL_PHONE_CLIENT_CREATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> requestPhoneUpdate(String phone) async {

Parameters:

Parameter Type Mandatory Description
phone String yes Customer’s new phone number

Return Value:
No value is returned.

Example:

await Synerise.client.requestPhoneUpdate(phone).catchError((error) {

Confirm phone update on customer account


This method confirms a phone number update. This action requires the new phone number and confirmation code as parameters.

This method is a global operation and doesn’t require customer authentication.

Note: Returns the HTTP 403 status code if the provided UUID does not exist or the password is invalid.
Note: The API key must have the API_PERSONAL_PHONE_CLIENT_CREATE permission from the Client group.

Declared In:
lib/modules/client/client_impl.dart

Class:
ClientImpl

Declaration:

Future<void> confirmPhoneUpdate(String phone, String confirmationCode, bool smsAgreement) async {

Parameters:

Parameter Type Mandatory Description
phone String yes New phone number
confirmationCode String yes A confirmation code received by a text message
smsAgreement bool yes Agreement for sending SMS to the provided number

Return Value:
No value is returned.

Example:

await Synerise.client.confirmPhoneUpdate(phone, confirmationCode, true).catchError((error) {

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker