Download the PHP package gigerit/laravel-swiss-post-postcard-api-client without Composer

On this page you can find all versions of the php package gigerit/laravel-swiss-post-postcard-api-client. 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 laravel-swiss-post-postcard-api-client

Laravel Swiss Post Postcard API Client

Latest Version on Packagist GitHub CI Action Status Total Downloads

A Laravel package for sending physical postcards through the Swiss Post Postcard API. This package provides a complete, type-safe wrapper around the Swiss Post Postcard API, allowing you to programmatically send real postcards with images, addresses, branding, and QR codes.

Features:

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Configuration

Add your Swiss Post API credentials to your .env file:

Note: The URLs shown above are for the integration environment. Swiss Post will provide you with production URLs and credentials upon contract signing.

Quick Start

Using Dependency Injection

Using Facades

Manual Instantiation

Core Concepts

Postcard Workflow

  1. Check quota - Verify campaign has remaining postcards
  2. Create postcard - Initialize with recipient address
  3. Upload content - Add image, sender text, addresses
  4. Add branding - Optional logos, QR codes, custom stamps
  5. Approve - Submit for printing and sending

Image Requirements

Type Dimensions Format Purpose
Front Image 1819ร—1311 px JPEG/PNG Main postcard image
Branding Image 777ร—295 px JPEG/PNG Company branding
Stamp 343ร—248 px JPEG/PNG Custom stamp

All images should be RGB color mode at 300 DPI for optimal print quality.

Address Validation

The package validates addresses according to Swiss Post requirements:

API Services

The package is organized into three main services:

PostcardService

BrandingService

CampaignService

Error Handling

The package provides comprehensive error handling:

Validation

Client-side validation helps catch errors before API calls:

Advanced Usage

For more detailed examples and advanced usage patterns, see USAGE_EXAMPLES.md.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-swiss-post-postcard-api-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
saloonphp/saloon Version ^4.0
spatie/laravel-package-tools Version ^1.16
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 gigerit/laravel-swiss-post-postcard-api-client contains the following files

Loading the files please wait ...