Search by

sdk-generator / uda-sdk

dmorenof

Unofficial PHP SDK for the Urban Data Analytics (uDA) / Accumin Intelligence Pulse API (valuation, indicators, cadastre, comparables, mortgage pre-approval).

Package info

github.com/sdk-generator/uda-sdk

pkg:composer/sdk-generator/uda-sdk

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3.0 2026-12-03 22:55 UTC

This package is auto-updated.

Last update: 2026-12-03 23:15:12 UTC


README

License: MIT PHP 8.4+ PHPStan level max Packagist

Accumin Intelligence (formerly Urban Data Analytics, uDA) real-estate valuation, indicators, cadastre and comparables from PHP.

Valuations, market indicators, cadastral data, comparables, mortgage pre-approval KPIs, access tokens and usage from the Pulse API (/api/integration/... and /api/backoffice/...).

Unofficial. Not affiliated with, endorsed by or supported by uDA Real Estate Data / Accumin Intelligence. See NOTICE.md.

Why this SDK

  • 17 operations of the current Pulse API: valuation v3, indicators, cadastral by reference and advanced, comparables (listings and transactions), mortgage pre-approval, access and refresh tokens, consumer applications, usage and limits.
  • Three ways to authenticate, as uDA documents them: access token (BearerToken), consumer id and secret to obtain it, or the master API key (APIKeyHeader).
  • Generated from the contract, never edited by hand. src/ is produced from contract/uda-pulse-api.json by sdk-generator on top of the shared sdk-runtime: when the contract changes you regenerate, you do not patch.
  • Typed end to end. Requests are models whose fields are checked where you assign them (PHP 8.4 property hooks); answers are models (ValuationResult, CadastralOutput, ComparablesResultsBasic...); lists are typed collections.
  • One way to fail. An HTTP answer the contract does not declare as success is an ApiException that keeps the raw response and, when the API documents it, the decoded error as a model. Network failures keep their own type.
  • Production controls included. PSR-18 HTTP client (Guzzle by default), timeouts, retries with Retry-After, redirect policy, middleware and per-environment servers (PRO and PRE/UAT), all in one Configuration object.

Install

PHP 8.4 or later.

composer require sdk-generator/uda-sdk

Quick start

<?php
use Dmorenof\SdkRuntime\Security\SecurityCredentials;
use UdaSDK\Api\Backoffice\V1\CreateToken;
use UdaSDK\Api\Integration\V3\Valuation\Simple as Valuation;
use UdaSDK\Configuration;
use UdaSDK\GetParams\Api\Integration\V3\Valuation\Simple as ValuationParams;
use UdaSDK\PulseAPISDK;

// 1. Access token from your consumer id and secret (valid about one hour).
$configuration = new Configuration();
$configuration->securityCredentials = new SecurityCredentials([
    'ConsumerId' => getenv('UDA_CONSUMER_ID') ?: '',
    'ConsumerSecret' => getenv('UDA_CONSUMER_SECRET') ?: '',
]);
PulseAPISDK::configure($configuration);
$token = CreateToken::post();

// 2. Use it.
$configuration->securityCredentials = new SecurityCredentials(['BearerToken' => $token->access_token]);
PulseAPISDK::configure($configuration);

$params = new ValuationParams();
$params->address = 'CALLE HUESCA 27, MADRID';
$params->area = 100;
$params->rooms = 3;
$valuation = Valuation::get($params);

echo $valuation->avm_value, " EUR\n";

The same example is in examples/quickstart.php. Every operation is listed in docs/OPERATIONS.md. Use https://api-pre.urbandataanalytics.com as baseUrl for the PRE/UAT environment; each environment has its own credentials.

What it covers

17 operations:

Area Operations
Valuation 1
Indicators 1
Cadastral 2
Comparables 2
Mortgage 1
Authentication (tokens) 2
Authorization (applications, keys) 6
Usage 2

Handling errors

use Dmorenof\SdkRuntime\ApiException;

try {
    // ... any call from the quick start
} catch (ApiException $e) {
    echo $e->response->status, "\n";   // the HTTP status
    echo $e->response->body, "\n";     // the raw body, always kept
    var_dump($e->error);                // the decoded error model, when the API documents one
}

Configuration

Configuration is the only place to set anything: baseUrl, securityCredentials, headers, timeout, connectTimeout, retryPolicy, redirectPolicy, middleware, httpClient (any PSR-18 client), serverVariables. Use Client::connect($configuration) instead of the static facades when you need several independent connections.

Good to know

  • uDA does not publish a single OpenAPI document for this API: the contract was rebuilt from the per-endpoint specifications of its documentation (see NOTICE.md). Some answers are typed from documented examples.
  • Coming from 0.1.x: 0.2.0 replaces every operation (the old ones were deprecated by uDA) and renames the facade PulseAPIPROSDK to PulseAPISDK; see CHANGELOG.md.
  • Versions 0.x are first releases: the API of the SDK follows the contract, and a regenerated contract can rename classes. Pin a version.
  • The SDK has been checked against its contract (generation, static analysis, serialization of requests); it has not been run against the live service unless the section above says so. Use test credentials first.

Documentation

License

MIT, see LICENSE.md. The license covers this SDK's code, not the API, its trademarks or its terms: see NOTICE.md.