Download the PHP package budgetlens/intrapost without Composer

On this page you can find all versions of the php package budgetlens/intrapost. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package intrapost

Intrapost PHP Client

Fluent PHP client for the Intrapost API: create shipments, generate labels, track parcels, and manage daily mail orders for PostNL, DHL, and GLS.

Requirements

Installation

Configuration

Standalone PHP

Laravel

The package includes auto-discovery, so the service provider and facade are registered automatically.

Publish the config file:

Add to your .env:

Use via dependency injection or facade:

Which API do you use when?

The Intrapost API is split into four resources. Below is a guide on when to use which one.

Mail Piece vs. Track & Trace

This is the most important distinction:

Mail Piece Track & Trace
What Letters and unregistered mail items Parcels with track & trace
When Sending regular mail (letters, cards, small mail items up to 2kg) Sending parcels that need to be tracked
Tracking No full track & trace, only registration and a label Full track & trace with VZ code and tracking link
Weight In grams (1-2000g) In kilograms
Products Standard, FixedDays 12 product types (standard, insured, registered, mailbox parcel, evening delivery, etc.)
Extra options Limited (dimensions, project code) Extensive (dimensions, pickup point, customs, signature, age check, etc.)

Rule of thumb: sending a letter or unregistered mail item? Use mailPiece(). Sending a parcel that needs to be tracked? Use trackTrace().

Overview of all calls

Method Use when...
Mail Piece
mailPiece()->create() You want to register a new mail piece and generate a label
mailPiece()->order() You want to retrieve the daily order of registered mail pieces (collective order)
mailPiece()->getLabel() You want to retrieve the label of a previously created mail piece again
Track & Trace
trackTrace()->create() You want to register a new parcel with track & trace (the most used call)
trackTrace()->createMailboxParcel() You specifically want to create a mailbox parcel with a ZPL label
trackTrace()->createLabels() You want to generate labels for multiple shipments in a single file
trackTrace()->getRetourLabel() You want to create a return label for an existing shipment
trackTrace()->cancel() You want to cancel a shipment (before it has been processed)
trackTrace()->search() You want to search shipments by date, zipcode, reference, etc.
trackTrace()->getFromId() You want to retrieve shipments by their Piece ID (max. 50 at a time)
trackTrace()->getFromVz() You want to retrieve shipments by their VZ code (max. 50 at a time)
Order (Daily Mail)
order()->createDailyMailOption1() Create a daily mail order (option 1)
order()->createDailyMailOption2() Create a daily mail order (option 2)
order()->createDailyMailOption3() Create a daily mail order (option 3)
Utility
utility()->lookupAddress() You want to validate/look up an address by zipcode + house number
utility()->productCodes() You want to request which product codes are available for your account
utility()->pickupPointsForAddress() You want to search pickup points near an address (for ParcelViaPickupLocation)
utility()->dropoffPointsForInternationalAddress() You want to search drop-off points for international shipments

Typical flow

Usage

Mail Pieces

Create a mail piece:

Shorthand product methods:

Order mail pieces:

Get a label:

Track & Trace Parcels

Create a shipment:

Available product shorthand methods:

Create a mailbox parcel:

Generate labels:

Get a return label:

Cancel a shipment:

Search shipments:

Look up by ID or VZ code:

Pickup at a Service Point

International Shipments with Customs

Daily Mail Orders

Utilities

Address lookup:

Product codes:

Pickup & drop-off points:

Supported Carriers

Carrier Enum
PostNL CarrierType::PostNL
DHL CarrierType::DHL
GLS CarrierType::GLS

Label Formats

Format Enum
ZPL Zebra 150x100mm LabelFormatType::ZplZebra150x100
PDF 150x100mm LabelFormatType::Pdf150x100

Error Handling

The client throws specific exceptions for different error scenarios:

Testing

Code Style

License

MIT License. See LICENSE for details.


All versions of intrapost with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package budgetlens/intrapost contains the following files

Loading the files please wait ...