Getting a subscribers custom fields (apiGetSubscriberFields)
With this option, you retrieve the custom fields of the subscriber.
Response
[responseSubsriberCustomFields] => Array ( [0] => stdClass Object ( [customFieldID] => 12345 [customFieldName] => Salutation [customFieldDesc] => [customFieldType] => 1 ) [1] => stdClass Object ( [customFieldID] => 12346 [customFieldName] => Title [customFieldDesc] => [customFieldType] => 1 ) [2] => stdClass Object ( [customFieldID] => 12347 [customFieldName] => Name [customFieldDesc] => [customFieldType] => 1 ) [3] => stdClass Object ( [customFieldID] => 12348 [customFieldName] => Surname [customFieldDesc] => [customFieldType] => 1 ) [4] => stdClass Object ( [customFieldID] => 12349 [customFieldName] => Account number [customFieldDesc] => [customFieldType] => 2 ) )
Error Response
Code | Interpretation |
---|---|
null | No custom fields found for this customer. |
PHP5 Example
try{ $response=$client->apiGetSubscriberFields() } catch (SoapFault $exception) { echo ($exception->getMessage()); }