A modern PHP SDK for the Sierra ILS API (v6) platform, built for maintainability and clarity using Saloon for HTTP integration.
Current Status: Focused on querying (read-only) the Bibliographic API (Bib API). Designed for future expansion to other Sierra endpoints.
For detailed information on the Sierra API, visit the docs
- ✅ PHP 8.4+ with modern syntax (typed properties, readonly, enums, attributes)
- ✅ Clean HTTP layer built on Saloon
- ✅ PSR-4 autoloading and testable structure
- ✅ Composer-native and framework-agnostic
composer require vincentauger/sierra-sdkuse VincentAuger\SierraSdk\Sierra;
$sierra = new Sierra(
baseUrl: 'https://your.sierra.server/iii/sierra-api/v6',
clientKey: 'your_client_key',
clientSecret: 'your_client_secret',
);use VincentAuger\SierraSdk\Requests\Bib\GetBib;
$request = new GetBib(123456);
$response = $sierra->send($request);
$record = $request->createDtoFromResponse($response);
echo $record->title; // Access via typed DTO
echo $record->author;
echo $record->materialType?->getDisplayValue();use VincentAuger\SierraSdk\Requests\Bib\GetSearchBib;
$request = new GetSearchBib('climate change');
$response = $sierra->send($request);
$results = $request->createDtoFromResponse($response);
foreach ($results->entries as $entry) {
echo $entry->bib->id . ': ' . $entry->bib->title . PHP_EOL;
}For detailed query examples and advanced usage, see the Query Factory documentation.
use VincentAuger\SierraSdk\Data\Query\QueryFactory;
use VincentAuger\SierraSdk\Requests\Bib\PostQueryBib;
// Search for titles starting with "climate"
$query = QueryFactory::bib()
->field('t') // title field
->startsWith('climate');
$request = new PostQueryBib($query, limit: 25);
$response = $sierra->send($request);
$results = $request->createDtoFromResponse($response);
foreach ($results->entries as $bibId) {
// Get full record details
$bibRequest = new GetBib($bibId);
$bibResponse = $sierra->send($bibRequest);
$bib = $bibRequest->createDtoFromResponse($bibResponse);
echo $bib->title . PHP_EOL;
}You must provide:
| Parameter | Description |
|---|---|
| baseUrl | Base URL of the Sierra API (ends with /v6) |
| clientKey | OAuth2 client key |
| clientSecret | OAuth2 client secret |
- Sierra – main entry point, wraps Saloon connector
- Requests – one Saloon Request per endpoint (e.g., GetBib, GetSearchBib, PostQueryBib)
- Data – Data DTOs for API responses (e.g., BibObject, BibResultSet, BibSearchResultSet)
- Tests – Pest tests
- Basic client and authentication
- Query the bib records
GET /v6/bibs/ - Search the bib records
GET /v6/bibs/search - Query the bib records with JSON
POST /v6/bibs/query - Fetch single bib record
GET /v6/bibs/{id}
- PHP 8.4+
- Composer
- Saloon (installed automatically)
Contributions are welcome! Please see our Contributing Guide for details on development setup, testing, and guidelines.
MIT License — see the LICENSE file for details.
- This SDK is not affiliated with Innovative Interfaces Inc.
- Use at your own risk. Respect your ILS API usage limits and security requirements.