PHPackages                             bertmaurau/yuki-php-wrapper - 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. bertmaurau/yuki-php-wrapper

ActiveLibrary[API Development](/categories/api)

bertmaurau/yuki-php-wrapper
===========================

PHP Wrapper for the Yuki SOAP Webservice

2.2.1(8y ago)13.7k↑100%3PHPPHP &gt;=5.4.0

Since Oct 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/BertMaurau/yuki-php-wrapper)[ Packagist](https://packagist.org/packages/bertmaurau/yuki-php-wrapper)[ RSS](/packages/bertmaurau-yuki-php-wrapper/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

yuki-wrapper
============

[](#yuki-wrapper)

PHP Wrapper for the Yuki SOAP Webservice

Currently available

- Common Functions
- Sales (Invoicing)
- PettyCash (Import CSV files)

Installation with Composer
--------------------------

[](#installation-with-composer)

```
curl -s http://getcomposer.org/installer | php
php composer.phar require "bertmaurau/yuki-php-wrapper"

```

Usage
-----

[](#usage)

```
try {
    $yuki = (new \Yuki())
            -> setAccessKey(getenv('API_TOKEN'))
            -> setAdministrationID(getenv('ADMINISTRATION_ID'))
            -> authenticate();
} catch (\Exception $ex) {
    echo $ex -> getMessage();
    exit;
}

// Do stuffs here

```

Methods
-------

[](#methods)

### Common

[](#common)

- Administrations

    **Required**: Session ID
    **Throws**: InvalidSessionIDException
    **Returns**: List of active administration models

    ```
    $yuki -> administrations();

    ```
- GetAdministrationIDByName

    **Required**: Session ID 1 Administration Name
    **Throws**: InvalidAdministrationNameException
    **Returns**: The ID of the administration

    ```
    $yuki -> getAdministrationIDByName($administrationName);

    ```
- Authenticate

    **Required**: Access Key
    **Throws**: InvalidAccessKeyException

    ```
    $yuki -> authenticate();

    ```
- AuthenticateByUserName (deprecated)

    **Required**: UserName &amp; Password
    **Throws**: InvalidCredentialsException

    ```
    $yuki -> authenticateByUserName($userName, $password);

    ```
- Domains

    **Required**: Session ID
    **Throws**: InvalidSessionIDException
    **Returns**: List of active domain models

    ```
    $yuki -> domains();

    ```
- GetCurrentDomain

    **Required**: Session ID
    **Throws**: InvalidSessionIDException
    **Returns**: Returns current domain model

    ```
    $yuki -> getCurrentDomain();

    ```
- SetCurrentDomain

    **Required**: Domain ID
    **Throws**: InvalidSessionIDException

    ```
    $yuki -> setCurrentDomain($domainId);

    ```

### Sales

[](#sales)

- ProcessSalesInvoices

    **Required**: array of Invoices
    **Throws**: Exception &amp; InvalidSessionIDException &amp; InvalidAdministrationIDException &amp; InvalidSalesInvoiceException

    ```
    $yuki -> processSalesInvoices($salesInvoices);

    ```

### PettyCash

[](#pettycash)

- ImportStatementCSV

    **Required**: Statement Text
    **Throws**: Exception &amp; InvalidSessionIDException &amp; InvalidAdministrationIDException &amp; InvalidStatementTextException

    ```
    $yuki -> importStatementCSV($statementText);

    ```
- ImportStatementLine

    **Required**: StatementLine
    **Throws**: Exception &amp; InvalidStatementLineException

    ```
    $yuki -> importStatementLine(Model\StatementLine $statementLine);

    ```
- ImportStatementLineProject

    **Required**: StatementLineProject
    **Throws**: Exception &amp; InvalidStatementLineException

    ```
    $yuki -> importStatementLineProject(Model\StatementLineProject $statementLineProject);

    ```

### Getters &amp; Setters

[](#getters--setters)

- getSessionID()
- setSessionID()
- getAdministrationID()
- setAdministrationID()
- getAccessKey()
- setAccessKey()

Exceptions
----------

[](#exceptions)

The next Exceptions can be thrown:

- **InvalidAccessKeyException**: When there is no Access Key set.
- **InvalidAdministrationIDException**: When there is no Administration ID set.
- **InvalidAdministrationNameException**: When there is no Administration Name provided to get the ID.
- **InvalidCredentialsException**: When there is no UserName or Password given (Deprecated).
- **InvalidDomainIDException**: When there is no Domain ID set.
- **InvalidSessionIDException**: When there is no Session ID set (Gets set after Authentication).
- **InvalidStatementTextException**: When there is no Statement Text provided for import.
- **InvalidStatementLineException**: When there is no Statement Line provided for import.
- **InvalidValueTypeException**: When given value doesn't match the required type.
- **ModelNotFoundException**: When the requested model was not found.
- **NoAuthenticationResultException**: When the Authenticate didn't return the expected results
- **NonAllowedEnumValueException**: When given value isn't within the allowed enum list values

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Recently: every ~27 days

Total

7

Last Release

3060d ago

Major Versions

1.3.1 → 2.0.12017-10-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13157514?v=4)[Bert Maurau](/maintainers/BertMaurau)[@BertMaurau](https://github.com/BertMaurau)

---

Top Contributors

[![BertMaurau](https://avatars.githubusercontent.com/u/13157514?v=4)](https://github.com/BertMaurau "BertMaurau (88 commits)")

---

Tags

phplibrarywrapperyuki

### Embed Badge

![Health badge](/badges/bertmaurau-yuki-php-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/bertmaurau-yuki-php-wrapper/health.svg)](https://phpackages.com/packages/bertmaurau-yuki-php-wrapper)
```

###  Alternatives

[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16253.3k1](/packages/php-tmdb-laravel)[maxbeckers/amazon-alexa-php

Php library for amazon echo (alexa) skill development.

11557.7k2](/packages/maxbeckers-amazon-alexa-php)[ontraport/sdk-php

ONTRAPORT PHP Library

19390.5k2](/packages/ontraport-sdk-php)[php-tmdb/symfony

Symfony Bundle for TMDB (The Movie Database) API. Provides easy access to the php-tmdb/api library.

3549.8k](/packages/php-tmdb-symfony)

PHPackages © 2026

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