Download the PHP package lekoala/odoo-php-client without Composer
On this page you can find all versions of the php package lekoala/odoo-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package odoo-php-client
Odoo PHP Client
A PHP 8.3+ client for Odoo 19's External JSON-2 API, with generic model calls and optional typed services for partners, invoices, subscriptions, products, payments, API keys, portal PDFs, Stripe and Peppol.
Installation
Quick start
Every JSON-2 method is available through named parameters:
Single and batch creation have distinct return contracts:
Pagination and iteration
Typed service lists apply no hidden result cap. Use QueryOptions for an
explicit page, or iterate() to process large result sets in bounded requests:
limit: null (the default) means no overall cap. Iterators fetch by
batchSize; array-returning list() methods load all matching rows, so prefer
iterate() for large tables. Passing an integer as the second argument is
shorthand for an explicit limit.
Low-level searchRead() sends only the options you actually provide: an empty
$fields, a zero limit/offset or a null order is omitted from the request body
instead of being sent as []/0/null.
See examples.
AI agents: the generic integration skill shipped with this package is .agents/skills/odoo-php-client/SKILL.md.
Design guarantees
- The public entry point is
call()with explicit JSON-2 named parameters. - Read-only calls may be retried after transient gateway/network failures; writes and actions are not retried automatically.
Retry count, backoff, timeouts and redirects are configurable on
Config(setMaxRetries(),setRetryBackoff(),setConnectTimeout(),setTimeout(),setMaxRedirects()). - A default
contextcan be set once withConfig::setDefaultContext(); explicit per-call context wins key by key. Client::fieldsOf()cachesfields_getper instance; callclearFieldsCache()after module upgrades.- Events are dispatched after the remote mutation has committed: a listener exception is logged, never reported as an Odoo failure.
- Stripe and Peppol are exposed as
Addon\StripeandAddon\Peppol(Odoo::$stripe,Odoo::$peppol). - HTTP 401, HTTP 403, network failures and Odoo validation errors use distinct exception types.
- HTTP calls use an injectable transport; cURL is only the zero-configuration fallback.
- A custom adapter can be injected into
Clientfor tests or alternative transports. - Each JSON-2 call is a separate Odoo transaction. Multi-call business workflows are not atomic.
HTTP transport
The public HTTP boundary is transport-agnostic. With ext-curl installed, no additional
configuration is needed. To reuse Guzzle, Symfony HttpClient, or another PSR-18 client,
inject Psr18Transport through the configuration.
Guzzle:
Symfony HttpClient:
Redirects are handled consistently by this package. Sensitive JSON-2 headers are removed when a redirect changes origin, and portal PDF requests never receive the API bearer token.
Development
License
MIT. See LICENSE.
All versions of odoo-php-client with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^3.0
psr/event-dispatcher Version ^1.0
composer/ca-bundle Version ^1.5