PHPackages                             service-direct/php-partners-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. [API Development](/categories/api)
4. /
5. service-direct/php-partners-sdk

ActiveLibrary[API Development](/categories/api)

service-direct/php-partners-sdk
===============================

A simple PHP library to integrate with Service Direct's Partners API

v1.1.6(7mo ago)5291MITPHPPHP &gt;=5.6.0

Since Jun 2Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/Service-Direct/php-partners-sdk)[ Packagist](https://packagist.org/packages/service-direct/php-partners-sdk)[ Docs](https://www.servicedirect.com)[ RSS](/packages/service-direct-php-partners-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (28)Used By (0)

Earn API Instructions + PHP Examples
====================================

[](#earn-api-instructions--php-examples)

Overview:
---------

[](#overview)

The purpose of this SDK it to ease the integration process for our affiliates who use PHP.

See full documentation for our APIs here:

- [Marketplace Phones API](https://docs.google.com/document/d/e/2PACX-1vSqTEv-aynxXNOSqj9xD4nwMrC9gfl-kE9J0UFWFNtrJcXIE7NE0l3tUH4Zro3cTHwXHmoe_JaHCmTW/pub)

### Install this library using Composer:

[](#install-this-library-using-composer)

`composer require service-direct/php-partners-sdk`

- See

### Response Codes

[](#response-codes)

The API responds with different HTTP status codes to better rely the result of a call. These response codes include `200`, `400`, `404`, etc. If your system is senstive to different response codes, the `suppress_response_codes` variable can be added to every response URL (e.g. `/partners/request?suppress_response_codes`) to always return a **200** HTTP status code.

The intended HTTP status code will be returned in the **x-original-status-code** header.

### Endpoints

[](#endpoints)

The SDK integrates with the following API Phone endpoints:

- `POST /partners/request` - request a phone bid
- `POST /partners/request/{request_id}/accept` - accept a phone bid
    - **This API endpoint should only be requested if the phone number is intended to be called.**
- `POST /partners/request/{request_id}/sold_price` - report the sold price a different buyer (other than Service Direct) paid

As well as the following dynamically changing open endpoint to get Service Direct's latest supported Service Categories:

- Phones: [https://api.servicedirect.com/resources/service\_categories?is\_marketplace=1](https://api.servicedirect.com/resources/service_categories?is_marketplace=1)

Examples
--------

[](#examples)

The SDK includes 3 example files to help facilitate your integration. In the example file, replace the placeholder value with your private Key to start testing.

```
use ServiceDirect\Partners\PartnersClient;

$key = '[YOUR_KEY_HERE]';

$client = new PartnersClient($key);
```

- Contact [Service Direct](https://servicedirect.com) in order to obtain your Private Key.
- This string must be kept hidden and treated like any other private credentials or passwords.
- Your Key is **required** in the Phones endpoints
- In all the example files, the optional value of **test\_mode** is set to **true**

Phones
------

[](#phones)

Using this SDK, a Publisher Partner who generates phone calls and wants to sell those leads to Service Direct can request a bid from Service Direct’s clients by submitting a request with a service category and zip code to `POST /partners/request`.

See \[1\] `examples/request-bid.php`

Then, if our client's bid is satisfactory, the Partner can accept the bid and receive a forwarding tracking phone number to route the caller to the winning client by sending a request to `POST /partners/request/{request_id}/accept`.

See \[2\] `examples/request-accept.php`

If, however, a different buy (other than Service Direct) won your lead, you can notify Service Direct of the sold price by sending a request to `POST /partners/request/{request_id}/sold_price`. This process helps us better understand the market value of your leads and adjust our bids accordingly.

See \[3\] `examples/request-sold-price.php`

General
-------

[](#general)

Publisher Partners can use our supporting endpoint to determine their best integration options:

- What Service Categories do we cover?
- [https://api.servicedirect.com/resources/service\_categories?is\_marketplace=1](https://api.servicedirect.com/resources/service_categories?is_marketplace=1)You can open these links directly in your browser to view the response

The response will be in the following format:

```
{
  "data": {
    "service_categories": [
      {
        "id":"20",
        "industry_master_id":"4",
        "name":"Plumbing"
      },
      {
        "id":"2",
        "industry_master_id":"1",
        "name":"Air Conditioning"
      },
      ...
    ],
    "master_service_categories": [
      /* not for the purpose of this SDK */
      ...
    ]
  }
}
```

For further assistance please contact

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance65

Regular maintenance activity

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~75 days

Recently: every ~40 days

Total

27

Last Release

214d ago

Major Versions

v0.3.3 → v1.0.02024-07-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/120e097ce2247694d06970e6875f5c32d818218013852ab264eded3918a5a652?d=identicon)[nimlevy](/maintainers/nimlevy)

---

Top Contributors

[![nimlevy](https://avatars.githubusercontent.com/u/29730061?v=4)](https://github.com/nimlevy "nimlevy (54 commits)")[![john-servicedirect](https://avatars.githubusercontent.com/u/70530727?v=4)](https://github.com/john-servicedirect "john-servicedirect (7 commits)")[![danielperlaky](https://avatars.githubusercontent.com/u/83686895?v=4)](https://github.com/danielperlaky "danielperlaky (3 commits)")[![johnturp](https://avatars.githubusercontent.com/u/19694909?v=4)](https://github.com/johnturp "johnturp (1 commits)")[![RyanMurphy3](https://avatars.githubusercontent.com/u/66331743?v=4)](https://github.com/RyanMurphy3 "RyanMurphy3 (1 commits)")

---

Tags

phpapisdkpartnersservice direct

### Embed Badge

![Health badge](/badges/service-direct-php-partners-sdk/health.svg)

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[clever/clever-php

231.6k](/packages/clever-clever-php)

PHPackages © 2026

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