DomusPro / Documentation / Association service

Webservice endpoint for association

The WDSL file for the document webservice is available here: /service/soap/domuspro.webservice/v2/association.wsdl

The methods are briefly described here

getUpdatedAssociations

This method will return an array of associations that are updated since a given point in time

  • * partnerIdentifier(string, required): The identifier unique to the system calling the webservice
  • * token(string, required): The token generated according to the rules specified on the documentation page
  • * date(string): Format: YYYY-MM-DD HH:SS ie. 2013-05-07 12:21
  • * limit(integer): Limit result to this amount of associations. Set to 0 for no limit

The following parameters are used in the token generation (in this order) date, limit, partnerIdentifier

Returns an array of Associations

getDataForAssociation

Return data for one association

  • * partnerIdentifier(string, required): The identifier unique to the system calling the webservice
  • * token(string, required): The token generated according to the rules specified on the documentation page
  • * domusProIdentifier(string): The identifier of the association in domusPro system. If set to anything except 0, this is used to find the association, otherwise the externalIdentifer is used.
  • * externalIdentifier(string): The identifier of the association in the client system.

The following parameters are used in the token generation (in order) externalIdentifier, domusProIdentifer, partnerIdentifier

Returns an Association

Examples

			ini_set('soap.wsdl_cache_enabled', 0);
			$wsdl = 'http://ws.domuspro.dk/service/soap/domuspro.webservice/v2/association.wsdl';

			$client = new SoapClient($wsdl);
			$partnerId = '63b74aee-9852-4810-8c5b-98cea0188ebf';
			$date = '2013-07-05 12:00';
			$limit = 2;
			$token = generateToken($partnerId, $date, $limit);

			try {
				$res = $client->getUpdatedAssociations($partnerId, $token, $date, $limit);
				foreach ($res->association as $association) {
					print "Association: " . $association->name .'( ' . $association->searchName . ')' . PHP_EOL;
				}
			} catch (SoapFault $e) {
				print 'Error: ' . $e->getMessage();
			}

			function generateToken($partnerId, $date, $limit) {
				$sharedSecret = 'YOUR SECRET';
				$string = '';
				$string .= 'date:' . $date . '_';
				$string .= 'limit:' . $limit . '_';
				$string .= 'partnerIdentifier:' . $partnerId . '_';
				$string .= $sharedSecret;
				return sha1($string);
			}