Update end-user information
Overview
Use this method to add end user information to a subscription.
Requirements
Parameters
Parameter | Type/Description | |
---|---|---|
sessionID |
Required (String) |
|
|
Session identifier, output of the Login method. An exception is thrown for incorrect values. |
|
subscriptionReferencesList |
Required (StringArray) |
|
|
|
|
EndUser |
Object |
|
|
Details below |
|
|
FirstName |
String |
|
|
End user first name |
|
LastName |
String |
|
|
End user last name |
|
Company |
String |
|
|
End user company name. Can be NULL. |
|
CountryCode |
String |
|
|
End user country code (ISO 3166 two-letter code). |
|
State |
String |
|
|
End user state. Example: "Alabama". Can be NULL. |
|
|
String |
|
|
End user email. |
|
Fax |
String |
|
|
End user fax number. Can be NULL. |
|
City |
String |
|
|
End user city. |
|
Address1 |
String |
|
|
End user address line 1. Can be NULL. |
|
Address2 |
String |
|
|
End user address line 2. Can be NULL. |
|
Phone |
String |
|
|
End user phone number. Can be NULL. |
|
Zip |
String |
|
|
End user zip. Can be NULL. |
|
Language |
String |
|
|
ISO 639-1 two-letter language code for the end user language. Can be NULL. |
Response
Parameter | Type/Description |
---|---|
result | Boolean |
True or false |
Request
<?php
require('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/02Authentication
require('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/Partner/00Set_partner
$subscriptionReferencesList = array('REFERENCE_1', 'REFERENCE_2');
$endUser = new stdClass();
$endUser->FirstName = 'FirstName';
$endUser->LastName = 'LastName';
$endUser->CountryCode = 'US';
$endUser->Email = 'email@example.com';
$endUser->City = 'LA';
try {
$UpdatedEndUser= $client->updateSubscriptionsEndUser($sessionID, $subscriptionReferencesList, $endUser);
} catch (SoapFault $e) {
Echo "UpdatedEndUser: " . $e->getMessage();
exit;
}
var_dump ("UpdatedEndUser ", $UpdatedEndUser);
Errors
Error | Description |
---|---|
NOT_FOUND_PARTNER |
A partner must be set first. |
INVALID_SUBSCRIPTIONS_LIST_SIZE |
Too many subscription references provided. |
INVALID_COUNTRY |
Invalid end user country code. |
INVALID_END_USER_EMAIL |
Invalid end user email provided. |
EMPTY_END_USER_FIRST_NAME |
End user first name is mandatory. |
EMPTY_END_USER_LAST_NAME |
End user last name is mandatory. |
EMPTY_END_USER_CITY |
End user city is mandatory. |