- What is gigerit/laravel-swiss-post-postcard-api-client used for?
- It is a Laravel package for sending physical postcards through the Swiss Post Postcard API. It wraps API calls for creating postcard orders, uploading images, managing recipients, and tracking delivery. It is useful when you want Laravel or PHP workflows to trigger printed and mailed postcards.
- How do I install the Laravel Swiss Post Postcard API client?
- Install it with Composer using composer require gigerit/laravel-swiss-post-postcard-api-client. Then follow the package README for any configuration publishing, environment variables, and service provider registration. Laravel package auto-discovery may handle registration, but confirm the exact steps in the documentation.
- Does this package support Laravel 10 or Laravel 11?
- The package is built for Laravel, but exact supported framework versions are defined in its composer.json and README. Check those constraints before installing into Laravel 10, Laravel 11, or newer applications. If your version is not listed, review the source or open an issue with the maintainer.
- How do I send a physical postcard from Laravel with this package?
- Use the package client to create a postcard order, upload the required image, provide recipient details, and submit the order to Swiss Post. The README examples are the best starting point because they show the expected method calls and payloads. Validate addresses and image requirements before sending to avoid failed or misprinted postcards.
- How do I configure Swiss Post API credentials for this package?
- Configure the credentials issued for the Swiss Post Postcard API according to the package README, including any environment variables or config file it provides. Keep those credentials in your .env file and never commit them to source control. Authentication details come from Swiss Post rather than from the Laravel wrapper itself.
- Can I upload images and manage recipients with this Laravel package?
- Yes, the package overview states that it supports uploading images and managing recipients as part of the postcard order flow. Exact image formats, size limits, and recipient fields are defined by the Swiss Post API and documented in the README. Always validate user-supplied images and addresses before submitting an order.
- How can I track postcard delivery status with this package?
- The package supports tracking delivery, so you can check postcard status through its Laravel-friendly API client. Exact method names and response fields are documented in the README. Persist the postcard or order identifier returned by Swiss Post so you can query status later.
- Is this package suitable for production use with real postcards?
- It can be used in production because it wraps the real Swiss Post Postcard API, but sending physical mail has cost and irreversible side effects. Add validation, logging, and safeguards around order creation, and use test or sandbox credentials if Swiss Post provides them. Review the package README for supported versions and any production guidance.
- How should I test this package without sending real postcards?
- Mock the package client or the underlying HTTP calls in your Laravel tests so automated test runs do not create real Swiss Post orders. Use any sandbox or test credentials offered by Swiss Post if available. Keep a small manual test path for verifying image and recipient payloads before going live.
- What are alternatives to this package for sending postcards from Laravel?
- You can call the Swiss Post Postcard API directly using Laravel's HTTP client, or use another SDK or wrapper that covers the API. This package is specifically a Laravel-friendly client, so compare maintenance activity, Laravel version support, and API coverage. If you need multiple postcard providers, a custom abstraction may be more suitable.