DomusPro / Documentation / Association service

Webservice endpoint for association

The WDSL file for the document webservice is available here: /service/soap/domuspro.webservice/v3/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.
  • * updatedTo(string): Format: YYYY-MM-DD HH:SS ie. 2014-01-12 08:11. The date range to end the filter to.
  • * limit(integer): Limit result to this amount of associations. A good pointer is to use 100 as limit for better performance.
  • * offset(integer): The offset is here to give a certain part of the data set back, the default value is 0 which will be the first part of the result set. Example the result 1000 records and limit = 100 and offset = 0, this will give back the first 100 records.

The following parameters are used in the token generation (in this order) updatedSince, 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/v3/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);
			}