Download the PHP package daika7ana/innoship-php-sdk without Composer

On this page you can find all versions of the php package daika7ana/innoship-php-sdk. 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 innoship-php-sdk

Innoship PHP SDK

[![CI](https://github.com/daika7ana/innoship-php-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/daika7ana/innoship-php-sdk/actions/workflows/ci.yml) [![PHP 8.3+](https://img.shields.io/badge/PHP-8.3%2B-777BB4?style=flat-square&logo=php)](https://www.php.net/) [![PHPUnit](https://img.shields.io/badge/PHPUnit-12%E2%80%9313-0A7BBB?style=flat-square)](docs/TESTING.md) [![PSR Standards](https://img.shields.io/badge/PSR-7%2F17%2F18-blue?style=flat-square)](https://www.php-fig.org/) [![License](https://img.shields.io/badge/license-GPL--3.0--or--later-green?style=flat-square)](LICENSE) A modern, type-safe PHP SDK for the **Innoship shipping API**

🚀 Framework-agnostic, API-key powered, fully typed with DTOs, production-ready, and built for multi-courier shipping.

Table of Contents

Features

Core Strengths

Perfect For

Requirements

Installation

Via Composer

Quick Start

Creating an order takes a single request DTO:

Get a price without creating an order:

Download a label as a PDF:

getLabel() returns the same label as base64 JSON ($label->contents) when you need it inline rather than as a file.

That's it! You've created an order, priced a shipment, and downloaded a label.

Configuration

Base URL & API Version

The default base URL is https://api.innoship.com. Override it for a proxy or a test gateway:

apiVersion is sent both as the api-version header and query parameter, as required by the API.

Environment Variables

Pass the key explicitly or let the client read INNOSHIP_API_KEY:

Requests throw AuthenticationException when the key is empty.

Request Timeouts

ClientConfig::timeout is null by default. Precedence: the per-call argument → ClientConfig::timeout → the transport's own default (GuzzleHttpClient uses 30 s to respond and 10 s to connect unless you pass timeout:/connectTimeout:; an injected GuzzleClient keeps its own configuration). A bare PSR-18 client keeps its own timeout and cannot receive the per-call argument — passing one throws InvalidArgumentException; combining a bare client with a non-null ClientConfig::timeout also throws.

Set a different SDK default with ClientConfig(timeout: ...) or override per call:

Authentication

X-Api-Key

Innoship uses a single API key header:

The SDK adds it to every request. 401 responses and a missing key both raise Daika7ana\Innoship\Exceptions\AuthenticationException.

apiVersion (default 1.0) is sent alongside it as both the api-version header and a query parameter.

Supported Resources

Resource Methods
orders() create, simulate, validate, simulateMultiple, importFile, delete, deleteParcel, updateStatus, updateParcels, updateCustomAttributes, getReturnAwbInfo, uploadDocuments, downloadDocument
prices() getPrices
labels() getLabel, downloadLabel, getVoucherLabel, getParcelLabel, createBulk, getBulk, getCustomLabel, getCustomParcelLabel
manifests() create, get
couriers() requestPickup, generateLocationId, listLocations, setLocationId
locations() list, get, create, update, delete, summary, validate, addCourier, removeCourier, updateCourierServices, uploadLogo, deleteLogo
notifications() sendSms, getByAwb, getByTemplate
offlineOrders() add, edit, activate
vouchers() create, activate
repository() add

See docs/RESOURCES.md for the endpoint map, parameters, and examples.

Scope Note

The SDK covers the endpoints published in the official Innoship Swagger (https://api.innoship.com/swagger/v1/swagger.json). Innoship's support docs also mention read-only endpoints on https://query.innoship.com (order retrieval, tracking, location lookup); those are not part of that Swagger and are therefore not wrapped.

Framework Support

Zero Framework Dependencies

The package carries no framework in require and works the same everywhere:

Custom HTTP Client

The SDK uses its Guzzle adapter by default. To supply your own transport, implement Daika7ana\Innoship\Http\HttpClientInterface:

A plain PSR-18 client is wrapped automatically, so Client::create(httpClient: $psr18Client) works. Such a client keeps its own timeout: leaving ClientConfig::timeout at null is required, otherwise the constructor throws InvalidArgumentException. Passing it together with a non-null ClientConfig::timeout throws as well. Implement HttpClientInterface instead if you need the SDK's per-request timeout.

Both forms use the bundled PSR-17 factories by default; you may also pass requestFactory: and streamFactory: explicitly to override them.

HttpClientInterface::sendRequest() accepts an optional timeout, so custom clients can honour per-request timeouts.

Testing

The suite is offline: tests run against a fake PSR-18 client and the JSON samples in tests/Fixtures/, and there is no live smoke suite.

Run Static Analysis

Run Full Test Suite

Run The Same Checks As CI

Test Environment Variables

None. The unit suite reads no environment variables, and no smoke suite needs credentials.

Documentation

Guide Purpose
📖 Quickstart First order, price, and label
🔧 Installation Setup details
⚙️ Configuration Base URL, API key, timeouts
🔐 Authentication API key handling
🔗 Resources Complete endpoint reference
📦 DTOs Request/response DTOs and enums
✅ Testing Running the suite
❌ Errors Exception handling
📚 All Docs Documentation index

Made with ❤️ **Questions?** [Check the docs](docs/USAGE.md) or [open an issue](../../issues)

All versions of innoship-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-json Version *
psr/http-message Version ^1.0 || ^2.0
psr/http-factory Version ^1.0
psr/http-client Version ^1.0
daika7ana/simple-collections Version ^1.0
guzzlehttp/guzzle Version ^7.0 || ^8.0
guzzlehttp/psr7 Version ^2.0 || ^3.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 daika7ana/innoship-php-sdk contains the following files

Loading the files please wait ...