PHPackages                             hrflow/hrflow-php-api - 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. hrflow/hrflow-php-api

ActiveLibrary

hrflow/hrflow-php-api
=====================

An api client for hrflow

1.3.2(6y ago)1762[2 PRs](https://github.com/Riminder/php-hrflow-api/pulls)MITPHPPHP ^7.2

Since Apr 20Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Riminder/php-hrflow-api)[ Packagist](https://packagist.org/packages/hrflow/hrflow-php-api)[ RSS](/packages/hrflow-hrflow-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

### Hrflow API PHP

[](#hrflow-api-php)

🐘 Hrflow API PHP Wrapper

---

Installation with composer
--------------------------

[](#installation-with-composer)

```
composer require hrflow/hrflow-php-api

```

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

[](#authentication)

To authenticate against the api, get your API SECRET KEY from your hrflow dashboard: [![findApiSecret](secretLocation.png)](secretLocation.png)

Then create a new `Hrflow` object with this key:

```
require __DIR__ . '/vendor/autoload.php';

// Authentication to api
$client = new Client('yourShinyKey');

// Now, you can use the api, Congrats !
```

API Overview
------------

[](#api-overview)

```
require __DIR__ . '/vendor/autoload.php';

// Authentication to api
$client = new Client('yourShinyKey');

$profile = $client->profile->parsing->get("a62ae2d5560fca7b34bb6c0c389a378f99bcdd52",new ProfileId("597b16789ba389cbc67a638d808b8f40220ba988"));
$name = $profile['name']['text'];
$profile_id = $profile['profile_id'];

echo "Profile '$profile_id' is named '$name', a beautiful name actually";
```

Errors
======

[](#errors)

If an error occurs while an operation an exception of type `HrflowApiException` is raised.

Profile the ID or the reference
===============================

[](#profile-the-id-or-the-reference)

Methods that needs an profile id or reference takes a `ProfileID` or a `ProfileReference`, they are interchangeable.

```
$profile_id = new ProfileID('102b6aa635fnf8ar70e7888ee63c0jde0c753dtg');
$profile_reference = new ProfileReference('reference01');
$source_id = '34566aa635fnrtar70e7568ee6345jde0c75ert4';
// This:
$client->profile->parsing->get($profile_id, $source_id);
// Works as much as:
$client->profile->parsing->get($profile_reference, $source_id);
```

Job the ID or the reference
===========================

[](#job-the-id-or-the-reference)

It's works the same way as profile.

Methods &amp; Resources
-----------------------

[](#methods--resources)

`*_id` and `*_reference` are marked as `*_ident` for simplicity.

jobs
====

[](#jobs)

- Get all job for given team account : ```
    $jobs = $client->job->searching->get();
    ```

    - Get job's information associated with job id :

    ```
    $job = $client->job->parsing->get(new JobID("399329b780feda71db57957d24ec9ee87d3b55a9"));
    ```

Profiles
========

[](#profiles)

- Retrieve the profiles information associated with some source ids :

    ```
    $profiles = $client->profile->searching->get(array $source_ids, $name=null, $email=null, $location_geopoint=[], $location_distance=null, $summary_keywords=[], $text_keywords=[],
                        $experience_keywords=[], $experience_location_geopoint=[], $experience_location_distance=null, $experiences_duration_min=null, $experiences_duration_max=null,
                        $education_keywords=[], $education_location_geopoint=[], $education_location_distance=null, $educations_duration_min=null, $educations_duration_max=null,
                        $skills_dict=[], $languages_dict=[], $interests_dict=null, $labels_dict=null,
                        $date_start="1494539999", $date_end=null, $page=1, $limit=30, $sort_by='date_reception', $order_by='asc');
    ```
- Retrieve list of profile'score for given job :

    ```
    $client->profile->scoring->get(array $source_ids, $job_id=null, $stage=null, $use_agent=null, $name=null, $email=null, $location_geopoint=[], $location_distance=null, $summary_keywords=[], $text_keywords=[],
                        $experience_keywords=[], $experience_location_geopoint=[], $experience_location_distance=null, $experiences_duration_min=null, $experiences_duration_max=null,
                        $education_keywords=[], $education_location_geopoint=[], $education_location_distance=null, $educations_duration_min=null, $educations_duration_max=null,
                        $skills_dict=[], $languages_dict=[], $interests_dict=null, $labels_dict=null,
                        $date_start="1494539999", $date_end=null, $page=1, $limit=30, $sort_by='date_reception', $order_by='asc');
    ```
- Add a resume to a sourced id :

    ```
    $client->profile->add_file(string $source_id, $profile_file, $profile_content_type=null, $profile_reference=null, $timestamp_reception=null, $profile_labels=[], $profile_tags=[], $profile_metadatas=[], $sync_parsing=0);
    ```

`$profile_file` is a binary: $profile\_file = fopen("/path/2/file", "rb");

- Add a json to a sourced id : ```
    $client->profile->add_json($source_id, $profile_data, $profile_reference, $timestamp_reception, $profile_labels=[], $profile_tags=[], $profile_metadatas=[]);
    ```

`$profile_data` is an array like this:

```
```php
$profile_data = {
"name"    => "Harry Potter",
"email"   => "harry.potter@gmail.com",
"address" => "1 rue streeling",
"info"    => {
    "name"     => "Harry Potter",
    "email"    => "harry.potter@gmail.com",
    "phone"    => "0202",
    "location" => "somewhere",
    "urls"     => {
        "from_resume" => [],
        "linkedin"    => "",
        "twitter"     => "",
        "facebook"    => "",
        "github"      => "",
        "picture"     => ""},
    "location"        => {"text" => ""}},
"summary"     => "test summary",
"experiences" => [{
    "start"       => "15/02/1900",
    "end"         => "",
    "title"       => "Lead",
    "company"     => "Mathematic Departement",
    "location"    => {"text" => "Paris"},
    "description" => "Developping."
    }],
"educations" => [{
    "start"       => "12540",
    "end"         => "12550",
    "title"       => "Mathematicien",
    "school"      => "University",
    "description" => "Description",
    "location"    => {"text" => "Scotland"}
}],
"skills"      => ["manual skill", "Creative spirit", "Writing skills", "Communication"],
"languages"   => ["english"],
"interests"   => ["football"],
"tags"        => [],
"metadatas"   => [],
"labels"      => ["stage":"yes","job_id":"job_id"]
} ;
```

```

- Add all resume from a directory to a sourced id, use `$recurs` to enable recursive mode : ```
    add_folder(string $source_id, string $dir_path, bool $recurs=false, $timestamp_reception=null, $sync_parsing=0)
    ```

It returns an array like: `result[filename] = server_reponse`. Can throw `HrflowApiProfileUploadException`

- Get the profile information associated with both profile id and source id : ```
    $client->profile->parsing->get($source_id, $profile_ident);
    ```
- Retrieve the profile documents associated with both profile id and source id : ```
    $client->profile->attachment->list($source_id, $profile_ident);
    ```
- Retrieve the profile tags associated with both profile id and source id : ```
    $client->profile->tag->list($source_id, $profile_ident);
    ```
- Retrieve the profile metadata associated with both profile id and source id : ```
    $client->profile->metadata->list($source_id, $profile_ident);
    ```
- Retrieve the profile parsing data associated with both profile id and source id : ```
    $client->profile->parsing->get($profile_ident, $source_ident);
    ```
- Reveal the profile interpretability data associated with both profile id and source id related with the filter : ```
    $client->profile->revealing->get($profile_ident, $job_ident, $source_id);
    ```

Sources
=======

[](#sources)

- Get all sources for given team account: ```
    $client->source->list('python', 1, 1);
    ```
- Get the source information associated with source id: ```
    $client->source->get($source_id);
    ```

webhooks
========

[](#webhooks)

This package supplies webhooks support as well.

- Check for webhooks integration:

    ```
    $client->webhooks->check();
    ```
- Set an handler for an event (listed with HrflowEvents constants)

    ```
    $client->webhooks->setHandler($eventName, $callback);
    ```
- Check if the event has an handler

    ```
    $client->webhooks->isHandlerPresent($eventName);
    ```
- Remove handler for an event

    ```
    $client->webhooks->removeHandler($eventName);
    ```
- Handle the incoming webhooks request, you need to put as argument HTTP\_RIMINDER\_SIGNATURE as an argument.

    ```
    $client->webhooks->handle($encoded_datas);
    ```
- Example on how to handle webhooks

    ```
    $client = new Client('api_key', 'webhook_key');

    // Set an handler for webhooks event.
    // Event name argument is actually not mandatory
    $callback = function($webhook_data, $event_name) {
      print($event_name);
      var_dump($webhook_data);
      }
      // HrflowEvents contants can be use as well as string for event name
      // for example here HrflowEvents::PROFILE_PARSE_SUCCESS can be replaced
      // by 'profile.parse.success'
    $client->webhooks->setHandler(HrflowEvents::PROFILE_PARSE_SUCCESS, $callback);

    // Get the header of the request sent by the webhook.
    $encoded_header = [HTTP-RIMINDER-SIGNATURE => 'some encoded datas'];

      // Handle the webhook
    $client->webhooks->handle($encoded_header);
    ```

Constants
=========

[](#constants)

- `HrflowFields` Contains to fill profile's `args` array for /profiles constants.
- `HrflowSortBy` Contains sorting options constants.
- `HrflowOrderBy` Contains order options constants.
- `HrflowEvents` Constains event name for webhooks

Exception
=========

[](#exception)

- `HrflowApiException` parent of all thrown exception. Thrown when an error occurs.
- `HrflowApiResponseException` thrown when response http code is not a valid one.
    - `getHttpCode()` to get the http code of the response.
    - `getHttpMessage()` to get the reason of response error.
- `HrflowApiArgumentException` thrown when an invalid argument is pass to a method
- `HrflowApiProfileUploadException` thrown when an error occurs during file upload.
    - `getFailedFiles()` to get not sended files list.
    - `getFailedFilesWithTheirExp()` to get not sended files with their exception (like: `exception_occured_during_tranfert = failed_file_list[filename]`)
    - `getSuccefullySendedFiles()` to get successfuly sended files with their response from server (like: `server_reponse_for_sucessful_upload = sucess_file_list[filename]`)

For details about method's arguments and return values see [api's documentation](https://developers.hrflow.ai)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

2

Last Release

2219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cdf3b587bb0da7562b278d9f682d73f4fe7738d57879b958de8c001b4067d25?d=identicon)[hrflow](/maintainers/hrflow)

---

Top Contributors

[![alaeddinechhima](https://avatars.githubusercontent.com/u/30498170?v=4)](https://github.com/alaeddinechhima "alaeddinechhima (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hrflow-hrflow-php-api/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[drupal/core

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

19462.3M1.3k](/packages/drupal-core)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

714214.9k8](/packages/nutgram-nutgram)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)

PHPackages © 2026

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