Download the PHP package shusaura85/fancourier-api without Composer

On this page you can find all versions of the php package shusaura85/fancourier-api. 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 fancourier-api

FANCourier API v2.0

Table of contents

Information

This version of the library is designed for FANCourier API v2.0 (JSON based responses). The code works and there are examples for all API requests, however, the documentation is not yet ready.

All requests have the method getData() that returns the unprocessed response of the API. Aditional functions depend on the response object type to return processed data.

Installation

Requirements

NOTE At the moment it's designed to work with PHP 7.0 and newer.
However, the plan is to add type and return type declarations for all functions that will push the requirements to PHP 8.1 at the minimum

Composer

Require the package via composer

Manual

If used without composer, you will need to manually require the autoload.php file

Usage

At the moment complete and proper documentation is not yet available. However, there are examples for every request type you can make.
Inside them you will also find comments with complete function list for each request, response and object.

Authentication

Create a new instance of Fancourier.php supplying the client_id, username, password and token.

Or you can use the test instance static method:

The generated token has a life time of 24 hours and must be refreshed after this period. You can get the generated token using the function:

If the specified token is empty when creating the instance, it will be generated automatically on the first request.

Get estimated shipping cost

Request

Response

Create AWB

Request

Response

Create AWB in bulk

Unlike the previous version, there is no longer a CreateAwbBulk request. Simply create as many AWBIntern objects and add them to the request

Request

Response

Track AWB

Request

Response

Track awb in bulk

Unlike previous version, you can use the same TrackAwb() object and add as many AWB's as you need to Track

Request

Response

FANBox

You can now easily get information about available FANBox and PayPoint locations. FAN Courier calls there PUDO (Pick Up Drop Off).
When creating an AWB for them, set the address to the PUDO address as received here as well as calling the function setPickupLocation(PUDO_ID) with the ID of the selected PUDO.

Request

Response

Print AWB

The print request can print one or more AWBs using a single request.
You can specify the size of the AWB using the ->setSize() function. Available options are: empty, A4, A5 and A6. A6 can only be used with ePod option.
PDF printing is the default mode of printing.
Please note that you can't request ZPL and PDF at the same time. Using setPdf() will automatically disable ZPL option if set.

Request

Response

Print AWB ZPL

You can request the AWB in the ZPL format (Zebra Programming Language) for use with a label printer.
Please note that you can't request ZPL and PDF at the same time. Using setZpl() will automatically disable PDF option if set.

Request

Response

Print AWB Html

If you want the AWB in a HTML format, just use ->setPdf(false) to get HTML data instead of PDF.

Request

Response

Delete AWB

Request

Response

License

Fancourier Api is open-source software licensed under the MIT license.


All versions of fancourier-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-curl Version *
ext-json Version *
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 shusaura85/fancourier-api contains the following files

Loading the files please wait ....