PHPackages                             shayanizadi/routific - 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. [API Development](/categories/api)
4. /
5. shayanizadi/routific

ActiveLibrary[API Development](/categories/api)

shayanizadi/routific
====================

PHP library for the Routific API

v0.3.0(1y ago)34MITPHPPHP &gt;=7.2

Since Dec 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/shayan-izadi/routific-php)[ Packagist](https://packagist.org/packages/shayanizadi/routific)[ RSS](/packages/shayanizadi-routific/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

Routific PHP
============

[](#routific-php)

The Routific PHP library provides convenient access to the Routific API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.

Requirements
------------

[](#requirements)

PHP 8.3.0 and later.

Composer
--------

[](#composer)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require shayanizadi/routific
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once('vendor/autoload.php');
```

Getting Started
---------------

[](#getting-started)

Simply set your [Routific API key](https://docs.routific.com/reference/get-your-api-key):

```
$routific= new \Routific\ApiClient;
$routific->setApiKey('YOUR_API_KEY');
```

Documentation
-------------

[](#documentation)

See the [Routific API docs](https://docs.routific.com/reference/api-reference).

SET VISITS
----------

[](#set-visits)

First step you must set up your visit endpoints :

```
$order1 = array(
    "location" => array(
      "name" => "6800 Cambie",
      "lat" => 49.227107,
      "lng" => -123.1163085
));
$order2 = array(
    "location" => array(
      "name" => "3780 Arbutus",
      "lat" => 49.2474624,
      "lng" => -123.1532338
));
$order3 = array(
    "location" => array(
      "name" => "800 Robson",
      "lat" => 49.2819229,
      "lng" => -123.1211844
));
$visits = array(
    "order_1" => $order1,
    "order_2" => $order2,
    "order_3" => $order3
);

$routific->setVisits($visits);
```

SET VEHICLES
------------

[](#set-vehicles)

Then you can define your vehicles (drivers) :

```
$vehicle1 = array(
    "start_location" => array(
      "id" => "depot",
      "name" => "800 Kingsway",
      "lat" => 49.2553636,
      "lng" => -123.0873365
));

$vehicle2 = array(
    "start_location" => array(
      "id" => "depot",
      "name" => "800 Kingsway",
      "lat" => 49.2553636,
      "lng" => -123.0873365
));

$vehicles = array(
    "vehicle_1" => $vehicle1,
    "vehicle_2" => $vehicle2,
);

$routific->setVehicles($vehicles);
```

Optimize Route for Vehicle Routing
----------------------------------

[](#optimize-route-for-vehicle-routing)

Now you can choose based on your purpose to use API that suits your situation

If you want use just vehicle routing optimization:

```
$routific->vehicleApi->optimizeRoute();
```

Optimize Route for Pickup &amp; Delivery
----------------------------------------

[](#optimize-route-for-pickup--delivery)

If you are looking for Pickup and Delivery optimizer :

```
$routific->pickupDelivery->optimizeRoute();
```

Use Long Running tasks API
--------------------------

[](#use-long-running-tasks-api)

If you wish to use [Long Running Tasks Api](https://docs.routific.com/reference/vrp-long), you have to simply set input for optimizeRoute as TRUE:

```
$key=$routific->vehicleApi->optimizeRoute(TRUE);
 //OR
$key=$routific->pickupDelivery->optimizeRoute(TRUE);
```

Then you have to retrieve job that has been created:

```
$routific->jobApi->getJobDetails($key['job_id'])
```

For running tests
-----------------

[](#for-running-tests)

```
composer dump-autoload
php vendor/bin/phpunit tests
```

Appreciate Contributions
------------------------

[](#appreciate-contributions)

We welcome contributions from everyone! If you'd like to contribute to this project, follow these steps:

1- Fork the repository. 2- Create a new branch for your feature or bug fix 3- Commit your changes and push your branch 4- Open a pull request and explain your changes.

Your contributions will help make this project even better. Thank you for your support!

License
-------

[](#license)

This project is licensed under the MIT License. You are free to use, modify, and distribute this project as long as you include the original license file. For more details, see the [LICENSE file](https://github.com/shayan-izadi/routific-php/blob/main/LICENSE) .

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance66

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

4

Last Release

506d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/104488218?v=4)[Shayan Izadi](/maintainers/shayan-izadi)[@shayan-izadi](https://github.com/shayan-izadi)

---

Top Contributors

[![shayan-izadi](https://avatars.githubusercontent.com/u/104488218?v=4)](https://github.com/shayan-izadi "shayan-izadi (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shayanizadi-routific/health.svg)

```
[![Health](https://phpackages.com/badges/shayanizadi-routific/health.svg)](https://phpackages.com/packages/shayanizadi-routific)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M420](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
