Download the PHP package sanmai/shipandco-sdk without Composer

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

Ship&co API integration SDK

Latest Stable Version Coverage Status

Features:

This library is far from offering a complete set of API methods, but it should do the most important bits.

Something is amiss? Let us know, or, even better, send a PR!

Ship&co API documentation for your reference. Please note this is not in any way an official SDK of Ship&co, therefore most likely they won't be able to answer any questions about this SDK.

Installation

This SDK requires at least PHP 7.3. It was tested to work under PHP 7.3, 7.4, and 8.0.

Overview

Major parts are:

Usage

First, you need to acquire an access token as outlined in the documentation.

Next, instantiate a client using a convenient builder:

The builder has several more convenience methods to set timeouts and enable caching. Check with the source code.

Error handling

Error handling is built upon error responses. Exceptions are almost never thrown. If there's an exception, this has to be a truly exceptional situation, even a bug.

Requests

For every implemented request there's a runnable example. E.g. running this:

...Will output your registered carriers.

Examples come with a debugging output enabled so that you can experiment freely.

Obviosly, to run examples you'll need to have the library checked out:

List Carriers

List Addresses

List Warehouses

List Rates

Create Shipment

As far as shipments go, it's important to understand that requests for domestic shipments over Japan (Sagawa, Yamato, YuPack) are a bit different from an International shipments:

This SDK poses no restrictions on the number of fields specified in a request (other than that they should exist), thus it is a user responsibility (yours) to set correct fields for each type of request.

To safeguard you against unexpected billing charges, shipment requests are using the test environment by default (thus creating dummy labels). Make sure to set test to false in setup section to receive live labels.

Just like so:

License

This project is licensed under the terms of the MIT license.


All versions of shipandco-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
doctrine/annotations Version ^1.14
guzzlehttp/guzzle Version ^6.3 || ^7.0
jms/serializer Version ^3.9
sanmai/json-serializer Version ^0.1.1 || ^0.2.4
sanmai/pipeline Version ^5 || ^6
sanmai/sdk-common Version ^0.5.4
sanmai/version-info Version ^0.2.0
symfony/http-foundation Version ^4.4.7 || ^5.0.7
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 sanmai/shipandco-sdk contains the following files

Loading the files please wait ....