PHPackages                             carerix/cxrest-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. [API Development](/categories/api)
4. /
5. carerix/cxrest-client

ActiveLibrary[API Development](/categories/api)

carerix/cxrest-client
=====================

Client library for easy access to Carerix REST API

v2.4.0(11mo ago)07.4k↑133.3%3[1 issues](https://github.com/carerix/cxrest-client/issues)1MITPHP

Since Oct 19Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/carerix/cxrest-client)[ Packagist](https://packagist.org/packages/carerix/cxrest-client)[ RSS](/packages/carerix-cxrest-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (1)

Carerix REST API Client Library
===============================

[](#carerix-rest-api-client-library)

Client library to access your Carerix application via RESTful API ()

Installation
============

[](#installation)

Recommened way is to install the library using composer:

```
$ composer require carerix/cxrest-client
```

Basic usage
===========

[](#basic-usage)

### Bootstrapping:

[](#bootstrapping)

```
use Carerix\Api\Rest\Client;
use Carerix\Api\Rest\Manager;
use Carerix\Api\Rest\Entity;

$client = new Client();

$manager = new Manager($client);
$manager->autoDiscoverEntities();

$manager->setUsername(CUSTOMER_NAME);
$manager->setPassword(API_TOKEN);

Entity::setManager($manager);
```

### Usage:

[](#usage)

After entity manager was bootstrapped correctly

```
use Carerix\Api\Rest\Entity\CREmployee;
use Carerix\Api\Rest\Entity\CRUser;

// get user by ID
$user = CRUser::find(125);

// apply for a job
$params = array('x-cx-pub' => PUBLICATION_ID_GOES_HERE);

$employee = new CREmployee();
$employee
    ->setFirstName('John')
    ->setLastName('Smith');
$employee->apply($params);
```

OAuth2 usage
============

[](#oauth2-usage)

- Configure [confidential client](https://help.carerix.com/en/articles/9502919-client-setup#h_3411d95f4b)

Important

use ***urn:cx/xmlapi:data:manage*** as Default scope

- Copy **CLIENT\_ID**, **CLIENT\_SECRET**

Warning

**CLIENT\_SECRET** will be available to copy only once

- Copy `OpenID Configuration` url (from Carerix UI) as **CONFIGURATION\_URL**
- Configure entity manager to use OAuth2 authorization:

```
use Carerix\Api\Rest\Client;
use Carerix\Api\Rest\Manager;
use Carerix\Api\Rest\Entity;

$client = new Client();

$manager = new Manager($client);
$manager->autoDiscoverEntities();

$manager->configureOAuth2Auth(CONFIGURATION_URL, CLIENT_ID, CLIENT_SECRET);

Entity::setManager($manager);
```

Note

After OAuth2 autorization configured usage is the same as [Basic usage](#usage)

Resources
=========

[](#resources)

 - CxRest Api
 - CxRestApi methods
[https://help.carerix.com/en/articles/9502919-client-setup#h\_3411d95f4b](https://help.carerix.com/en/articles/9502919-client-setup#h_3411d95f4b) - OAuth2 confidential client setup

Important

use ***urn:cx/xmlapi:data:manage*** as Default scope

License
=======

[](#license)

All contents of this project is licensed under the MIT license. See `LICENSE` file for details.

Acknowledgements
================

[](#acknowledgements)

This project is highly inspired by Doctrine's ([www.doctrine-project.org](http://www.doctrine-project.org)) implementation of the ActiveRecord pattern and Doctrine REST API Client.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance50

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~209 days

Total

4

Last Release

359d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57642829?v=4)[CxDevelopment](/maintainers/cx-development)[@cx-development](https://github.com/cx-development)

---

Top Contributors

[![cx-development](https://avatars.githubusercontent.com/u/57642829?v=4)](https://github.com/cx-development "cx-development (4 commits)")[![VadymKovalenko](https://avatars.githubusercontent.com/u/74653510?v=4)](https://github.com/VadymKovalenko "VadymKovalenko (3 commits)")

### Embed Badge

![Health badge](/badges/carerix-cxrest-client/health.svg)

```
[![Health](https://phpackages.com/badges/carerix-cxrest-client/health.svg)](https://phpackages.com/packages/carerix-cxrest-client)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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