A PHP library for implement the Packlink API REST service from Packlink Shipping, S.L. https://packlink.com
This is the PackLink PHP SDK. This SDK contains methods for easily interacting with the PackLink API. Below are examples to get you started.
To install the SDK, you will need to be using Composer in your project. If you aren't using Composer yet, it's really simple! Here's how to install composer:
curl -sS https://getcomposer.org/installer | php
The packlink api client is not hard coupled to Guzzle or any other library that sends HTTP messages. It uses the PSR-18 client abstraction. This will give you the flexibilty to choose what PSR-7 implementation and HTTP client to use.
If you just want to get started quickly you should run the following command:
composer require shakaran/packlink-php-sdk kriswallsmith/buzz nyholm/psr7
To start using the Api SDK client, you need create an instance with your api key like this:
<?php
namespace MyCompany;
require __DIR__ . '/vendor/autoload.php';
use PackLink\ApiClient;
$apiKey = 'your_api_key';
// Create and configure the initial api client
$api = ApiClient::create($apiKey, 'https://api.packlink.com');
Under the Examples directory you can find several examples of how to use more deeply this API.
Do you like my work? I am a Senior Backend Freelancer & Sysadmin, you can hire me to modify/implement/customize your custom develoment or integration of this API in your project, just open a issue for contact me or drop me an email to angel@guzmanmaeso.com!