UserUpdate
Definition
Use this call to update the email address of a user under the seller account.
Request URI: https://api.sellercenter.lazada.sg?Action=UserUpdate
Parameters
Field | Type | Description |
---|---|---|
Action | string | UserUpdate Name of the API that is to be called. Mandatory. |
Format | string | The response format, with XML as the default. Can be XML or JSON. Optional. |
Timestamp | datetime | The current time in ISO8601 format (e.g., Timestamp=2016-04-01T10:00:00+02:00 for Berlin). Mandatory. |
UserID | string | The ID of the user making the call. Mandatory. |
Version | string | The API version against which this call is to be executed. The current version is "1.0". Mandatory. |
Signature | string | The cryptographic signature, authenticating the request. You must create this value by computing the SHA256 hash of the request, using the API key of the user specified in the UserID parameter. Mandatory. |
Request body
<?xml version="1.0" encoding="UTF-8" ?>
<Request>
<User>
<NewEmail>new.email@mailinator.com</NewEmail>
<OldEmail>current.email@mailinator.com</OldEmail>
</User>
</Request>
//init request with old email and new email
UpdateUserEmail request = new UpdateUserEmail("old@126.com","new@126.com");
//fire request and check resualt
try {
if(request.execute().isSucceed()) {
System.out.println("update email succeed");
} else {
System.out.println("update email failed");
}
} catch (LazadaException e) {
System.out.println(e.getResponseStr());
}
Result sample
<?xml version="1.0" encoding="UTF-8"?>
<SuccessResponse>
<Head>
<RequestId/>
<RequestAction>UserUpdate</RequestAction>
<ResponseType />
<Timestamp>2016-02-01T11:11:11+0000</Timestamp>
</Head>
</SuccessResponse>
Error messages
Error code | Message |
---|---|
1 | E001: Parameter NewEmail, OldEmail is mandatory |
1000 | Could not update user |
1000 | Format Error Detected |
1000 | Invalid Email |
Updated about 7 years ago