PHPackages                             yaroslawww/laravel-supercontrol - 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. yaroslawww/laravel-supercontrol

ActiveLibrary

yaroslawww/laravel-supercontrol
===============================

Laravel SuperControl api client

1.0.2(5y ago)2105MITPHPPHP ^7.4CI failing

Since Jun 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/yaroslawww/laravel-supercontrol)[ Packagist](https://packagist.org/packages/yaroslawww/laravel-supercontrol)[ Docs](https://github.com/yaroslawww/laravel-supercontrol)[ RSS](/packages/yaroslawww-laravel-supercontrol/feed)WikiDiscussions master Synced 2d ago

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

Laravel supercontrol API client
===============================

[](#laravel-supercontrol-api-client)

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

[](#installation)

You can install the package via composer:

```
composer require yaroslawww/laravel-supercontrol
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="LaravelSupercontrol\ServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="LaravelSupercontrol\ServiceProvider" --tag="config"
```

Configuration in *.env*

```
SUPERCONTROL_DEFAULT_SITE_ID=46
# Optional, required only if you use api V1 or Booking
SUPERCONTROL_API_ID=123456
SUPERCONTROL_API_KEY=11111111-1111-1111-1111-111111111111
# Optional, required only if you use api V1
# SUPERCONTROL_API_SC_TOKEN=11111111-1111-1111-1111-111111111111

# Only if you want save all requests/response content
# SUPERCONTROL_DB_LOGS_BOOKING_API=true
```

Legacy API endpoints
--------------------

[](#legacy-api-endpoints)

**siteID** is not required (by default it specified on laravel configs)

See full docs: [SuperControl API Endpoint Overview.pdf](https://github.com/yaroslawww/laravel-supercontrol/tree/master/docs/supercontrol)

```
use \LaravelSupercontrol\Facades\SupercontrolApiLegacy;

// Universal query
SupercontrolApiLegacy::getClient()->request('get', 'full_list.asp',['timeout'  => 10.0,])->getConvertedBody();
// or predefined queries
SupercontrolApiLegacy::meta()->bookingSources()->getConvertedBody();
// also you can override siteID
SupercontrolApiLegacy::meta()->bookingSources(['siteID' => 46])->getConvertedBody();
SupercontrolApiLegacy::meta()->countries(['siteID' => 46])->getConvertedBody();

SupercontrolApiLegacy::properties()->filter(['siteID' => 46])->getConvertedBody();
SupercontrolApiLegacy::properties()->fullList(['siteID' => 46])->getConvertedBody();
SupercontrolApiLegacy::properties()->availableRange(['siteID' => 46, 'startdate' => \Carbon\Carbon::now()->addMonth()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::properties()->propertyAvailBulk(['siteID' => 46, 'startdate' => \Carbon\Carbon::now()->addMonth()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::properties()->propertyCodes(['siteID' => 46])->getConvertedBody();
SupercontrolApiLegacy::properties()->propertyDiscountText(['siteID' => 46])->getConvertedBody();
SupercontrolApiLegacy::properties()->propertyLastUpdate(['siteID' => 46])->getConvertedBody();

SupercontrolApiLegacy::property()->getNights(['id' => 523560, 'startdate' => \Carbon\Carbon::now()->addDay()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::property()->getPrice(['id' => 523560, 'startdate' => \Carbon\Carbon::now()->addDay()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::property()->propertyAvail(['propertycode' => 523560, 'startdate' => \Carbon\Carbon::now()->addDay()->format('Y-m-d'), 'enddate' => \Carbon\Carbon::now()->addMonth()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::property()->propertyBooked(['propertycode' => 523560, 'startdate' => \Carbon\Carbon::now()->addDay()->format('Y-m-d'), 'enddate' => \Carbon\Carbon::now()->addMonth()->format('Y-m-d')])->getConvertedBody();
SupercontrolApiLegacy::property()->propertyDates(['propertycode' => 523560, 'startdate' => \Carbon\Carbon::now()->addDay()->format('Y-m-d'), 'enddate' => \Carbon\Carbon::now()->addMonth()->format('Y-m-d')])->getConvertedBody();
```

API V1 endpoints
----------------

[](#api-v1-endpoints)

**client-&gt;ID** is not required (by default it specified on laravel configs)

**client-&gt;key** is not required (by default it specified on laravel configs)

**client-&gt;siteID** is not required (by default it specified on laravel configs)

See full docs [there](https://secure.supercontrol.co.uk/api-documentation/)

```
use \LaravelSupercontrol\Facades\SupercontrolApiV1;

// Universal query
SupercontrolApiV1::getClient()->request('get', 'GetBookings',[
'timeout'  => 10.0,
'body' => \Spatie\ArrayToXml\ArrayToXml::convert([
'client' => [
  'Property' => ['PropertyID' => ['570428', '566378']],
  'date' => ['start' => '2020-06-01', 'end'=>'2020-09-01']]
], 'scAPI')
])->getConvertedBody();
// or predefined queries
SupercontrolApiV1::booking()->get(['client' => [
    'Property' => ['PropertyID' => [570428, 566378]],
    'date' => ['start' => '2020-06-01', 'end'=>'2020-09-01']]
])->getConvertedBody();
// also you can override auth params
SupercontrolApiV1::booking()->get(['client' => [
    'ID' => 123456,
    'key' => '11111111-1111...',
    'Property' => ['PropertyID' => [570428, 566378]],
    'date' => ['start' => '2020-06-01', 'end'=>'2020-09-01']]
])->getConvertedBody();

SupercontrolApiV1::property()->list(['client' => ['page' => 2]])->getConvertedBody();
SupercontrolApiV1::property()->find(['client' => ['propertyID' => 570428]])->getConvertedBody();
SupercontrolApiV1::property()->getImages([
'client' => ['Property' => ['PropertyID' => [570428, 566378]]]
])->getConvertedBody();

SupercontrolApiV1::availability()->get([
'client' => [
    'Property' => ['PropertyID' => [570428, 566378]],
    'dateRange' => ['start' => '2020-06-01', 'end'=>'2020-09-01']
]
])->getConvertedBody();

SupercontrolApiV1::rate()->get([
'client' => [
    'Property' => ['PropertyID' => [570428, 566378]],
    'date' => ['start' => '2020-06-01', 'NumberOfNights' => 7]
]
])->getConvertedBody();
SupercontrolApiV1::rate()->getAll([
'client' => [
    'Property' => ['PropertyID' => [570428, 566378]]
]
])->getConvertedBody();

SupercontrolApiV1::helper()->getSites()->getConvertedBody();
SupercontrolApiV1::helper()->getTerms()->getConvertedBody();
// or
SupercontrolApiV1::helper()->getTerms(['client' => ['siteID' => 1234]])->getConvertedBody();
```

API V3 endpoints
----------------

[](#api-v3-endpoints)

Header **SC-TOKEN** is not required (by default it specified on laravel configs)

See full docs: [Data Export API Documentation.pdf](https://github.com/yaroslawww/laravel-supercontrol/tree/master/docs/supercontrol)

```
use \LaravelSupercontrol\Facades\SupercontrolApiV3;

// Universal query
SupercontrolApiV3::getClient()->request('get', 'DataExport/Properties',[
'timeout'  => 10.0,
'query' => [ /* there you can pass any query params (see guzzlehttp docs ) */ ]
])->getConvertedBody();
// or predefined queries
SupercontrolApiV3::dataExport()->properties()->getConvertedBody();
// also you can override auth params
SupercontrolApiV3::dataExport()->properties([],[
    'headers' => [
        'SC-TOKEN' => '11111111-1111...'
    ],
])->getConvertedBody();

SupercontrolApiV3::dataExport()->bookings(['LastUpdate' => '2020-05-06'])->getConvertedBody();
```

API Booking endpoints
---------------------

[](#api-booking-endpoints)

**client-&gt;ID** is not required (by default it specified on laravel configs)

**client-&gt;key** is not required (by default it specified on laravel configs)

See full docs: [SuperControl Booking API.pdf](https://github.com/yaroslawww/laravel-supercontrol/tree/master/docs/supercontrol)

```
use \LaravelSupercontrol\Facades\SupercontrolApiBooking;

// Firstly need create query
$guest = new \LaravelSupercontrol\API\Booking\DTOs\Guest();
$guest->email = 'yg@think.studio';
$guest->firstname = 'Test Booking API';
$guest->lastname = 'Tester';

$booking = new \LaravelSupercontrol\API\Booking\DTOs\Booking();
$booking->value = 0.05;
$booking->vatPercentage = 0.02;
$booking->commission = 0.01;
$booking->children = 1;
$booking->adults = 2;
$booking->infants = 3;

$payment = new \LaravelSupercontrol\API\Booking\DTOs\Payment();
$payment->date = now()->format('Y-m-d');
$payment->value = 0.01;
$payment->caption = 'Test payment cation';
$payment->method = 'Test method';

$extra = new \LaravelSupercontrol\API\Booking\DTOs\Extra();
$extra->id = 0;
$extra->qty = 2;
$extra->value = 0.01;
$extra->name = 'Some test extra name there';

$date = new \LaravelSupercontrol\API\Booking\DTOs\Date();
$date->status = 'b';
$date->start = '2020-08-28';
$date->nights = 2;
$date->guest = $guest;
$date->booking = $booking;
$date->payments = [$payment];
$date->extras = [$extra];
$date->notes = [
    'Booking (testing purpose) [ThinkStudio]'
];
$property = new \LaravelSupercontrol\API\Booking\DTOs\Property();
$property->propId = 566378;
$property->dates = [$date];
$requestData = [
    'client' => [
        'ref' => 'test_ref_123456',
        'prop' => $property->__toArray()
    ]
];

// Universal query
SupercontrolApiBooking::getClient()->request('get', 'avail.asp',[
    'timeout'  => 10.0,
    'body' => \Spatie\ArrayToXml\ArrayToXml::convert($requestData, 'scAPI')
])->getConvertedBody();
// or predefined queries
SupercontrolApiBooking::bookingRequest($requestData)->getConvertedBody();
```

Credits
-------

[](#credits)

- [![Think Studio](https://camo.githubusercontent.com/8e541bece07d503c85a126b5294865faa00e27371048772f566a0cce8c01fd3a/68747470733a2f2f7961726f736c617777772e6769746875622e696f2f696d616765732f73706f6e736f72732f7061636b616765732f6c6f676f2d7468696e6b2d73747564696f2e706e67)](https://think.studio/)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

Total

5

Last Release

2007d ago

Major Versions

0.0.4 → 1.0.02020-08-16

### Community

Maintainers

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

---

Top Contributors

[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (14 commits)")

---

Tags

api-clientlaravel-packagesupercontrolsupercontrol.co.uksupercontrollaravel-supercontrol

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yaroslawww-laravel-supercontrol/health.svg)

```
[![Health](https://phpackages.com/badges/yaroslawww-laravel-supercontrol/health.svg)](https://phpackages.com/packages/yaroslawww-laravel-supercontrol)
```

###  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)[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)
