PHPackages                             captain-courier/cidr - 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. captain-courier/cidr

ActiveLibrary

captain-courier/cidr
====================

Courier Integration Done Right!

0.1.0(12y ago)227AGPL-3.0PHPPHP &gt;=5.5.0

Since Sep 4Pushed 12y ago2 watchersCompare

[ Source](https://github.com/CaptainCourierIntegration/captain-courier-cidr)[ Packagist](https://packagist.org/packages/captain-courier/cidr)[ Docs](http://captaincourier.org)[ RSS](/packages/captain-courier-cidr/feed)WikiDiscussions develop Synced today

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

Cidr: Courier Integration Done Right!
=====================================

[](#cidr-courier-integration-done-right)

Cidr's goals are simpe, make working with couriers easy.

Cidr will be able to:

- provide the cheapest quotes from couriers
- create/view/delete/track shipment requests with minimum customization for a particular courier
- get shipping labels

Current features:

- create shipments with couriers ParcelForce and P4D

install
=======

[](#install)

Cidr source can be downloaded from github, or can be added as a dependency through Composer by adding the following your composer.json:

```
{
    ....
    "require": {
        ....
        "captain-courier/cidr": "*"
    }

}

```

setup
=====

[](#setup)

create a file res/credentials.yml in the project directory. It will look something like this:

```
ParcelForce:
    username:
    password:
P4D:
    username:
    apiKey:

```

Where you would replace `` with your username/password/apiKey. If you don't need one of the couriers, don't add it to the credentials.yml file. For example if you only needed ParcelForce then the credentials.yml file would look like:

```
ParcelForce:
    username:
    password:

```

Whilsts testing Cidr it is recommended to use test credentials instead of production credentials. P4D provide test credentials without signing up, just goto .

testing
=======

[](#testing)

Cidr uses Travis for testing, available [here](https://travis-ci.org/CaptainCourierIntegration/captain-courier-cidr). Cidr can be tested locally by running:

```
phpunit --configuration=phpunit.xml src/

```

usage
=====

[](#usage)

An example below for creating a shipment with ParcelForce:

```
use Cidr\Cidr;
use Cidr\CidrRequest;
use Cidr\CidrResponse;

// creates a new Cidr object
// the cidr object provides capabilities, which are objects that can only
// perform 1 task for 1 courier such as creating a consignment for ParcelForce.
$cidr = new Cidr();
$capability = $cidr->getCapability("ParcelForce", "CreateConsignment");
$request = new CidrRequest(...);

// submits the request to the courier[s] and returns a Cidr\CidrResponse object.
// response has a context properties which is different depending on the status of the response.
$response = $capability->submitCidrRequest($request);

// checks the request was successful, and prints out the assigned consignment number.
// if the request failed, it prints out the response context to get an idea why it has failed.
if (CidrResponse::STATUS_SUCCESS === $response->getStatus()) {
    // gets the consignment number assigned for the created shipment
    $consignmentNumber = $response->getResponseContext();
    print "consignment number is '${consignmentNumber}'\n";
    exit(0);
} else {
  print "request failed\n";
  print_r($response->getResponseContext());
  exit(1);
}

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4633d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d9a52bb4a3007200d7fd84f21f723fd490fec64fc0ab15ca36f0c73e696fa83?d=identicon)[joseph](/maintainers/joseph)

---

Top Contributors

[![commander-joseph](https://avatars.githubusercontent.com/u/5188628?v=4)](https://github.com/commander-joseph "commander-joseph (198 commits)")

---

Tags

trackingintegrationshippingcourierparcels

### Embed Badge

![Health badge](/badges/captain-courier-cidr/health.svg)

```
[![Health](https://phpackages.com/badges/captain-courier-cidr/health.svg)](https://phpackages.com/packages/captain-courier-cidr)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[shippo/shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

1711.8M2](/packages/shippo-shippo-php)[gavroche/ups-api

PHP UPS API

45613.2k](/packages/gavroche-ups-api)

PHPackages © 2026

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