This package allows you to easily make requests to JustEatTakeaway's JET Connect API.
- PHP >= 8.2
- Laravel >= 11.0
You can install the package via composer:
composer require foodticket/jet-connectThe package will automatically register itself.
To start using the JET Connect API you will need an API key. Add the API key to your project's .env file:
JET_CONNECT_API_KEY=To set an item's availability, you can use the following code:
$jetConnectApi = new JetConnectApi();
$jetConnectApi->setItemAvailability(
Availability::UNAVAILABLE,
['itemReferences'],
$restaurantId,
$unavailableTill,
);To ingest a menu, you can use the following code:
$jetConnectApi = new JetConnectApi();
$jetConnectApi->ingestMenu(
['restaurantIds'],
$menu,
$callbackUrl,
);If you need to create your own request, you can use the following code:
$jetConnectApi = new JetConnectApi();
$jetConnectApi->request()->get('https://api.flytplatform.com/');To start receiving webhooks from JET Connect, you need to add the following route the App\Providers\RouteServiceProvider file:
$this->routes(function () {
// ...
Route::jetConnectWebhooks();
});If you discover a security vulnerability within this project, please report this by email to [email protected].