PHPackages                             stuartapp/stuart-client-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stuartapp/stuart-client-php

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

stuartapp/stuart-client-php
===========================

Stuart PHP client library

3.6.12(3y ago)18331.1k↓24.8%18[2 PRs](https://github.com/StuartApp/stuart-client-php/pulls)2MITPHPPHP &gt;=7.1

Since May 12Pushed 2y ago55 watchersCompare

[ Source](https://github.com/StuartApp/stuart-client-php)[ Packagist](https://packagist.org/packages/stuartapp/stuart-client-php)[ Docs](https://github.com/StuartApp/stuart-client-php/)[ RSS](/packages/stuartapp-stuart-client-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (41)Used By (2)

[![Codeship Status for StuartApp/stuart-client-php](https://camo.githubusercontent.com/654dc6bfe783bb0ec8ee065680f4d37f3da98f6986ebfb859344bc4e3db44307/68747470733a2f2f6170702e636f6465736869702e636f6d2f70726f6a656374732f61613034326633302d623135612d303133372d636466362d3461633732653539316135382f7374617475733f6272616e63683d6d6173746572)](https://app.codeship.com/projects/363052)

Stuart PHP Client
=================

[](#stuart-php-client)

For a complete documentation of all endpoints offered by the Stuart API, you can visit [Stuart API documentation](https://api-docs.stuart.com).

### Changelog

[](#changelog)

Visit [Changelog](CHANGELOG.md)

### Running the demo

[](#running-the-demo)

```
cd demo
docker build -t stuartphpdemo .
export PATH_TO_PROJECT="/PUT/HERE/YOUR/PATH/TO/PROJECT/stuart-client-php"
docker run -v $PATH_TO_PROJECT/src:/app/vendor/stuartapp/stuart-client-php/src stuartphpdemo
```

Install
-------

[](#install)

Via Composer:

```
$ composer require stuartapp/stuart-client-php
```

Usage
-----

[](#usage)

1. [Initialize Client](#initialize-client)
2. [Create a Job](#create-a-job)
    1. [Minimalist](#minimalist)
    2. [Complete](#complete)
        1. [With scheduling at pickup](#with-scheduling-at-pickup)
        2. [With scheduling at drop off](#with-scheduling-at-dropoff)
        3. [With stacking (multi-drop)](#with-stacking-multi-drop)
3. [Get a Job](#get-a-job)
4. [Cancel a Job](#cancel-a-job)
5. [Validate a Job](#validate-a-job)
6. [Cancel a delivery](#cancel-a-delivery)
7. [Get a pricing](#get-a-pricing)
8. [Get a job eta to pickup](#get-a-job-eta-to-pickup)
9. [Custom requests](#custom-requests)

### Import the library

[](#import-the-library)

If composer is not installed, install it:

```
$ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
```

Add the library to your project:

```
$ composer require stuartapp/stuart-client-php
```

### Autoloading

[](#autoloading)

In order to load all the classes from this library, just execute the autoload at the beginning of the Stuart code

```
