2017 © Pedro Peláez
 

library sendcloud-php-client

A PHP Client for the SendCloud API

image

picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  • Wednesday, February 28, 2018
  • by stephangroen
  • Repository
  • 6 Watchers
  • 7 Stars
  • 29,741 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 2 Open issues
  • 26 Versions
  • 10 % Grown

The README.md

SendCloud PHP API Client

An unofficial client for the SendCloud API. More info about SendCloud on http://sendcloud.nl. Below are some examples on the usage of this client., (*1)

Full docs of the SendCloud API can be found on https://docs.sendcloud.sc/api/v2/index.html, (*2)

Installation

This project can easily be installed through Composer., (*3)

composer require picqer/sendcloud-php-client

Set-up connection

Prepare the client for connecting to SendCloud with your API key, API secret and Sendcloud Partner id (optional), (*4)

$connection = new \Picqer\Carriers\SendCloud\Connection('apikey', 'apisecret', 'partnerid');
$sendCloud = new \Picqer\Carriers\SendCloud\SendCloud($connection);

Get all parcels

Returns an array of Parcel objects, (*5)

$parcels = $sendCloud->parcels()->all();

Get a single parcel

Returns a Parcel object, (*6)

$parcel = $sendCloud->parcels()->find(2342);

Create a new parcel

$parcel = $sendCloud->parcels();

$parcel->name = 'John Smith';
$parcel->company_name = 'ACME';
$parcel->address = 'Wellingtonstreet 25';
$parcel->city = 'Wellington';
$parcel->postal_code = '3423 DD';
$parcel->country = 'NL';
$parcel->requestShipment = true;
$parcel->shipment = 10; // Shipping method, get possibilities from $sendCloud->shippingMethods()->all()
$parcel->order_number = 'ORDER2014-52321';

$parcel->save();

Exceptions

Actions to the API may cause an Exception to be thrown in case something went wrong, (*7)

try {
    $parcel->save();
} catch (SendCloudApiException $e) {
    throw new Exception($e->getMessage());
}

The Versions

28/02 2018

dev-master

9999999-dev http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

28/02 2018

v2.3.10

2.3.10.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

04/09 2017

v2.3.9

2.3.9.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

17/08 2017

v2.3.8

2.3.8.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

17/08 2017

dev-add-label-attribute-to-parcel

dev-add-label-attribute-to-parcel http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

31/07 2017

v2.3.7

2.3.7.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

10/07 2017

v2.3.6

2.3.6.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

03/07 2017

v2.3.5

2.3.5.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

28/06 2017

v2.3.4

2.3.4.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

10/05 2017

v2.3.3

2.3.3.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

16/03 2017

v2.3.2

2.3.2.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

10/03 2017

v2.3.1

2.3.1.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

24/12 2016

v2.3.0

2.3.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

18/08 2016

v2.2.2

2.2.2.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

27/07 2016

v2.2.1

2.2.1.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

15/02 2016

v2.2.0

2.2.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

01/02 2016

v2.1.3

2.1.3.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

18/12 2015

v2.1.2

2.1.2.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

23/11 2015

v2.1.1

2.1.1.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

23/11 2015

v2.1.0

2.1.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

22/10 2015

v2.0.3

2.0.3.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

22/10 2015

v2.0.2

2.0.2.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

18/08 2015

v2.0.1

2.0.1.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

18/06 2015

v2.0.0

2.0.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

15/04 2015

v1.1.0

1.1.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud

25/10 2014

v1.0.0

1.0.0.0 http://github.com/picqer/sendcloud-php-client

A PHP Client for the SendCloud API

  Sources   Download

MIT

The Requires

 

api php sendcloud