PHPackages                             ezknock/ezknock-php-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. ezknock/ezknock-php-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ezknock/ezknock-php-sdk
=======================

EZ Knock API client built on top of HTTPlug

1.1.19(4mo ago)070Apache-2.0PHPPHP &gt;= 7.1

Since May 4Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ez-company/ezknock-php-sdk)[ Packagist](https://packagist.org/packages/ezknock/ezknock-php-sdk)[ RSS](/packages/ezknock-ezknock-php-sdk/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (15)Versions (31)Used By (0)

ezknock-php-sdk
===============

[](#ezknock-php-sdk)

[![packagist](https://camo.githubusercontent.com/f05876b07672140e90bab93b1e28197b956947b943bb280bfc48e8542a588859/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657a6b6e6f636b2f657a6b6e6f636b2d7068702d73646b)](https://packagist.org/packages/ezknock/ezknock-php-sdk)

> Official PHP bindings to the [EZ Knock API](https://api.ezknockmarketplace.com/docs)

Project Updates
---------------

[](#project-updates)

Installation
------------

[](#installation)

This library supports PHP 7.3 and later

This library uses [HTTPlug](https://github.com/php-http/httplug) as HTTP client. HTTPlug is an abstraction that allows this library to support many different HTTP Clients. Therefore, you need to provide it with an adapter for the HTTP library you prefer. You can find all the available adapters [in Packagist](https://packagist.org/providers/php-http/client-implementation). This documentation assumes you use the Guzzle7 Client, but you can replace it with any adapter that you prefer.

The recommended way to install ezknock-php-sdk is through [Composer](https://getcomposer.org):

```
composer require ezknock/ezknock-php-sdk php-http/guzzle7-adapter
```

Clients
-------

[](#clients)

Initialize your client using your access token:

```
use EZKnock\Client as EZKClient;

$client = new EZKClient('');
```

> If you already have an access token you can find it [here](https://developers.ezknockmarketplace.com/apps). If you want to create or learn more about access tokens then you can find more info [here](https://developers.ezknockmarketplace.com/docs#section-access-tokens).

For most use cases the code snippet above should suffice. However, if needed, you can customize the EZKnock client as follows:

### Use a custom HTTP client

[](#use-a-custom-http-client)

This client needs to implement `Psr\Http\Client\ClientInterface`

```
$client->setHttpClient($yourHttpClient);
```

### Use a custom request factory

[](#use-a-custom-request-factory)

This factory needs to implement `Http\Message\RequestFactory`

```
$client->setRequestFactory($yourRequestFactory);
```

### Use a custom URI factory

[](#use-a-custom-uri-factory)

This factory needs to implement `Http\Message\UriFactory`

```
$client->setUriFactory($yourUriFactory);
```

Coverage
--------

[](#coverage)

Get coverage information by Zip code.

```
try {
    $data = $client->buyers->coverage('73301');
    print_r($data);
} catch (Exception $ex) {
    print_r($ex->getMessage());
    print_r($ex->getDebug());
}
```

Create order
------------

[](#create-order)

Create an order

```
$data = [
    'recipients' => [
        [
            'firstname' => 'Ryann',
            'lastname' => 'Ullrich',
            'company' => 'Romaguera, Yundt and Marvin',
            'email' => 'nikita67@kihn.com'
        ]
    ],
    'address' => '2453 W Vita Locks Rapids',
    'address_2' => 'BLDG 377',
    'city' => 'Austin',
    'state' => 'TX',
    'zip' => '78749',
    'return_type' => 'default',
    'originals' => false,
    'witnessfees' => true,
    'instructions' => 'Aut perferendis et necessitatibus. Vel tempore molestiae ut nihil dolore. Rem dolor sed nulla cupiditate.',
    'min_attempts' => 3,
    'documents' => 'ORDER FOR ALTERNATIVE SERVICE AND TO EXTEND TIME FOR SERVICE OF PROCESS; SUMMONS; COMPLAINT; EXHIBIT; NOTICE TO DEFENDANT',
    'attempt_by' => '2021-05-10',
    'diligence_by' => '2021-05-15',
    'complete_by' => '2021-05-20',
    'service_files' => [fopen('/path/to/file.pdf', 'r')],
    'other_files' => [fopen('/path/to/file.pdf', 'r')],
    'return_file' => fopen('/path/to/file.pdf', 'r'),
    'qualifications' => [1, 2, 3],
    'costs' => [
        [
            'name' => 'delivery',
            'amount' => 50
        ],
        [
            'name' => 'rush',
            'amount' => 20
        ]
    ]
];

try {
    $order = $client->buyers->createOrder($data);
    print_r($order);
} catch (Exception $ex) {
    print_r($ex->getMessage());
    print_r($ex->getDebug());
}
```

Rate Limits
-----------

[](#rate-limits)

Rate limit info is passed via the rate limit headers. You can access this information as follows:

```
$rate_limit = $client->getRateLimit();
print("{$rate_limit['remaining']} {$rate_limit['limit']} \n");
print_r($rate_limit['reset_at']->format(DateTime::ISO8601));
```

For more info on rate limits and these headers please see the [API reference docs](https://developers.ezknockmarketplace.com/docs#rate-limiting)

Pagination
----------

[](#pagination)

When listing, the EZ Knock API may return a pagination object:

```
{
  "pages": {
    "next": "..."
  }
}
```

You can grab the next page of results using the client:

```
$client->nextPage($response->pages);
```

Exceptions
----------

[](#exceptions)

Exceptions are handled by HTTPlug. Every exception thrown implements `Http\Client\Exception`. See the [http client exceptions](http://docs.php-http.org/en/latest/httplug/exceptions.html) and the [client and server errors](http://docs.php-http.org/en/latest/plugins/error.html). The EZ Knock API may return an unsuccessful HTTP response, for example when a resource is not found (404). If you want to catch errors you can wrap your API call into a try/catch block:

```
try {
    $user = $client->buyers->coverage('73301');
} catch(Http\Client\Exception $e) {
    if ($e->getCode() == '404') {
        // Handle 404 error
        return;
    } else {
        throw $e;
    }
}
```

Pull Requests
-------------

[](#pull-requests)

- **Add tests!** Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour**. Make sure the README and any other relevant documentation are kept up-to-date.
- **Create topic branches**. Don't ask us to pull from your master branch.
- **One pull request per feature**. If you want to do more than one thing, send multiple pull requests.
- **Send coherent history**. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before sending them to us.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance74

Regular maintenance activity

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~58 days

Recently: every ~0 days

Total

30

Last Release

141d ago

Major Versions

0.2.1 → 1.0.02021-09-23

PHP version history (2 changes)0.0.1PHP &gt;= 7.3

0.0.3PHP &gt;= 7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae268d2ab8c40027a0734990564c4147625c4df62e053d03c2e87ef43fcd545c?d=identicon)[lodev09](/maintainers/lodev09)

---

Top Contributors

[![lodev09](https://avatars.githubusercontent.com/u/6686328?v=4)](https://github.com/lodev09 "lodev09 (55 commits)")[![imbizzyd](https://avatars.githubusercontent.com/u/35634892?v=4)](https://github.com/imbizzyd "imbizzyd (5 commits)")

---

Tags

apiGuzzleezknockezknockmarketplace.com

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ezknock-ezknock-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ezknock-ezknock-php-sdk/health.svg)](https://phpackages.com/packages/ezknock-ezknock-php-sdk)
```

###  Alternatives

[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)[retailcrm/api-client-php

PHP client for RetailCRM API

68981.8k1](/packages/retailcrm-api-client-php)[dhope0000/lxd

PHP-based API wrapper for LXD REST API.

136.2k](/packages/dhope0000-lxd)[brd6/notion-sdk-php

Notion SDK for PHP

5918.0k](/packages/brd6-notion-sdk-php)[apigee/apigee-client-php

Client library for connecting to the Apigee Edge API.

27558.7k3](/packages/apigee-apigee-client-php)

PHPackages © 2026

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