Benutzer-Werkzeuge

Webseiten-Werkzeuge


de:soapmore

Dies ist eine alte Version des Dokuments!


getUserData

This API provides you with stored user data.

Syntax

array getUserData( object userIdentification [, array userDataParts] )

Parameter

userIdentification

userDataParts (optional)

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 nameDescription
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

Return

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

KeyValueDescription
mail string
userId integer
newsletterId integer
userDetails array or null User data part.
selectedNewsletterarray or null User data part.
newsletterListarray or null User data part.
selectedBlocklistsarray or null User data part.
blocklistListarray or null User data part.
holidayarray or null User data part.

Errors

Examples

Soap

PHP

Call
    $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 );
Returns
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

Request
Response
<?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>
de/soapmore.1391440039.txt.gz · Zuletzt geändert: 2014/02/03 16:07 (Externe Bearbeitung)