4.0.0 • Published 5 years ago

@datafire/just_eat v4.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/just_eat

Client library for Just Eat UK

Installation and Usage

npm install --save @datafire/just_eat
let just_eat = require('@datafire/just_eat').create({
  Bearer: "",
  api_key: "",
  username: "",
  password: "",
  restaurantsignup_jwt: ""
});

.then(data => {
  console.log(data);
});

Description

Just Eat API

Just Eat offers services for our various business partners and our consumer applications. How you interact with the API depends on the services you wish to interact with.

Security

HTTPS

All api calls and callbacks require HTTPS. Your service will need a valid SSL certificate and be accessible via the standard SSL port (port 443).

Making an API request

Some API calls require an API key, to authenticate the partner calling the API.

PUT https://uk-partnerapi.just-eat.io/orders/abcd1234 HTTP/1.1
Authorization: JE-API-KEY abcd123456789

Other calls require a user token in the form of a JWT.

GET https://uk.api.just-eat.io/consumer/me/orders/uk HTTP/1.1
Authorization: Bearer abcd123456789

Date Formats

Date and time formats

All dates and times should use the ISO 8601 standard for representation of dates and times.

For instance:

  • DueDateWithUtcOffset: "2015-05-26T14:52:35.5444292+01:00"
    • Local time: 14:52
    • UTC time: 13:52
    • UTC offset: +1hr (due to daylight time saving)
  • DueDateWithUtcOffset: "2015-02-03T11:10:00.0000000+00:00"
    • Local time: 11:10
    • UTC time: 11:10
    • UTC offset: 0 (no daylight time saving, local time is equivalent to UTC)

Note that the offset may be for a timezone different to your own, so you should alway convert to your own local time for display purposes (e.g. on receipts and terminals).

Callback timestamps

Timestamps sent to Just Eat should be recorded as the current local time (including any changes needed to account for daylight saving) with an accompanying offset that shows the difference between the recorded local time and the current UTC time.

If it is not possible to record timestamps in local time, timestamps may be recorded in UTC time with a 00:00 offset.

Async Webhooks

Some of the webhooks on the platform are configured as being 'async' webhooks. These are for long-running operations, and work as follows: 1. Your webhook is invoked with a ?callback={returnUrl} query string parameter. The returnUrl is a unique URL that you will need to send the async response to. 2. Return an immediate 202 Accepted response from the webhook endpoint, to indicate that you have received the request. 3. Perform the long-running operation. This can be deemed either a success; or a failure. 4. If the result is a success, return the following:

POST {returnUrl} HTTP/1.1

{
      "status": "Success",
      "message": "{successMessage}",
      "data": {}   // webhook-specific response object
}
  1. Otherwise, if the result is a failure, return the following:

    POST {returnUrl} HTTP/1.1
    
    {
          "status": "Failure",
          "message": "{failureMessage}",
          "data": {}   // webhook-specific response object
    }

Actions

acceptance_requested.post

This webhook will be invoked whenever acceptance has been requested for the order.

just_eat.acceptance_requested.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

attempted_delivery_query_resolved.put

This webhook will be invoked whenever an attempted delivery query has been resolved.

just_eat.attempted_delivery_query_resolved.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

consumers.tenant.post

Creates a consumer for the given tenant.

just_eat.consumers.tenant.post({
  "tenant": "",
  "body": {
    "emailAddress": "",
    "firstName": "",
    "lastName": ""
  }
}, context)

Input

  • input object
    • tenant required string: The identifier for the tenant. The only supported tenants are uk, au and nz
    • body required ConsumerCreate

Output

delivery_failed.put

This webhook will be invoked whenever an attempted delivery event is created from the device.

just_eat.delivery_failed.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

delivery_fees.tenant.get

Retrieve delivery fees for many restaurants. Returns fees and minimum order values required for delivery orders.

just_eat.delivery_fees.tenant.get({
  "tenant": "",
  "restaurantIds": [],
  "deliveryTime": ""
}, context)

Input

  • input object
    • tenant required string: Tenant containing the restaurants.
    • restaurantIds required array: Restaurant IDs which fees are requested for. e.g. ?restaurantIds=1,2,3,4
    • deliveryTime required string: Delivery date/time when fees are required (ISO8601 format).
    • zone string: Postcode or other location name identifying the location to which delivery is required. For use when precise location is not available. This will be removed in future in favour of location.
    • latlong array: Point to which delivery is required (latitude, longitude). Supply this where possible as support for zone-only based lookups will be removed in future.

Output

  • output object

delivery.estimate.get

Get delivery estimate

just_eat.delivery.estimate.get({
  "restaurantReference": ""
}, context)

