Dies ist eine alte Version des Dokuments!
This API provides you with stored user data.
array getUserData( object userIdentification [, array userDataParts] )
array | An array with a data part name (see below) as key and a boolean defines whether the part should be returned (true ) or not (false ) as value. array( "userDetails" => true, "selectedNewsletter" => false ) |
Configures which data parts should be returned. Every data part will be returned is set as a default. Possible data parts:
Data part name | Description |
---|---|
userDetails | if false the returned userDetails (gender,name,etc.) is null |
selectedNewsletter | if false the returned selectedNewsletter (the newsletter the user has subscribed to) is null |
newsletterList | if false, the returned newsletterList (all available Newsletter from your client) is null |
selectedBlocklists | if false, the returned selectedBlocklist (the blocklist the user was subscribed to) is null |
blocklistList | if false, the returned blocklistList (all available blocklists from your client) is null |
holiday |
An array with the following data fields and the selected data parts as key and the corresponding users data as value. The value type depends on the data part
Key | Value | Description |
---|---|---|
string | ||
userId | integer | |
newsletterId | integer | |
userDetails | array or null | User data part. |
selectedNewsletter | array or null | User data part. |
newsletterList | array or null | User data part. |
selectedBlocklists | array or null | User data part. |
blocklistList | array or null | User data part. |
holiday | array or null | User data part. |
$userDataParts = array( "userDetails" => false, "selectedNewsletter" => false, "newsletterList" => false, "selectedBlocklists" => false, "blocklistList" => false, "holiday" => false ); $mySoapClient = new SoapClient( "https://api.promio-mail.com/1.4/soap/$SENDER_ID.wsdl", array( 'trace' => true )); $result = $mySoapClient->getUserData( $userIdentification, $userDataParts );
array(9) { ["mail"]=> string(23) "test@promio.net" ["userId"]=> int(717985) ["newsletterId"]=> int(123) ["userDetails"]=> NULL ["selectedNewsletter"]=> NULL ["newsletterList"]=> NULL ["selectedBlocklists"]=> NULL ["blocklistList"]=> NULL ["holiday"]=> NULL }
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.promio-mail.com/1.4/soap/10105.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://api.promio-mail.com/1.4/soap/"> <SOAP-ENV:Header> <ns1:requestId>29907</ns1:requestId> <ns1:duration>71.11</ns1:duration> <ns1:notice/> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns2:getUserDataResponse> <mail>test@promio.net</mail> <userId>717985</userId> <newsletterId>123</newsletterId> </ns2:getUserDataResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>