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

ActiveLibrary[API Development](/categories/api)

topsort/sdk
===========

Library for communicating with Topsort

3.0.1(1y ago)240511MITPHPPHP &gt;=7.3

Since Oct 22Pushed 1y ago14 watchersCompare

[ Source](https://github.com/Topsort/topsort.php)[ Packagist](https://packagist.org/packages/topsort/sdk)[ RSS](/packages/topsort-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (14)Used By (1)

topsort.php
===========

[](#topsortphp)

A PHP Software Development Kit for interacting with the `auctions` and `events`endpoints in the Topsort ecosystem.

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

[](#installation)

The recommended way to install Topsort's SDK for PHP is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

```
{
  "require": {
    "topsort/sdk": "3.0.1"
  }
}
```

Or with the command line:

```
composer require topsort/sdk
```

How it works
------------

[](#how-it-works)

All operations are driven by our [OpenAPI documentation](https://docs.topsort.com/reference/integration-overview), so all methods maps directly to the API description.

Usage: Running an auction
-------------------------

[](#usage-running-an-auction)

`Topsort\SDK\SDK::auction` requires three arguments:

- slots: An array describing the product slots that are being auctioned.
- products: An array, with the id's of the participating products.
- session: An array, describing the user on the current session.

```