Input

  • input object
    • restaurantReference required string: The reference of the restaurant to estimate the delivery time from.
    • toLat string: The latitude of the position to estimate the delivery time to.
    • toLon string: The longitude of the position to estimate the delivery time to.
    • toPostcode string: The postcode to estimate the delivery time to.

Output

delivery.pools.get

A delivery pool is a named group of drivers which deliver food for a set of restaurants.

just_eat.delivery.pools.get(null, context)

Input

This action has no parameters

Output

  • output object
    • delivery-pool-id object
      • name string: The name of the pool, used by operations teams, in reports, etc.
      • restaurants array: A list of Just Eat restaurant ids served by the delivery pool.
        • items number

delivery.pools.post

A delivery pool is a named group of drivers which deliver food for a set of restaurants.

just_eat.delivery.pools.post({
  "body": {
    "name": ""
  }
}, context)

Input

Output

Output schema unknown

delivery.pools.deliveryPoolId.delete

The restaurants will no longer be associated with the pool.

just_eat.delivery.pools.deliveryPoolId.delete({
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • deliveryPoolId required string: Identifier for the pool

Output

Output schema unknown

delivery.pools.deliveryPoolId.get

A delivery pool is a named group of drivers which deliver food for a set of restaurants.

just_eat.delivery.pools.deliveryPoolId.get({
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • deliveryPoolId required string: Identifier for the pool

Output

  • output object
    • name string: The name of the pool, used by operations teams, in reports, etc.
    • restaurants array: A list of Just Eat restaurant ids served by the delivery pool.
      • items number

delivery.pools.deliveryPoolId.patch

Modify a delivery pool, changing its name, restaurants or both

just_eat.delivery.pools.deliveryPoolId.patch({
  "body": {},
  "deliveryPoolId": ""
}, context)

Input

  • input object

Output

  • output object
    • name string: The name of the pool, used by operations teams, in reports, etc.
    • restaurants array: A list of Just Eat restaurant ids served by the delivery pool.
      • items number

delivery.pools.deliveryPoolId.put

Replace an existing delivery pool changing all of its properties

just_eat.delivery.pools.deliveryPoolId.put({
  "body": {
    "name": ""
  },
  "deliveryPoolId": ""
}, context)

Input

  • input object

Output

  • output object
    • name string: The name of the pool, used by operations teams, in reports, etc.
    • restaurants array: A list of Just Eat restaurant ids served by the delivery pool.
      • items number

delivery.pools.deliveryPoolId.availability.relative.get

Get the current amount of time it will take a driver to collect a new order from a restaurant in the pool.

just_eat.delivery.pools.deliveryPoolId.availability.relative.get({
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • deliveryPoolId required string: Identifier for the pool

Output

  • output object
    • bestGuess string: Your best estimation (hh:mm:ss)

delivery.pools.deliveryPoolId.availability.relative.put

Set the average amount of time it will take a driver to collect a new order from a restaurant in the pool.

just_eat.delivery.pools.deliveryPoolId.availability.relative.put({
  "body": {},
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • body required estimated-time
    • deliveryPoolId required string: Identifier for the pool

Output

Output schema unknown

delivery.pools.deliveryPoolId.hours.put

Set the daily start and end times for a pool or set closed flag if the pool does not operate on that day. Start and end times for all days must be provided. Though the API accepts array of start and end times for each day, multiple start and end time for a day are not accepted. If the end time for a day is equal to or before start time, end time will be considered as time for the next day.

just_eat.delivery.pools.deliveryPoolId.hours.put({
  "body": {
    "monday": {
      "poolTimes": []
    },
    "tuesday": {
      "poolTimes": []
    },
    "wednesday": {
      "poolTimes": []
    },
    "thursday": {
      "poolTimes": []
    },
    "friday": {
      "poolTimes": []
    },
    "saturday": {
      "poolTimes": []
    },
    "sunday": {
      "poolTimes": []
    }
  },
  "deliveryPoolId": ""
}, context)

Input

  • input object

Output

Output schema unknown

delivery.pools.deliveryPoolId.restaurants.delete

Remove restaurants from a delivery pool

just_eat.delivery.pools.deliveryPoolId.restaurants.delete({
  "body": {},
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • body required object
      • restaurants array: A list of Just Eat restaurant ids served by the delivery pool.
        • items number
    • deliveryPoolId required string: Identifier for the pool

Output

Output schema unknown

delivery.pools.deliveryPoolId.restaurants.put

Add additional restaurants to a delivery pool

just_eat.delivery.pools.deliveryPoolId.restaurants.put({
  "deliveryPoolId": ""
}, context)

Input

  • input object
    • deliveryPoolId required string: Identifier for the pool

Output

driver_assigned_to_delivery.put

Driver Assigned to Delivery

just_eat.driver_assigned_to_delivery.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

driver_at_delivery_address.put

Driver at delivery address

just_eat.driver_at_delivery_address.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

driver_at_restaurant.put

Driver at restaurant

just_eat.driver_at_restaurant.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

driver_has_delivered_order.put

Driver has delivered order

just_eat.driver_has_delivered_order.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

driver_location.put

Driver Location

just_eat.driver_location.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

driver_on_their_way_to_delivery_address.put

Driver on their way to delivery address

just_eat.driver_on_their_way_to_delivery_address.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

late_order_compensation_query.post

This webhook will be invoked when a late order compensation query has been raised and a restaurant response is required.

just_eat.late_order_compensation_query.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

late_order_query.post

This webhook will be invoked when a late order query has been raised and a restaurant response is required.

just_eat.late_order_query.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

menu_ingestion_complete.post

Callback to confirm that an attempt to ingest a menu has completed either successfully or unsuccessfully

just_eat.menu_ingestion_complete.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_accepted.post

This webhook will be invoked whenever the order was accepted.

just_eat.order_accepted.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_cancelled.post

This webhook will be invoked whenever the order was cancelled.

just_eat.order_cancelled.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_eligible_for_restaurant_compensation.post

This webhook will be invoked for every cancelled order and it will inform if the order is eligible for compensation.

just_eat.order_eligible_for_restaurant_compensation.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_is_ready_for_pickup.put

just_eat.order_is_ready_for_pickup.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_ready_for_preparation_async.post

This webhook will be invoked when we have determined that an order is ready for preparation. Upon receiving the request, you should perform any preparation-related activities, such as sending the order to the POS system / kitchen screen. NOTE: This version of the webhook is asynchronous, and we expect a response in two parts: 1. We expect an immediate 202 response from this webhook to denote that you have received the request; 2. Following that, we expect an async callback - indicating either success or failure of the operation. The body for the async callbacks are as below:

Success callback

{
      "status": "Success",
      "message": "Order successfully sent to POS",
      "data": {}
}

Failure callback

{
      "status": "Failure",
      "message": "{errorMessage}",   // e.g. "The POS is currently in use"
      "data": {}
}
just_eat.order_ready_for_preparation_async.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_ready_for_preparation_sync.post

This webhook will be invoked when we have determined that an order is ready for preparation. Upon receiving the request, you should perform any preparation-related activities, such as sending the order to the POS system / kitchen screen.

just_eat.order_ready_for_preparation_sync.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_rejected.post

This webhook will be invoked whenever the order was rejected.

just_eat.order_rejected.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

order_requires_delivery_acceptance.put

This webhook will be invoked when we have determined that an order is required acceptance for delivery. Upon receiving the request, the order should be scheduled for pickup by a courier/driver. We expect an immediate 201 response from this webhook to denote that you have received the request.

just_eat.order_requires_delivery_acceptance.put({
  "body": []
}, context)

Input

Output

Output schema unknown

order_time_updated.post

Callback to notify recipients that there has been a change to the restaurant order times for a given day and service type

just_eat.order_time_updated.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.post

Create order

just_eat.orders.post({
  "body": {
    "OrderReference": "",
    "TotalPrice": 0,
    "Restaurant": null,
    "Customer": {
      "Name": "",
      "PhoneNumber": "",
      "Address": {
        "Lines": [],
        "City": "",
        "PostalCode": ""
      }
    },
    "Fulfilment": {
      "Method": "",
      "DueDate": ""
    },
    "Payment": {
      "Lines": []
    },
    "Items": []
  }
}, context)

Input

  • input object
    • x-je-api-version number: The api version to use. Version 2.0 is the only available version.
    • body required order-request-v2

Output

  • output object
    • OrderId string

orders.deliverystate.driverlocation.put

Current driver location (bulk upload)

just_eat.orders.deliverystate.driverlocation.put({
  "body": []
}, context)

Input

Output

Output schema unknown

orders.orderId.accept.put

Call when an order has been accepted. An order can only be accepted if it hasn't previously been accepted, rejected, cancelled or ignored

just_eat.orders.orderId.accept.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.cancel.put

Call when an order has been cancelled by Ops. Cancelling an order overrides any previous accept/reject calls. This should not be used for restaurant rejection but only from Ops involvement

just_eat.orders.orderId.cancel.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.complete.post

Call when an order is complete. An order can only be marked as complete if it hasn't already been marked as cancelled or complete.

just_eat.orders.orderId.complete.post({
  "orderId": ""
}, context)

Input

  • input object
    • orderId required string: The ID of the order to mark as complete

Output

Output schema unknown

orders.orderId.deliverystate.atdeliveryaddress.put

just_eat.orders.orderId.deliverystate.atdeliveryaddress.put({
  "orderId": "",
  "body": {}
}, context)

Input

  • input object
    • orderId required string: Just Eat order identifier
    • body required delivery-details

Output

Output schema unknown

orders.orderId.deliverystate.atrestaurant.put

The at restaurant callback should be sent when the driver arrives at the restaurant and is ready to collect the order.

just_eat.orders.orderId.deliverystate.atrestaurant.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.deliverystate.atrestauranteta.put

just_eat.orders.orderId.deliverystate.atrestauranteta.put({
  "orderId": "",
  "body": {}
}, context)

Input

  • input object
    • orderId required string: Just Eat order identifier
    • body required eta-estimate

Output

Output schema unknown

orders.orderId.deliverystate.delivered.put

The delivered callback should be sent when the driver has handed the food to the customer and completed the order.

just_eat.orders.orderId.deliverystate.delivered.put({
  "orderId": "",
  "body": {}
}, context)

Input

  • input object
    • orderId required string: Just Eat order identifier
    • body required delivery-details

Output

Output schema unknown

orders.orderId.deliverystate.driverassigned.put

The driver assigned callback should be sent when a driver is assigned to the order. It should communicate important details about the driver - and also an estimated time for the driver to arrive at the restaurant and delivery address.

just_eat.orders.orderId.deliverystate.driverassigned.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.deliverystate.driverlocation.put

just_eat.orders.orderId.deliverystate.driverlocation.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.deliverystate.driverunassigned.put

The driver unassigned callback should be sent when a driver is unassigned from the order. It may details about the reason for cancelling the assignment, the driver details, and any newer at restaurant and customer estimations.

just_eat.orders.orderId.deliverystate.driverunassigned.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.deliverystate.onitsway.put

The on its way callback should be sent when the driver departs the restaurant with the customer's order. It should contain an ETA that records when the driver expects to arrive at the customer's address.

just_eat.orders.orderId.deliverystate.onitsway.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.duedate.put

Use this to update the estimated time of arrival for an order (i.e. when you expect the customer to receive the food). NOTE: An initial estimate is given upon acceptance. This endpoint can be used to update that estimate.

just_eat.orders.orderId.duedate.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.ignore.put

Call when an order has been ignored by restaurant. An order can only be ignored if it hasn't previously been accepted, rejected, cancelled or ignored

just_eat.orders.orderId.ignore.put({
  "orderId": ""
}, context)

Input

  • input object
    • orderId required string

Output

Output schema unknown

orders.orderId.readyforcollection.post

Call when a collection order is ready to be collected by the customer. An order can only be marked as ready for collection if it is a collection order in the accepted state.

just_eat.orders.orderId.readyforcollection.post({
  "orderId": ""
}, context)

Input

  • input object
    • orderId required string: The ID of the order to mark as ready for collection

Output

Output schema unknown

orders.orderId.reject.put

Call when an order has been rejected. An order can only be rejected if it hasn't previously been accepted, rejected, cancelled or ignored

just_eat.orders.orderId.reject.put({
  "orderId": "",
  "body": {}
}, context)

Input

Output

Output schema unknown

orders.orderId.status.put

Set Order status

just_eat.orders.orderId.status.put({
  "orderId": "",
  "partnerId": 0,
  "body": {
    "Status": "",
    "TimeStamp": ""
  }
}, context)

Input

Output

Output schema unknown

orders.tenant.orderId.consumerqueries.lateorder.restaurantresponse.post

If a customer has requested an update on the status of a late order, a response can be given by calling this endpoint.

just_eat.orders.tenant.orderId.consumerqueries.lateorder.restaurantresponse.post({
  "tenant": "",
  "orderId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • orderId required string: Id for the order.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • body required LateOrderRestaurantResponse

Output

Output schema unknown

orders.tenant.orderId.consumerqueries.lateordercompensation.restaurantresponse.post

If a customer has requested compensation for a late order, a restaurant response is given by calling this endpoint.

just_eat.orders.tenant.orderId.consumerqueries.lateordercompensation.restaurantresponse.post({
  "tenant": "",
  "orderId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • orderId required string: Id for the order.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • body required LateOrderCompensationRestaurantResolution

Output

Output schema unknown

orders.tenant.orderId.restaurantqueries.compensation.post

When an order is cancelled the restaurant might be eligible for compensation, this endpoint allows a request for compensation to be created.

just_eat.orders.tenant.orderId.restaurantqueries.compensation.post({
  "tenant": "",
  "orderId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • orderId required string: Id for the order.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • body required CreateRestaurantCompensationQuery

Output

Output schema unknown

redelivery_requested.put

This webhook will be invoked whenever the customer responds to the attempted delivery notification.

just_eat.redelivery_requested.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

restaurant_offline_status.put

Callback to notify that a restaurant has been taken offline through an active Restaurant Event or there's been a change in whether the restaurant can override a previous offline status.

just_eat.restaurant_offline_status.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

restaurant_online_status.put

Callback to notify that a restaurant is now able to come back online as there are no longer any active offline Restaurant Events

just_eat.restaurant_online_status.put({
  "body": {}
}, context)

Input

Output

Output schema unknown

SearchByLocation

Provides details of all restaurants that deliver to the specified location

just_eat.SearchByLocation({
  "Authorization": "",
  "latitude": 0,
  "longitude": 0
}, context)

Input

  • input object
    • Authorization required string: OAuth2 token issued for logged in consumer or API key issued to partner
    • Accept-Tenant string: A valid country code, e.g. "uk". Filter search results to only include restaurants for the specified country. Required when using OAuth for authentication.
    • latitude required number: Filter search results to only include restaurants that deliver to the specified location
    • longitude required number: Filter search results to only include restaurants that deliver to the specified location
    • cuisine string: Filter search results to only include restaurants that offer the specified cuisine
    • restaurantName string: Filter search results to only include restaurants that have a name that matches the specified value
    • brandName string: Filter search results to only include restaurants of the specified brand

Output

Output schema unknown

SearchByPostcode

Provides details of restaurants that deliver to the specified postcode

just_eat.SearchByPostcode({
  "postcode": ""
}, context)

Input

  • input object
    • Authorization string: OAuth2 token issued for logged in consumer or API key issued to partner
    • Accept-Tenant string: A valid country code, e.g. "uk". Filter search results to only include restaurants for the specified country. Required when using OAuth for authentication.
    • postcode required string: Filter search results to only include restaurants that deliver to the specified postcode
    • cuisine string: Filter search results to only include restaurants that offer the specified cuisine
    • restaurantName string: Filter search results to only include restaurants that have a name that matches the specified value
    • brandName string: Filter search results to only include restaurants of the specified brand

Output

Output schema unknown

restaurants.driver.eta.put

Set the average amount of time it will take a driver to collect a new order from a restaurant.

just_eat.restaurants.driver.eta.put({
  "body": []
}, context)

Input

Output

restaurants.restaurantId.food_safety.addons.get

Get all addon's food safety information for a restaurant

just_eat.restaurants.restaurantId.food_safety.addons.get({
  "restaurantId": ""
}, context)

Input

  • input object
    • restaurantId required string: Restaurant Id (Encrypted)
    • select string: If not provided will bring all data.
    • limit integer: The maximum number of records to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.restaurantId.food_safety.addons.addonId.get

Get a single addon's food safety information for a restaurant

just_eat.restaurants.restaurantId.food_safety.addons.addonId.get({
  "restaurantId": "",
  "addonId": ""
}, context)

Input

  • input object
    • restaurantId required string: Restaurant Id (Encrypted)
    • addonId required string: Addon Id (Encrypted)
    • select string: If not provided will bring all data.
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.restaurantId.food_safety.products.get

Get all product's food safety information for a restaurant

just_eat.restaurants.restaurantId.food_safety.products.get({
  "restaurantId": ""
}, context)

Input

  • input object
    • restaurantId required string: Restaurant Id (Encrypted)
    • select string: If not provided will bring all data.
    • limit integer: The maximum number of records to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.restaurantId.food_safety.products.productId.get

Get a single product's food safety information for a restaurant

just_eat.restaurants.restaurantId.food_safety.products.productId.get({
  "restaurantId": "",
  "productId": ""
}, context)

Input

  • input object
    • restaurantId required string: Restaurant Id (Encrypted)
    • productId required string: Product Id (Encrypted)
    • select string: If not provided will bring all data.
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.tenant.restaurantId.catalogue.get

Get details of the restaurant's product catalogue

just_eat.restaurants.tenant.restaurantId.catalogue.get({
  "tenant": "",
  "restaurantId": ""
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • restaurantId required string: The restaurant Id.

Output

restaurants.tenant.restaurantId.catalogue.availabilities.get

Get all availabilities on the restaurant's menu

just_eat.restaurants.tenant.restaurantId.catalogue.availabilities.get({
  "tenant": "",
  "restaurantId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • restaurantId required string: The restaurant Id.
    • limit required integer: The maximum number of availabilities to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.categories.get

Get all categories on the restaurant's menu

just_eat.restaurants.tenant.restaurantId.catalogue.categories.get({
  "tenant": "",
  "restaurantId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • restaurantId required string: The restaurant Id.
    • limit required integer: The maximum number of categories to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.categories.categoryId.items.get

Get all item IDs which are assigned to the specified category

just_eat.restaurants.tenant.restaurantId.catalogue.categories.categoryId.items.get({
  "tenant": "",
  "restaurantId": "",
  "categoryId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • restaurantId required string: The restaurant ID.
    • categoryId required string: The category ID.
    • limit required integer: The maximum number of item IDs to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.items.get

Get all menu items on the restaurant's menu

just_eat.restaurants.tenant.restaurantId.catalogue.items.get({
  "tenant": "",
  "restaurantId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant.
    • restaurantId required string: The restaurant Id.
    • limit required integer: The maximum number of menu items to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.items.itemId.dealgroups.get

Get all deal groups for the menu item with the provided ID

just_eat.restaurants.tenant.restaurantId.catalogue.items.itemId.dealgroups.get({
  "tenant": "",
  "restaurantId": "",
  "itemId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant
    • restaurantId required string: The restaurant ID
    • itemId required string: The menu item ID
    • limit required integer: The maximum number of menu items to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.items.itemId.dealgroups.dealGroupId.dealitemvariations.get

Get all deal item variations for the deal group with the specified ID, in the menu item with the specified ID

just_eat.restaurants.tenant.restaurantId.catalogue.items.itemId.dealgroups.dealGroupId.dealitemvariations.get({
  "tenant": "",
  "restaurantId": "",
  "itemId": "",
  "dealGroupId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant
    • restaurantId required string: The restaurant ID
    • itemId required string: The menu item ID
    • dealGroupId required string: The menu item ID
    • limit required integer: The maximum number of menu items to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.items.itemId.modifiergroups.get

Get all modifier groups for the menu item with the provided ID

just_eat.restaurants.tenant.restaurantId.catalogue.items.itemId.modifiergroups.get({
  "tenant": "",
  "restaurantId": "",
  "itemId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant
    • restaurantId required string: The restaurant ID
    • itemId required string: The menu item ID
    • limit required integer: The maximum number of menu items to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.catalogue.items.itemId.variations.get

Get all variations for the menu item with the provided ID

just_eat.restaurants.tenant.restaurantId.catalogue.items.itemId.variations.get({
  "tenant": "",
  "restaurantId": "",
  "itemId": "",
  "limit": 0
}, context)

Input

  • input object
    • tenant required string: Request tenant
    • restaurantId required string: The restaurant ID
    • itemId required string: The menu item ID
    • limit required integer: The maximum number of menu items to fetch.
    • after string: Value representing a cursor - position to use when retrieving the next page of data. If provided, the value of this parameter must be URL encoded.

Output

restaurants.tenant.restaurantId.customerclaims.get

Provides claims for a given restaurant with optional filtering

just_eat.restaurants.tenant.restaurantId.customerclaims.get({
  "tenant": "",
  "restaurantId": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • fromDate string: Start date limiter
    • toDate string: End date limiter
    • limit integer: Pagination limit
    • offset integer: Pagination offset
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.tenant.restaurantId.customerclaims.orderclaims.id.get

Get information about a order claim

just_eat.restaurants.tenant.restaurantId.customerclaims.orderclaims.id.get({
  "tenant": "",
  "restaurantId": "",
  "id": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.tenant.restaurantId.customerclaims.orderclaims.id.restaurantresponse.post

Submit a restaurant response for the claim, where the restaurant can tell us if they accept or reject the claim

just_eat.restaurants.tenant.restaurantId.customerclaims.orderclaims.id.restaurantresponse.post({
  "tenant": "",
  "restaurantId": "",
  "id": "",
  "Content-Type": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Content-Type required string: Indicates the representation of the request body the client is sending (including version)
    • body OrderClaimRestaurantResponse

Output

Output schema unknown

restaurants.tenant.restaurantId.customerclaims.orderclaims.id.restaurantresponse.justification.put

Add reason and optional comments in case of rejection of order claim

just_eat.restaurants.tenant.restaurantId.customerclaims.orderclaims.id.restaurantresponse.justification.put({
  "tenant": "",
  "restaurantId": "",
  "id": "",
  "Content-Type": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Content-Type required string: Indicates the representation of the request body the client is sending (including version)
    • body Justification

Output

Output schema unknown

restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.get

Get information about a order items claim

just_eat.restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.get({
  "tenant": "",
  "restaurantId": "",
  "id": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Accept string: Indicates what type of response client understands and is also used for content type negotiation (if version is specified), otherwise tells the server to return the latest version

Output

restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.restaurantresponse.post

Submit a restaurant response for the claim

just_eat.restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.restaurantresponse.post({
  "tenant": "",
  "restaurantId": "",
  "id": "",
  "Content-Type": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Content-Type required string: Indicates the representation of the request body the client is sending (including version)
    • body OrderItemsClaimRestaurantResponse

Output

Output schema unknown

restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.restaurantresponse.justification.put

Add reason and comments to the response

just_eat.restaurants.tenant.restaurantId.customerclaims.orderitemsclaims.id.restaurantresponse.justification.put({
  "tenant": "",
  "restaurantId": "",
  "id": "",
  "Content-Type": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code indicating the tenant
    • restaurantId required string: Just Eat restaurant identifier
    • id required string: Claim identifier
    • Content-Type required string: Indicates the representation of the request body the client is sending (including version)
    • body Justification

Output

Output schema unknown

restaurants.tenant.restaurantId.menu.get

The endpoint will return a 301 redirect containing a URL that will grant access to the Menu file. The URL will only be available for a short period of time. The Menu file will be a single document containing the information that Just Eat has and uses to display the Menu on our customer clients. This will include a collection of items, a collection of Categories and a collection of Availabilities for when the items are available. Partners will be able to retrieve the Menu for any Restaurants that they currently manage.

just_eat.restaurants.tenant.restaurantId.menu.get({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: The tenant of the restaurant in which to put a menu
    • restaurantId required string: The restaurant identifier to associated with the menu
    • Authorization required string: Containing a partner issued API key e.g. Bearer ABCDE123456789

Output

putMenuForIngestion

Ingest a menu and begin an asynchronous process that will lead to that menu becoming live on the Just Eat platform

just_eat.putMenuForIngestion({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: The tenant of the restaurant in which to put a menu
    • restaurantId required string: The restaurant identifier to associated with the menu
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • Content-Type string: Used to denote the version of the menu payload within the body, will default to latest if not supplied e.g. application/=1.0
    • body Menu

Output

GetCampaigns

Get Offer Campaigns available for the restaurant

just_eat.GetCampaigns({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

Subscribe

Subscribe restaurant to Campaign.

just_eat.Subscribe({
  "tenant": "",
  "restaurantId": "",
  "campaignId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • campaignId required string: Id of the campaign
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

Output schema unknown

Unsubscribe

Unsubscribe restaurant from Campaign.

just_eat.Unsubscribe({
  "tenant": "",
  "restaurantId": "",
  "campaignId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • campaignId required string: Id of the campaign
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

Output schema unknown

GetAllOfferTemplates

Get list of all available offer templates for the restaurant

just_eat.GetAllOfferTemplates({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

GetOffers

Get list of offers running for the restaurant

just_eat.GetOffers({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

CreateOffers

Creates an offer for a restaurant. Each day represents an offer slot, and a restaurant has a maximum of 35 offer slots available. E.g. If I create an Offer for Monday and Tuesday, then that will use 2 offer slots. If all 35 offer slots have been used, then an offer will need to be deleted to free up offer slots.

just_eat.CreateOffers({
  "tenant": "",
  "restaurantId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • body required CreateOffersRequest

Output

DeleteOfferGroup

Delete offer by id for the restaurant

just_eat.DeleteOfferGroup({
  "tenant": "",
  "restaurantId": "",
  "id": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The unique-per-tenant restaurantId.
    • id required string: Internal id of the offer
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789

Output

Output schema unknown

GetOrderTimes

Get list of the delivery and collection lead times supplied by the restaurant

just_eat.GetOrderTimes({
  "tenant": "",
  "restaurantId": "",
  "Authorization": ""
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The restaurant Id.
    • Authorization required string: OAuth2 token issued for logged in restaurant

Output

UpdateOrderTime

Update the restaurant's delivery and collection lead times

just_eat.UpdateOrderTime({
  "tenant": "",
  "restaurantId": "",
  "dayOfWeek": "",
  "serviceType": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • restaurantId required string: The restaurant Id.
    • dayOfWeek required string (values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday): Day of week for order time
    • serviceType required string (values: Delivery, Collection): Service type of the order time
    • Authorization required string: OAuth2 token issued for logged in restaurant OR API token for third party, in the format Bearer {api_key}
    • body required updateOrderTimeRequest

Output

Output schema unknown

getRestaurantServiceTimes

Gets the service times (the weekly times at which a restaurant is in service for delivery or collection) for a restaurant

just_eat.getRestaurantServiceTimes({
  "tenant": "",
  "restaurantId": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code of restaurant's tenant
    • restaurantId required string: The restaurant identifier

Output

putRestaurantServiceTimes

Creates or updates the service times (the weekly times at which a restaurant is in service for delivery or collection) for a restaurant

just_eat.putRestaurantServiceTimes({
  "tenant": "",
  "restaurantId": ""
}, context)

Input

  • input object
    • tenant required string: Two letter code of restaurant's tenant
    • restaurantId required string: The restaurant identifier
    • body ServiceTimes

Output

search.autocomplete.tenant.get

Provides auto-completed search terms for restaurants, cuisines and products available in a given location.

just_eat.search.autocomplete.tenant.get({
  "tenant": "",
  "searchTerm": "",
  "latlong": []
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • searchTerm required string: User's search term - at least one character required
    • latlong required array: The latitude and longitude coordinates of the location in which to search.
    • limit number: Limit the number of auto-completed terms returned by the API. Defaults to 7. Valid values 1 - 10

Output

search.restaurants.tenant.get

Get restaurants available in a given lat-long which match a search term. Matches can be found against the name, a cuisine or a product.

just_eat.search.restaurants.tenant.get({
  "tenant": "",
  "searchTerm": "",
  "latlong": []
}, context)

Input

  • input object
    • tenant required string: A valid country code, e.g. "uk".
    • searchTerm required string: User's search term.
    • latlong required array: The latitude and longitude coordinates of the location in which to search.
    • limit number: Limit the number of restaurants returned by the API.

Output

send_to_pos_failed.post

This webhook will be invoked if we experience an error or timeout in sending an order to the underlying POS / kitchen screen. When notified via this webhook, typically you will perform some form of alerting or backup flow (e.g. ask the operator to enter the order manually into the POS). NOTE: This message contains the OrderId, but not the full order. It is assumed that you have stored/cached the full order details earlier in the flow - e.g. via the /order-ready-for-preparation webhook.

just_eat.send_to_pos_failed.post({
  "body": {}
}, context)

Input

Output

Output schema unknown

v1.tenant.restaurants.event.offline.post

Creates an event for the specified restaurants that indicates a reason for those restaurants to be offline.

just_eat.v1.tenant.restaurants.event.offline.post({
  "tenant": "",
  "X-JE-Requester": "",
  "X-JE-User-Role": "",
  "body": {
    "restaurantIds": "",
    "name": "",
    "reason": "",
    "startDate": "",
    "allowRestaurantOverride": true
  }
}, context)

Input

  • input object
    • tenant required string: The identifier for the tenant
    • X-JE-Requester required string: Name of the user or system creating the event. Used for auditing purposes
    • X-JE-User-Role required string (values: System, Operations, Restaurant):
    • body required OfflineRestaurantsRequestModel

Output

  • output object
    • restaurantEventId string: The ID of the offline event created
    • restaurantIds string: A CSV of the restaurant IDs added to the offline event

v1.tenant.restaurants.id.event.offline.delete

Removes specified restaurant from offline events. If role header is System or Operations only events created by the specified role will be affected. If role header is Restaurant then all events that have allowRestaurantOverride=true will be affected.

just_eat.v1.tenant.restaurants.id.event.offline.delete({
  "tenant": "",
  "id": "",
  "X-JE-Requester": "",
  "X-JE-User-Role": ""
}, context)

Input

  • input object
    • tenant required string: The identifier for the tenant
    • id required string: The identifier for the restaurant
    • X-JE-Requester required string: Name of the user or system creating the event. Used for auditing purposes
    • X-JE-User-Role required string (values: System, Operations, Restaurant): The role the user or system creating the event has assumed.

Output

Output schema unknown

tenant.orders.orderId.queries.attempteddelivery.post

If the customer hasn't answered the door to collect the order, then an attempted delivery event can be created using this endpoint.

just_eat.tenant.orders.orderId.queries.attempteddelivery.post({
  "tenant": "",
  "orderId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: Request tenant eg uk.
    • orderId required string: Id for the order.
    • Authorization required string: Containing a partner issued API key e.g. JE-API-KEY ABCDE123456789
    • body required create-attempted-delivery

Output

Output schema unknown

tenant.orders.orderId.queries.attempteddelivery.resolution.redeliverorder.post

If the customer responds, then you can trigger the redelivery of an order through this endpoint

just_eat.tenant.orders.orderId.queries.attempteddelivery.resolution.redeliverorder.post({
  "tenant": "",
  "orderId": "",
  "Authorization": "",
  "body": {}
}, context)

Input

  • input object
    • tenant required string: Request tenant eg uk.
    • orderId required string: Id for the order.
    • Autho