This package allows you to easily make requests to the new Uber Eats Marketplace API.
- PHP >= 8.3
- Laravel >= 11.0
You can install the package via composer:
composer require morscate/uber-eatsThe package will automatically register itself.
To start using the Uber Eats API you will need a client ID and client secret. You can get these by creating an app on the Uber Developer Portal. Add the Client ID and client secret to your .env file:
UBER_EATS_CLIENT_ID=
UBER_EATS_CLIENT_SECRET=Before you can start using the API, you need to activate an store integration. To do so you need to make sure to have access to the eats.pos_provisioning scope (https://developer.uber.com/docs/eats/references/api/v1/post-eats-stores-storeid-posdata). When you have access to this scope add it to the UBER_EATS_SCOPE through the config or .env.
You can do this by using the following code:
$uberEatsApi = new UberEatsApi();
$uberEatsApi->activateIntegration(
storeId: "{store_id}",
isOrderManager: true
);To get all orders from a store, you can use the following code:
$uberEatsApi = new UberEatsApi();
$uberEatsApi->getOrders("{store_id}");If you need to create your own request, you can use the following code:
$uberEatsApi = new UberEatsApi();
$uberEatsApi->request()->get('https://api.uber.com/v1/delivery/store/{$storeId}/orders');To start receiving webhooks from Uber Eats, you need to add the following route the App\Providers\RouteServiceProvider file:
$this->routes(function () {
// ...
Route::uberEatsWebhooks();
});If you discover a security vulnerability within this project, please email me via development@morscate.nl.