Repository navigation
Releases: seventhingsCompany/customer-api-php
Release list
v1.5.0
Support for customer API spec v0.20143_c5f8b54b3_20261005 (Go SDK v1.5.0 parity)
New APIs
- Catalog items:
$client->catalogItemswithlist(),all(),get(),create(),update()(full PUT replacement), anddelete(). Requires the product catalog feature. - Custom thumbnail sizes:
files->getThumbnail($uuid, $width, $height)fits thumbnails within 1–2000 px, preserving aspect ratio. - Timed rentals: optional
isFullDay,issueAt, anddueAton rental create/update requests (omitted when null), exposed onRentalCaseResponse.
Rate limiting and errors
- Clients throttle to 200 requests per minute by default, evenly spaced without bursts. Pass
requestsPerMinuteto anyClient::with*()factory to override it, or0to disable. Throttling blocks the calling process and does not retry HTTP 429 responses. ApiExceptionnow exposes response$headersandheader(), plusretryAfter()to parseRetry-Afteras delay-seconds or an HTTP date.
Changes
- Task reminders:
reminders: nullomits the field;[]explicitly disables reminders. - Breaking: rooms and locations return API responses unchanged;
{uuid, fields}unwrapping andHelpers::unwrapResourceFields()are removed. - Breaking:
PersonResponsereads flat records only; the UUID comes fromperson_uuid(theuuidalias is removed). - Fix:
persons->all(),users->all(), andcatalogItems->all()yield sequential keys across pages, soiterator_to_array()no longer drops earlier pages.
Documentation and verification
- Updated README (including a corrected Rentals example) and end-to-end demo with catalog and timed-rental steps.
- 265 unit tests passed on PHP 8.5.11 against the merged tree.
- 46 live integration tests passed, no skips, covering catalog CRUD, timed rentals, custom thumbnails, optional reminders, rate limiting, and error headers. Run before the final
all()key fix, which is covered by unit tests. - Live demo completed successfully.
Pull request: #8
Full changelog: v1.4.0...v1.5.0
v1.4.0
Support for the nine new endpoints in customer API spec v0.19571_89862c247_20260915
New APIs
- Barcode lookup:
objects->getByBarcode()safely URL-encodes raw scancodes and supports archived objects. - Resource history: paginated
history()methods on objects, rooms, locations, persons, tasks, and rentals, withHistoryListOptionsand pagination metadata. Non-object resources expose typed history entries; object history preserves dynamic event payloads. - PDF reports:
reports->listTemplates()returns available templates, andreports->create(new CreateReportRequest(...))returns binary PDF data in the requested object order.
Compatibility and fixes
- Accept flat and
{uuid, fields}responses for persons, rooms, and locations while preserving custom fields. - Support both
person_uuidanduuidaliases, preferring a non-empty legacy identifier. - Add
ApiException::isFeatureInactive()to distinguish explicit inactive-feature responses from permission denials. - Gracefully skip rental history in the demo and new integration coverage when the API explicitly reports an inactive rentals feature. Unexpected errors remain failures.
Documentation and verification
- Updated README and end-to-end demo covering the new APIs.
- 279 tests passed, 1,006 assertions, no failures or skips: 239 unit tests and 40 live integration tests on PHP 8.5.10.
- Live demo completed successfully, including PDF generation, resource history, CRUD flows, file attachments, and authentication cleanup.
- Disabled-feature handling covered with mocked responses; the live instance has rentals enabled.
- PHP syntax checks passed. The merged main tree matches the tested revision.
Pull request: #7
Full changelog: v1.3.0...v1.4.0
v1.3.0
Additive ergonomics plus a persons sort fix. Verified end-to-end against the live conformance instance (139 unit + 31 integration tests, demo example exit 0).
✨ Custom person fields preserved
PersonResponse now carries a full raw $fields bag plus a null-safe field(string $key) accessor, so template-defined custom fields survive list/get/getById instead of being silently dropped. Typed props are unchanged — fully backward compatible.
🧰 New ergonomics helpers (ported from the Go SDK)
- Mandatory-field discovery —
FieldDefinition::isMandatory()/attribute()/hasAttribute(),FieldDefinitionFieldType::allowedValues(),SystemManagedFieldKeys, andFieldDefinitionsService::mandatoryFieldDefinitions()/missingMandatoryFields()for fail-fast pre-create validation. Fieldsvalue object — type-safestring/int/float/bool/time/has/raw/uuid/nameaccessors over the untyped object/room/location bodies and thePersonResponsefields bag.- Auto-pagination — Generator-based
all()onobjects/rooms/locations(yieldingFields) andpersons/users(yielding typed responses); default page size 100, stops on a short page. - Error predicates —
ApiException::isNotFound()/isUnauthorized()/isForbidden()/isConflict()/isRateLimited()/isServerError(). - Filter constructors — static
FilterEntry::eq()/neq()/gt()/gte()/lt()/lte()/like()/notLike()/in()/nin().
🐛 Fixes
- Persons list sorting now works. The persons endpoint uses the deep-object
sort[field]=DIRformat and echoes asortfield→direction map — notsort_by/order, which the API silently ignored. Sorting was previously a no-op and the responsesortBy/orderalways resolved to''.
⚠️ Breaking changes
PersonListOptions:sortBy/orderreplaced by asortmap (array<string, SortDirection>).PersonListResponse:sortBy/orderstring props replaced by asortmap (array<string, string>).
(Users keep sort_by/order — that endpoint genuinely uses them.)
Full changelog: v1.2.0...v1.3.0
v1.2.0
v1.1.0
v1.0.1
v1.0.0 Initial Release
Initial Release for the seventhings Customer API
- Target Version: v0.16573_15f736c09_20260310 (aka 2026.3)