autosync-php / sdk
Unofficial PHP SDK for Autosync self-service
Requires
- php: ^8.3
- ext-json: *
- php-http/discovery: ^1.20
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
Requires (Dev)
- nyholm/psr7: ^1.8.2
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- squizlabs/php_codesniffer: ^3.13
Suggests
- guzzlehttp/guzzle: A PSR-18 HTTP client implementation
- symfony/http-client: An alternative PSR-18 HTTP client implementation
Provides
None
Conflicts
None
Replaces
None
README
Unofficial PHP 8.3+ SDK for signing in to Autosync self-service with email and password and fetching passings for every customer profile and vehicle.
Installation
Install the SDK and any PSR-18 implementation, for example Guzzle:
composer require autosync-php/sdk guzzlehttp/guzzle
Usage
<?php use Autosync\Sdk\AutosyncClient; require __DIR__ . '/vendor/autoload.php'; $client = AutosyncClient::login( email: $_ENV['AUTOSYNC_EMAIL'], password: $_ENV['AUTOSYNC_PASSWORD'], ); $passings = $client->getAllPassings( from: new DateTimeImmutable('2026-08-01T00:00:00Z'), to: new DateTimeImmutable('2026-09-01T00:00:00Z'), ); foreach ($passings as $passing) { echo "{$passing->transactedOn->format(DATE_ATOM)} {$passing->totalPrice} NOK\n"; }
getAllPassings() follows every result page for every accessible customer profile. It omits the OBE filter used by the website, so the result includes every vehicle. Use getCustomers() and getPassingsPage() when manual paging is preferable.
Credentials, session cookies, and tokens are kept in memory only. Never commit credentials or log exception context containing private API payloads.
Autosync does not document these web endpoints. Upstream login or response changes may require an SDK update. Use this package only with an account you are authorized to access.