Download the PHP package beziworld/laravel-idosell without Composer
On this page you can find all versions of the php package beziworld/laravel-idosell. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beziworld/laravel-idosell
More information about beziworld/laravel-idosell
Files in beziworld/laravel-idosell
Package laravel-idosell
Short Description Laravel client for the IdoSell Shop Admin API: multiple shops, typed orders, products, stock and prices, customers, packages and labels, returns, RMA, sales documents, webhooks with events and rate limit handling.
License MIT
Homepage https://github.com/beziworld/laravel-idosell
Informations about the package laravel-idosell
Laravel IdoSell
IdoSell Shop Admin API client for Laravel. Orders, products, stock and prices, customers, parcels and labels, returns, complaints and sales documents of one or many IdoSell shops:
- Admin API v8 (REST,
X-API-KEYor an IdoSell Apps bearer token), with 45 operations behind dedicated methods and a genericrequest()for the other 300 - multiple shops: named connections and runtime credentials stored per tenant (agencies, SaaS)
- typed, immutable objects for orders (lines, addresses, payments), products (sizes, stock per warehouse),
customers, returns, complaints, parcels, labels and documents; amounts are decimal strings with the
currency next to them, dates are
CarbonImmutablein the shop time zone - lazy iterators over every paginated search (
resultsPagefrom 0, up to 100 per page) - stock and price writers that chunk to the 100-element limit and collect per-item errors of
207 Multi-Status - webhooks: route with bearer token (and optional
x-iai-signature) verification and a Laravel event - error envelope (
errors.faultCode/faultString,X-Error) turned into exceptions; 429 handled without ever retrying writes
Polska wersja dokumentacji
What this package adds. Packagist has no Laravel package for IdoSell and no maintained PHP client for the v8 REST Admin API (the official IdoSell SDK repository is empty). This package covers the integration work an agency repeats for every shop: configuration per shop, pagination, typed orders and products, stock and price writes within the API limits, labels and invoices as binary files, and verified webhooks.
Installation
Requires PHP 8.3+ and Laravel 12 or 13. Requests go to https://{domain}/api/admin/v8/...; change the major
version with IDOSELL_API_VERSION. Dates are exchanged without a time zone, so they are read and written in
IDOSELL_TIMEZONE (Europe/Warsaw by default). IdoSell has no sandbox: every call works on a real panel, and
API calls (including webhook deliveries) count towards the API usage of the shop.
Multiple shops
Orders
Synchronising orders with the scheduler
For several shops loop over IdoSell::connectionNames() (or your tenant table with IdoSell::using()) and keep
one cursor per shop.
Products, stock and prices
Shipments, tracking and labels
Returns, complaints and documents
Any other endpoint
List values in queries are joined with commas and nested arrays become key[sub]=..., as the API expects.
Webhooks
Webhooks are configured per API key in the panel (Settings > API > Access > Webhook): URL, events and an
optional authorization token, which IdoSell sends as Authorization: Bearer {token}.
Register https://your-app/idosell/webhook (default connection) or https://your-app/idosell/webhook/outlet.
Every verified delivery dispatches WebhookReceived; the payload is the response of the matching API gateway
(GET orders/orders for order events), so it maps to the same objects:
Failed deliveries (no 2xx answer) are retried every 10 minutes for an hour, then hourly for 23 hours; a webhook
failing for 7 days is disabled. The platform also sends x-iai-signature ("HMAC hash of the payload"); the
algorithm and key are not documented, so its check is opt-in (IDOSELL_WEBHOOK_SECRET,
IDOSELL_WEBHOOK_SIGNATURE_ALGORITHM=sha256). For tenant shops call
app(WebhookHandler::class)->handle($request, $client->config(), 'shop-7') from your own controller.
Rate limits
The Admin API answers 429 Too Many Requests when the shop limit is exceeded. Read requests are retried once
when Retry-After is at most IDOSELL_RETRY_MAX_WAIT seconds (10 by default); otherwise, and always for writes,
RateLimitExceeded is thrown with retryAfter(). Writes are never retried, because they are not idempotent.
Errors
| Exception | When | Details |
|---|---|---|
AuthenticationFailed |
HTTP 401 or 403 (invalid key, missing permission) | httpStatus(), faultString() holds the X-Error header, for example "Błędne hasło oraz login" |
ApiException |
errors.faultCode other than 0 and 2, HTTP 4xx/5xx, non-JSON body, connection failure |
faultCode(), faultString(), httpStatus(), method(), path(), body() |
RateLimitExceeded |
HTTP 429 not retried | retryAfter() |
InvalidResponse |
a label is not valid base64 | |
InvalidSignature |
webhook token or signature mismatch | |
InvalidConfiguration |
missing domain or credentials, unknown connection |
Fault code 2 ("Empty result") is not an error: searches return an empty list. Per-item failures of writes
(HTTP 207) do not throw; they are collected in WriteResult::$errors. All exceptions extend
Beziworld\IdoSell\Exceptions\IdoSellException.
Coverage of the API
| Resource | Admin API operations |
|---|---|
orders() |
POST orders/orders/search, GET/POST/PUT orders/orders, GET orders/statuses, POST orders/unfinished/search, GET orders/history, GET orders/packages, GET orders/labels, PUT orders/courier, PUT orders/shippingCosts, PUT orders/warehouse |
products() |
POST products/products/search, GET/POST/PUT products/products, POST products/products/delete, GET/PUT products/stocks, PUT products/stockQuantity, GET/PUT products/sizes |
customers() |
GET/POST/PUT clients/clients, GET clients/deliveryAddress |
shipments() |
GET couriers/couriers, GET couriers/pickupPoints, POST packages/packages/search, POST/PUT/DELETE packages/packages, GET/POST packages/labels |
returns() |
GET/POST/PUT returns/returns, GET returns/statuses |
rma() |
GET/PUT rma/rma, GET rma/statuses |
documents() |
GET orders/documents, POST orders/documents/create, POST orders/documents, POST orders/documents/delete |
The full OpenAPI document of a shop is published at https://{domain}/api/doc/admin/v8/json; every operation in
it can be called with request(), get(), post() or put().
Development
Tests use Http::fake() with stray requests prevented; nothing is sent to a real shop.
Author
Created and maintained by Kamil Ćwiertnia, beziworld.eu.
- E-mail: [email protected]
- Issues: GitHub issues
Need an e-commerce integration? Get in touch through beziworld.eu.
License
MIT. See LICENSE.md. This package is not affiliated with IdoSell (IAI S.A.).
All versions of laravel-idosell with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0