PHPackages                             oliveris/sdk-mycrystalhub - 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. oliveris/sdk-mycrystalhub

ActivePackage[API Development](/categories/api)

oliveris/sdk-mycrystalhub
=========================

A PHP-SDK for MyCrystalHub API

v1.0.9(7y ago)010MITPHP

Since Apr 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/oliveris/sdk-mycrystalhub)[ Packagist](https://packagist.org/packages/oliveris/sdk-mycrystalhub)[ RSS](/packages/oliveris-sdk-mycrystalhub/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

MyCrystalHub SDK
================

[](#mycrystalhub-sdk)

PHP-SDK for MyCrystalHub API
----------------------------

[](#php-sdk-for-mycrystalhub-api)

Used to access your companies data.

### Usage

[](#usage)

Pull in the composer package by running the command below:

```
composer require oliveris/sdk-mycrystalhub

```

Import the Crystal namespace into the class (autoloading)

```
use Crystal\Crystal;

```

Examples
--------

[](#examples)

### Setting your API environment

[](#setting-your-api-environment)

Below shows an example if you need to access a different environments API, for example, staging. By default it is set on production.

```
$crystal = new Crystal();
$crystal->setApiEnvironment('staging');

```

### Retrieving all of the companies clients

[](#retrieving-all-of-the-companies-clients)

Below is a basic example of how to make a request to retrieve your companies clients.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllClients();

```

### Retrieving all of the companies quotes

[](#retrieving-all-of-the-companies-quotes)

Below is a basic example of how to make a request to retrieve your companies quotes.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllQuotes();

```

### Retrieving all of the companies jobs

[](#retrieving-all-of-the-companies-jobs)

Below is a basic example of how to make a request to retrieve your companies jobs.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllJobs();

```

### Retrieving all of the companies invoices

[](#retrieving-all-of-the-companies-invoices)

Below is a basic example of how to make a request to retrieve your companies invoices.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllInvoices();

```

### Retrieving all of the companies employees

[](#retrieving-all-of-the-companies-employees)

Below is a basic example of how to make a request to retrieve your companies employees.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllEmployees();

```

### Retrieving a single client

[](#retrieving-a-single-client)

Below is a basic example of how to make a request to retrieve a single client.

The $client\_id variable should be an integer type.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveClient($client_id);

```

### Retrieving a single quote

[](#retrieving-a-single-quote)

Below is a basic example of how to make a request to retrieve a single quote.

The $quote\_ref variable should be a string type, eg 'QU1/1'.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveQuote($quote_ref);

```

### Retrieving a single job

[](#retrieving-a-single-job)

Below is a basic example of how to make a request to retrieve a single job.

The $job\_ref variable should be a string type, eg 'JO1/1'.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveJob($job_ref);

```

### Retrieving a single invoice

[](#retrieving-a-single-invoice)

Below is a basic example of how to make a request to retrieve a single invoice.

The $invoice\_ref variable should be a string type, eg 'IN1/1'.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveInvoice($invoice_ref);

```

### Retrieving a single employee

[](#retrieving-a-single-employee)

Below is a basic example of how to make a request to retrieve a single employee.

The $employee\_id variable should be an integer type.

```
$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveEmployee($employee_id);

```

### License

[](#license)

MyCrystalHub is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~20 days

Total

6

Last Release

2893d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20270046?v=4)[Sam](/maintainers/oliveris)[@oliveris](https://github.com/oliveris)

---

Top Contributors

[![oliveris](https://avatars.githubusercontent.com/u/20270046?v=4)](https://github.com/oliveris "oliveris (23 commits)")

---

Tags

crystalmycrystalhub

### Embed Badge

![Health badge](/badges/oliveris-sdk-mycrystalhub/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M932](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

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

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

49108.6k2](/packages/fschmtt-keycloak-rest-api-client-php)

PHPackages © 2026

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