DomusPro / Documentation / Association service

Webservice endpoint for association

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

The methods are briefly described here

getUpdatedAssociations

This method will return an array of associations that are updated between 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
  • * updatedSince(string): Format: YYYY-MM-DD HH:SS ie. 2013-05-07 12:21. The date range to start from. In the token generation this parameter is called date.
  • * updatedTo(string): Format: YYYY-MM-DD HH:SS ie. 2014-01-12 08:11. The date range to end the filter to. Can be empty.
  • * limit(integer): Limit result to this amount of associations. A good pointer is to use 20 as limit for better performance. Required and can not be 0
  • * offset(integer): The offset is here to give a certain part of the data set back., the default value isOften you will use 0 which will be the first part of the result set. Required. Example: If the result is 1000 records and limit = 20 and offset = 0, this will give back the first 20 records. At next request you can use limit = 20 and offset = 20,

 

The following parameters are used in the token generation (in this order) updatedSince, limit, partnerIdentifier, but please note that in the token generation the updatedSince parameter must be named ”date” for backwards compatibility.

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/v/association.wsdl';

	$client = new SoapClient($wsdl);
	$partnerId = '63b74aee-9852-4810-8c5b-98cea0188ebf';
	$updatedSince = '2013-05-07 12:21';
	$updatedTo = '2014-01-12 08:11';
	$limit = 10;
	$offset = 0;
	$token = generateToken($partnerId, $updatedSince, $limit);

	try {
		$res = $client->getUpdatedAssociations($partnerId, $token, $updatedSince, $updatedTo, $limit, $offset);
		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);
	}