PHPackages                             valsplat/harvest-php-client - 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. valsplat/harvest-php-client

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

valsplat/harvest-php-client
===========================

A PHP Client for the Harvest V2 API

v1.0(7y ago)1941MITPHPPHP &gt;=7.1

Since Jan 4Pushed 6y ago2 watchersCompare

[ Source](https://github.com/valsplat/harvest-php-client)[ Packagist](https://packagist.org/packages/valsplat/harvest-php-client)[ Docs](https://github.com/valsplat/harvest-php-client)[ RSS](/packages/valsplat-harvest-php-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

 [![](https://camo.githubusercontent.com/9c3486cd5778797ed5c2d554362f8f9ae00f714e566a6f17ca98e4bf42a3a27f/68747470733a2f2f7777772e676574686172766573742e636f6d2f6173736574732f70726573732f686172766573742d6c6f676f2d69636f6e2d373761366638353531303265326638356137666265303730353735663239333334366136343363333731613439636566663334316432383134653237303436382e706e67)](https://camo.githubusercontent.com/9c3486cd5778797ed5c2d554362f8f9ae00f714e566a6f17ca98e4bf42a3a27f/68747470733a2f2f7777772e676574686172766573742e636f6d2f6173736574732f70726573732f686172766573742d6c6f676f2d69636f6e2d373761366638353531303265326638356137666265303730353735663239333334366136343363333731613439636566663334316432383134653237303436382e706e67)

### (Unofficial) Harvest v2 API Client for PHP

[](#unofficial-harvest-v2-api-client-for-php)

Contributing
------------

[](#contributing)

```
$ git clone git@github.com:valsplat/harvest-php-client.git
$ cd harvest-php-client
$ composer update -o

```

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

[](#installation)

```
$ composer require valsplat/harvest-php-client

```

Endpoints
---------

[](#endpoints)

This API client is very much a work in progress and is incomplete at this time. You can only use the `Client`, `Project`, `Task`, `TaskAssignment`, `User` and `UserAssignment` endpoints. Feel free to create a Pull Request to increase coverage.

Authentication
--------------

[](#authentication)

Authentication is done via providing your account ID and a personal access token:

```
$connection = new \Valsplat\Harvest\Connection();
$connection->setAccessToken('ACCESS_TOKEN');
$connection->setAccountId('ACCOUNT_ID');

```

Get your token and account ID here: [https://id.getharvest.com/oauth2/access\_tokens/new](https://id.getharvest.com/oauth2/access_tokens/new)

Errors
------

[](#errors)

The API client throws two exceptions:

- `\Valsplat\Harvest\Exceptions\NotFoundException` - Entity could not be found
- `\Valsplat\Harvest\Exceptions\ApiException` - Generic Api exception

Basic Usage
-----------

[](#basic-usage)

Each endpoint is accessible via its own method on the `\Valsplat\Harvest\Harvest` instance. The method name is singular, camelcased:

```
$vlak = new \Valsplat\Harvest\Harvest($connection);
$vlak->TaskAssignment();

```

Generic methods &amp; filters
-----------------------------

[](#generic-methods--filters)

- `list((array)params)` - get a collection of entities. You find the available params per endpoint in the [Harvest docs](https://help.getharvest.com/api-v2/).
- `get((int)id)` - get a single entity via its id.
- `create()` - create given entity.
- `update()` - update given entity.
- `save()` - convenience method; calls `update()` if the entity already exists, `create()` otherwise.
- `delete()` - delete given entity.

Usage examples
--------------

[](#usage-examples)

Authentication and usage examples: [example.php](example.php)

TODO
----

[](#todo)

- Tests w/ mocked http client
- Complete endpoint support
- Automatic marshaling of attributes

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.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

Unknown

Total

1

Last Release

2685d ago

### Community

Maintainers

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

---

Top Contributors

[![jorisleker](https://avatars.githubusercontent.com/u/3286523?v=4)](https://github.com/jorisleker "jorisleker (12 commits)")[![bjornpost](https://avatars.githubusercontent.com/u/48628?v=4)](https://github.com/bjornpost "bjornpost (2 commits)")

---

Tags

phpapiGuzzleHarvest

### Embed Badge

![Health badge](/badges/valsplat-harvest-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/valsplat-harvest-php-client/health.svg)](https://phpackages.com/packages/valsplat-harvest-php-client)
```

###  Alternatives

[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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