Download the PHP package smart-dato/post-it-sdk without Composer
On this page you can find all versions of the php package smart-dato/post-it-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smart-dato/post-it-sdk
More information about smart-dato/post-it-sdk
Files in smart-dato/post-it-sdk
Package post-it-sdk
Short Description Poste Italiane (POST_IT) shipping API SDK for Laravel — Saloon-based client with typed DTOs.
License MIT
Homepage https://github.com/smart-dato/post-it-sdk
Informations about the package post-it-sdk
Poste Italiane SDK for Laravel
Saloon-based client for the Poste Italiane (POST_IT) shipping API.
- OAuth-style session authentication (
POST /user/sessions) with in-memory token caching - Waybill creation (
POST /postalandlogistics/parcel/waybill) — returns label PDF URL - Shipment tracking (
POST /postalandlogistics/parcel/tracking) — returns normalised events - Typed readonly DTOs for every request and response payload
- Mockable end-to-end via Saloon's
MockClient
Installation
The service provider is auto-discovered. Optionally publish the config file:
Configuration
The SDK is credential-free by default — it does not read credentials from
config or env. Pass them explicitly when constructing PostIt. The published
config file (config/post-it-sdk.php) is provided as a convenience for
single-account integrations that want to centralise defaults; multi-tenant
applications typically store credentials per CarrierAccount row.
Creating a waybill
PostItApiException is thrown when the upstream returns
result.errorCode !== 0 or when the response is missing required fields.
Tracking a shipment
Pass fullHistory: false to receive only the latest tracing state instead of
the entire history.
Print formats
printFormat is a free-form string because Poste Italiane accepts
contract-specific values:
If your account uses a different value, pass it as a raw string.
Testing
The SDK tests itself with Saloon's MockClient. Consumer applications can do
the same:
Quality gate
License
MIT — see LICENSE.md.
All versions of post-it-sdk with dependencies
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
saloonphp/saloon Version ^4.0
saloonphp/laravel-plugin Version ^4.0
spatie/laravel-package-tools Version ^1.16