PHPackages                             rolecode/php-minimax - 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. rolecode/php-minimax

ActiveLibrary

rolecode/php-minimax
====================

0.1.4(3y ago)013PHPPHP ^7.3|^8.0

Since Nov 5Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (6)Used By (0)

Minimax api php library
=======================

[](#minimax-api-php-library)

Library is still in development and is limited with features. More features will be added in the future.

Summary
-------

[](#summary)

1. [Installation](#installation)
2. [Examples of use](#examples-of-use)
3. [Licence](#licence)

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

[](#installation)

You can install library with composer:

```
composer require rolecode/php-minimax

```

Examples of use
---------------

[](#examples-of-use)

### Basic setup

[](#basic-setup)

```
    // Create minimax instance.
    $minimax = new MinimaxClient( "YOUR_MINIMAX_CLIENT_ID", "YOUR_MINIMAX_CLIENT_PASSWORD", "YOUR_MINIMAX_USER_NAME", "YOUR_MINIMAX_USER_PASSWORD" );

    // Retrieve organisations.
    $organisations =  $minimax->organisations->all();

    // Organisation must be set before performing other calls.
    $minimax->setOrganisationId( "YOUR_ORGANISATION_ID" );

```

### Document numbering

[](#document-numbering)

```
    $documentNumberingsAll = $minimax->documentNumberings->all();
    $documentNumberingId = $documentNumberings[0]->DocumentNumberingId;
    $documentNumberingRetrievedById = $minimax->documentNumberings->retrieve( $documentNumberingId );

```

### Employees

[](#employees)

```
    $allEmployees = $minimax->employees->all();
    $employeeId = $employees[0]->EmployeeId;
    $employeeRetrievedById = $minimax->employees->retrieve( $employeeId );

```

### Report templates

[](#report-templates)

```
    // List of request params: https://moj.minimax.si/SI/API/Help/Api/GET-api-orgs-organisationId-report-templates
    $reportTemplatesAll = $minimax->reportTemplates->all( ['SearchString' => 'IR'] );
    $reportTemplateId = $reportTemplates[0]->ReportTemplateId;
    $reportTemplateRetrievedById = $minimax->reportTemplates->retrieve( $reportTemplateId );

```

### Employees

[](#employees-1)

```
    $employeesAll = $minimax->employees->all();
    $employeeId = $employees[0]->EmployeeId;
    $employeeRetrievedById = $minimax->employees->retrieve( $employeeId );

```

### Items

[](#items)

```
    $items = $minimax->items->all( ['SearchString' => '111'] );
    $itemRetrievedById = $minimax->items->retrieveById( "INSERT_ID" );
    $itemRetrievedByCode = $minimax->items->retrieveByCode( "INSERT_CODE" );

    // Prepare item and create it.
    $item = new Item();
    $item->Name = "Example item.";
    $item->Code = 1;
    $item->ItemType = ItemType::GOOD;
    $item->VatRate = new mMApiFkField( 36 );
    $item->Currency = new mMApiFkField( 7 );
    $createdItem = $minimax->items->create( $item );

    // Update item.
    $item = $minimax->items->retrieveById( "INSERT_ID" );
    $item->Name = "New item name";
    $updatedItem = $minimax->items->update( $item );

    // Delete item.
    $minimax->items->delete( "ID" );

```

### Vatrates

[](#vatrates)

```
    $vatRates = $minimax->vatRates->all();
    $vatRateStandard = $minimax->vatRates->retrieveByCode( VatRateCode::STANDARD );

```

### Issued invoice

[](#issued-invoice)

```
    $invoicesAll = $minimax->issuedInvoices->all();
    $invoiceRetrievedById = $minimax->issuedInvoices->retrieveById( "INSERT_ID" );

    // Create invoice.
    // First prepare invoice rows.
    $invoiceRows = [];
    $row = new IssuedInvoiceRow();
    $row->RowNumber = 1;
    $row->Item = new mMApiFkField( "INSERT_ITEM_ID" );
    $row->Quantity = 1;
    $row->Price = 1;
    $row->PriceWithVAT = 1.22;
    $row->Value = $row->PriceWithVAT;
    $row->VatRate = new mMApiFkField( $vatRateStandard->VatRateId );
    $row->VATPercent = $vatRateStandard->Percent;
    $invoiceRows[] = $row;

    // Prepare invoice payments.
    $invoicePayments = [];
    $row = new IssuedInvoicePaymentMethod();
    $row->PaymentMethod = new mMApiFkField( $paymentMethod->PaymentMethodId );
    $row->AlreadyPaid = "D";
    $invoicePayments[] = $row;

    // Prepare invoice object.
    $invoice = new IssuedInvoice();
    $invoice->InvoiceType = "R";
    $invoice->Customer = new mMApiFkField( $customer->CustomerId );
    $invoice->DateIssued = date( Date::DATE_FORMAT );
    $invoice->DateTransactionFrom = $invoice->DateIssued;
    $invoice->DateTransaction = $invoice->DateIssued;
    $invoice->DateDue = date( Date::DATE_FORMAT )( Date::DATE_FORMAT );
    $invoice->IssuedInvoiceRows = $invoiceRows;
    $invoice->IssuedInvoicePaymentMethods = $invoicePayments;

    // Create invoice.
    $invoice = $minimax->issuedInvoices->create( $invoice );

    // Issue and generate pdf for invoice.
    $invoice = $minimax->issuedInvoices->performAction( $invoice->IssuedInvoiceId, $invoice->RowVersion, "issueAndGeneratepdf" );

    // Retrieve invoice document pdf.
    $documentId = $invoice->Document->ID;
    $documentAttachmentId = $invoice->InvoiceAttachment->ID;
    $documentAttachment = $minimax->documentAttachments->retrieve( $documentId, $documentAttachmentId );

   // Save file to disk.
    file_put_contents($documentAttachment->FileName, $documentAttachment->getDecodedAttachmentData());

```

Licence
-------

[](#licence)

Library is made available under the MIT License (MIT). Please see License File for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

Every ~21 days

Total

5

Last Release

1204d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7612b98f419c9624cece8302f9b72fc53bbb8458d1109d58ba2e7016ce51da69?d=identicon)[roklesjak](/maintainers/roklesjak)

---

Top Contributors

[![contenta-rok](https://avatars.githubusercontent.com/u/73519437?v=4)](https://github.com/contenta-rok "contenta-rok (4 commits)")[![rolecode](https://avatars.githubusercontent.com/u/73166490?v=4)](https://github.com/rolecode "rolecode (2 commits)")

### Embed Badge

![Health badge](/badges/rolecode-php-minimax/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[nkl-kst/the-sports-db

PHP library to get sports data from TheSportsDB (https://www.thesportsdb.com)

271.2k](/packages/nkl-kst-the-sports-db)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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