PHPackages                             team-nifty-gmbh/resellerinterface-sdk - 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. team-nifty-gmbh/resellerinterface-sdk

ActiveLibrary[API Development](/categories/api)

team-nifty-gmbh/resellerinterface-sdk
=====================================

SDK for ResellerInterface API

v1.0.4(5mo ago)0417[1 PRs](https://github.com/Team-Nifty-GmbH/resellerinterface-sdk/pulls)MITPHPPHP ^8.3

Since Sep 9Pushed 5mo agoCompare

[ Source](https://github.com/Team-Nifty-GmbH/resellerinterface-sdk)[ Packagist](https://packagist.org/packages/team-nifty-gmbh/resellerinterface-sdk)[ RSS](/packages/team-nifty-gmbh-resellerinterface-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

ResellerInterface SDK
=====================

[](#resellerinterface-sdk)

A modern PHP SDK for the ResellerInterface API, built with [Saloon v3](https://docs.saloon.dev/).

Features
--------

[](#features)

- 🔐 **Automatic Authentication** - Handles login and session management automatically
- 🚀 **Laravel Integration** - Service Provider, Config, and Helper functions included
- 📦 **Standalone Usage** - Works without Laravel as a standalone PHP package
- 🎯 **Type-Safe** - Full type hints and IDE autocompletion
- ⚡ **Modern PHP** - Requires PHP 8.3+ with constructor property promotion
- 🔄 **Session Management** - Automatic session renewal and cookie handling

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

[](#installation)

Install via Composer:

```
composer require team-nifty-gmbh/resellerinterface-sdk
```

### Laravel Setup

[](#laravel-setup)

The package includes Laravel Auto-Discovery, so no manual registration is needed.

Publish the configuration file:

```
php artisan vendor:publish --tag=resellerinterface-config
```

Add your credentials to `.env`:

```
RESELLERINTERFACE_USERNAME=your-username
RESELLERINTERFACE_PASSWORD=your-password
RESELLERINTERFACE_RESELLER_ID=12345
RESELLERINTERFACE_BASE_URL=https://core.resellerinterface.de
```

Usage
-----

[](#usage)

### Quick Start with Helper Function (Laravel)

[](#quick-start-with-helper-function-laravel)

```
// Get SDK instance with credentials from config
$sdk = resellerInterface();

// Make API calls
$response = $sdk->domains()->domainList();
$domains = $response->json();
```

### Dependency Injection (Laravel)

[](#dependency-injection-laravel)

```
use TeamNiftyGmbH\ResellerInterface\ResellerInterface;

class DomainController extends Controller
{
    public function __construct(
        private ResellerInterface $sdk
    ) {}

    public function index()
    {
        $response = $this->sdk->domains()->domainList();
        return $response->json();
    }
}
```

### Using Custom Credentials

[](#using-custom-credentials)

```
// Override config credentials
$sdk = resellerInterface(
    username: 'other-user',
    password: 'other-pass',
    resellerId: 67890
);

// Or create instance directly
$sdk = new ResellerInterface(
    username: 'api-user',
    password: 'secret',
    resellerId: 12345
);
```

### Standalone Usage (Without Laravel)

[](#standalone-usage-without-laravel)

```
use TeamNiftyGmbH\ResellerInterface\ResellerInterface;

$sdk = new ResellerInterface(
    username: 'your-username',
    password: 'your-password',
    resellerId: 12345
);

$response = $sdk->domains()->domainList();
```

Available Resources
-------------------

[](#available-resources)

The SDK provides access to all ResellerInterface API endpoints:

### Domain Management

[](#domain-management)

```
// List all domains
$sdk->domains()->domainList();

// Get domain details
$sdk->domains()->domainDetails($domainId);

// Check domain availability
$sdk->domains()->domainCheck($domainName);

// Create new domain
$sdk->domains()->domainCreate($domain, $handles);

// Transfer domain
$sdk->domains()->domainTransfer($domain, $authCode);
```

### DNS Management

[](#dns-management)

```
// List DNS records
$sdk->dns()->dnsListRecords($domainId);

// Create DNS record
$sdk->dns()->dnsCreateRecord($zoneId, $record);

// Update DNS zone
$sdk->dns()->dnsUpdateZone($zoneId, $data);

// Enable DNSSEC
$sdk->dns()->dnsEnableDnssec($domainId);
```

### SSL Certificates

[](#ssl-certificates)

```
// List SSL certificates
$sdk->ssl()->sslList();

// Order SSL certificate
$sdk->ssl()->sslCreate($data);

// Get SSL details
$sdk->ssl()->sslDetails($sslId);
```

### Reseller Management

[](#reseller-management)

```
// Get reseller info
$sdk->resellers()->resellerDetails();

// List sub-resellers
$sdk->resellers()->resellerList();

// Update reseller settings
$sdk->resellers()->resellerUpdate($data);
```

### Other Resources

[](#other-resources)

- **Handles**: `$sdk->handles()`
- **Invoices**: `$sdk->invoices()`
- **TLDs**: `$sdk->tlds()`
- **Emails**: `$sdk->emails()`
- **Webspaces**: `$sdk->webspaces()`
- **Users**: `$sdk->users()`
- **Billing**: `$sdk->billing()`
- **Tickets**: `$sdk->tickets()`
- **And many more...**

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

[](#authentication)

The SDK handles authentication automatically. When you make your first API request, it will:

1. Send login request with your credentials
2. Store the session ID from the response
3. Include the session cookie in all subsequent requests
4. Automatically re-authenticate if the session expires

You don't need to manage authentication manually.

### Two-Factor Authentication

[](#two-factor-authentication)

If your account uses 2FA, you can provide the codes during initialization:

```
$sdk = new ResellerInterface(
    username: 'your-username',
    password: 'your-password',
    resellerId: 12345
);

// For manual 2FA authentication
$sdk->withAuthentication(
    username: 'your-username',
    password: 'your-password',
    resellerId: 12345,
    sms: '123456',  // SMS code if using SMS 2FA
    totp: '654321'  // TOTP code if using app-based 2FA
);
```

Error Handling
--------------

[](#error-handling)

The SDK uses Saloon's exception handling:

```
use Saloon\Exceptions\Request\RequestException;
use Saloon\Exceptions\Request\ServerException;
use Saloon\Exceptions\Request\ClientException;

try {
    $response = $sdk->domains()->domainList();
    $data = $response->json();
} catch (ClientException $e) {
    // 4xx errors (e.g., validation errors, not found)
    $status = $e->getStatus();
    $body = $e->response()->json();
} catch (ServerException $e) {
    // 5xx errors
    $status = $e->getStatus();
} catch (RequestException $e) {
    // Other request errors
    $message = $e->getMessage();
}
```

Working with Responses
----------------------

[](#working-with-responses)

All SDK methods return a `Saloon\Http\Response` object:

```
$response = $sdk->domains()->domainList();

// Get response data
$json = $response->json();        // Parsed JSON
$body = $response->body();        // Raw body string
$status = $response->status();    // HTTP status code
$headers = $response->headers();  // Response headers

// Check response status
if ($response->successful()) {
    // 2xx response
}

if ($response->failed()) {
    // 4xx or 5xx response
}

// Work with the data
$domains = $response->json()['data'] ?? [];
foreach ($domains as $domain) {
    echo $domain['domainName'] . PHP_EOL;
}
```

DTOs (Data Transfer Objects)
----------------------------

[](#dtos-data-transfer-objects)

Some responses are automatically mapped to DTOs for better type safety:

```
$response = $sdk->domains()->domainDetails($domainId);
$domain = $response->dto(); // Returns TeamNiftyGmbH\ResellerInterface\Dto\Domain

// Access properties with IDE autocompletion
echo $domain->domainName;
echo $domain->domainStatus;
echo $domain->expiryDate;
```

Advanced Usage
--------------

[](#advanced-usage)

### Custom Request Headers

[](#custom-request-headers)

```
$request = new \TeamNiftyGmbH\ResellerInterface\Requests\Domains\DomainList();
$request->headers()->add('X-Custom-Header', 'value');

$response = $sdk->send($request);
```

### Pagination

[](#pagination)

Many list endpoints support pagination:

```
$response = $sdk->domains()->domainList(
    offset: 0,
    limit: 100,
    sort: ['domainName' => 'asc']
);

$totalCount = $response->json()['data']['totalCount'];
$domains = $response->json()['data']['data'];
```

### Filtering and Searching

[](#filtering-and-searching)

```
$response = $sdk->domains()->domainList(
    search: ['domainName' => 'example'],
    filter: ['domainStatus' => 'ACTIVE'],
    include: ['contacts', 'nameservers']
);
```

Testing
-------

[](#testing)

For testing, you can mock the SDK:

```
use TeamNiftyGmbH\ResellerInterface\ResellerInterface;
use Saloon\Http\Faking\MockResponse;
use Saloon\Laravel\Facades\Saloon;

// In your test
Saloon::fake([
    ResellerInterface::class => MockResponse::make(
        body: ['data' => ['totalCount' => 5]],
        status: 200
    ),
]);

$sdk = resellerInterface();
$response = $sdk->domains()->domainList();

$this->assertEquals(5, $response->json()['data']['totalCount']);
```

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Laravel 11.0+ (optional, for Laravel integration)

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

For API documentation, visit the [ResellerInterface API Documentation](https://core.resellerinterface.de/api).

For issues with this SDK, please create an issue on GitHub.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance73

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Total

5

Last Release

154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/315f809551baee16f7c5531f89a864b4d5b59bde8882779c30d4a01ae36e718e?d=identicon)[team-nifty](/maintainers/team-nifty)

---

Top Contributors

[![patrickweh](https://avatars.githubusercontent.com/u/40495041?v=4)](https://github.com/patrickweh "patrickweh (10 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/team-nifty-gmbh-resellerinterface-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/team-nifty-gmbh-resellerinterface-sdk/health.svg)](https://phpackages.com/packages/team-nifty-gmbh-resellerinterface-sdk)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

106.1k](/packages/codebar-ag-laravel-zammad)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[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)
