Just Eat Order Delivery API API

The Order Delivery API API from Just Eat — 10 operation(s) for order delivery api.

OpenAPI Specification

just-eat-order-delivery-api-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    x-twitter: JustEatUK
  description: "# Just Eat API\nJust Eat offers services for our various business partners and our consumer applications.\nHow you interact with the API depends on the services you wish to interact with.\n## Security\n### HTTPS\nAll api calls and callbacks require HTTPS. Your service will need a valid SSL certificate and be accessible via the standard SSL port (port 443).\n## Making an API request\nSome API calls require an API key, to authenticate the partner calling the API.\n```\nPUT https://uk-partnerapi.just-eat.io/orders/abcd1234 HTTP/1.1\nAuthorization: JE-API-KEY abcd123456789\n```\nOther calls require a user token in the form of a JWT.\n```\nGET https://uk.api.just-eat.io/consumer/me/orders/uk HTTP/1.1\nAuthorization: Bearer abcd123456789\n```\n\n## Date Formats\n### Date and time formats\nAll dates and times should use the [ISO 8601 standard for representation of dates and times](https://en.wikipedia.org/wiki/ISO_8601).\n\n#### For instance:\n* DueDateWithUtcOffset: `\"2015-05-26T14:52:35.5444292+01:00\"`\n  - Local time: `14:52`\n  - UTC time: `13:52`\n  - UTC offset: `+1hr` (due to daylight time saving)\n* DueDateWithUtcOffset: `\"2015-02-03T11:10:00.0000000+00:00\"`\n  - Local time: `11:10`\n  - UTC time: `11:10`\n  - UTC offset: `0` (no daylight time saving, local time is equivalent to UTC)\n\nNote 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).\n\n### Callback timestamps\nTimestamps 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.\n\nIf it is not possible to record timestamps in local time, timestamps may be recorded in UTC time with a 00:00 offset.\n## Async Webhooks\nSome of the webhooks on the platform are configured as being 'async' webhooks. These are for long-running operations, and work as follows:\n  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.\n  2. Return an immediate `202 Accepted` response from the webhook endpoint, to indicate that you have received the request.\n  3. Perform the long-running operation. This can be deemed either a _success_; or a _failure_.\n  4. If the result is a _**success**_, return the following:\n  ```\n  POST {returnUrl} HTTP/1.1\n\n  {\n        \"status\": \"Success\",\n        \"message\": \"{successMessage}\",\n        \"data\": {}   // webhook-specific response object\n  }\n  ```\n  5. Otherwise, if the result is a _**failure**_, return the following:\n  ```\n  POST {returnUrl} HTTP/1.1\n\n  {\n        \"status\": \"Failure\",\n        \"message\": \"{failureMessage}\",\n        \"data\": {}   // webhook-specific response object\n  }\n  ```"
  title: Just Eat UK Attempted Delivery API Order Delivery API API
  version: 1.0.0
  x-apisguru-categories:
  - ecommerce
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_twitter.com_JustEatUK_profile_image.png
  x-origin:
  - format: openapi
    url: https://uk.api.just-eat.io/docs/openapi.json
    version: '3.0'
  x-providerName: just-eat.co.uk
servers:
- description: Production URL for the UK API
  url: https://uk.api.just-eat.io
- description: Production URL for the DK, ES, IE, IT and NO API
  url: https://i18n.api.just-eat.io
- description: Production URL for the AU and NZ API
  url: https://aus.api.just-eat.io
tags:
- name: Order Delivery API
paths:
  /delivery/estimate:
    get:
      deprecated: true
      description: Get delivery estimate
      parameters:
      - description: The reference of the restaurant to estimate the delivery time from.
        in: query
        name: restaurantReference
        required: true
        schema:
          type: string
      - description: The latitude of the position to estimate the delivery time to.
        in: query
        name: toLat
        required: false
        schema:
          type: string
      - description: The longitude of the position to estimate the delivery time to.
        in: query
        name: toLon
        required: false
        schema:
          type: string
      - description: The postcode to estimate the delivery time to.
        in: query
        name: toPostcode
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/estimated-delivery-time'
          description: OK
      summary: Get delivery estimate
      tags:
      - Order Delivery API
  /orders/deliverystate/driverlocation:
    put:
      description: Current driver location (bulk upload)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulk-delivery-details-list'
        required: true
      responses:
        '200':
          description: OK
      summary: Update current driver locations (bulk upload)
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/atdeliveryaddress:
    put:
      description: <p>The _at delivery address_ callback should be sent when the driver thinks that they have arrived at the specified delivery address.</p><p>NB&semi; This callback should be distinct from the delivered callback, as Just Eat use this callback to understand how much time is spent locating the customer's address.</p>
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-details'
        required: true
      responses:
        '200':
          description: OK
      summary: Update order with driver at delivery address details
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/atrestaurant:
    put:
      description: The _at restaurant_ callback should be sent when the driver arrives at the restaurant and is ready to collect the order.
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-driver-details-with-eta'
        required: true
      responses:
        '200':
          description: OK
      summary: Update order with driver at restaurant details
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/atrestauranteta:
    put:
      description: <p>In the UK, this endpoint updates the estimated arrival time at the restaurant. This value can be overridden from other endpoints like <a href="https://uk.api.just-eat.io/docs#tag/Order-Delivery-API/paths/~1orders~1{orderId}~1deliverystate~1driverlocation/put">Driver Locations</a> </p> <p> This endpoint should be used to set initial at restaurant ETAs prior to driver assignment where available. The earlier a delivery partner is able to provide an estimate of when the driver will arrive at the restaurant the more likely it is that driver arrival and order preparation will be aligned. </p> <p> In other tenants (Not UK):Note that if set for a given order, this Eta will NOT be overridden by any other at restaurant ETAs provided in `DriverAssigned` or `DriverLocation` requests</p> <p>This value is significant since it informs when a restaurant is instructed to start preparing food. When the time remaining between current time and the estimated time of arrival becomes less than the restaurant's configured preparation time, food preparation is initiated</p>
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/eta-estimate'
        required: true
      responses:
        '200':
          description: OK
      summary: Update the driver's estimated time to arrive at the Restaurant
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/delivered:
    put:
      description: The _delivered_ callback should be sent when the driver has handed the food to the customer and completed the order.
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-details'
        required: true
      responses:
        '200':
          description: OK
      summary: Update order with delivered details
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/driverassigned:
    put:
      description: 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.
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-driver-assigned-details'
        required: true
      responses:
        '200':
          description: OK
      summary: Update order with driver assigned details
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/driverlocation:
    put:
      description: <p>Just Eat requires all delivery partners to send regular driver location callbacks, that record the GPS location of the drivers assigned to each order</p><p>Partners should aim to supply this callback approximately every 10 seconds.</p><p>Please provide an up-to-date ETA for when the driver will reach the restaurant in this request - this value is significant since it informs when a restaurant is instructed to start preparing food - when the time remaining between current time and the estimated time of arrival becomes less than the restaurant's configured preparation time, food preparation is initiated</p><p>Note that at restaurant Eta provided in this request will NOT override any ETA set in the Driver At Restaurant Eta request</p>
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-driver-location'
        required: true
      responses:
        '200':
          description: OK
      summary: Update the driver's current location
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/driverunassigned:
    put:
      description: 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.
      parameters:
      - description: Just Eat order identifier
        in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/delivery-driver-unassigned-details'
        required: true
      responses:
        '200':
          description: OK
        '400':
          content:
            application/json:
              example:
                partnerId:
                - Partner id was not found or could not be parsed
              schema:
                $ref: '#/components/schemas/extensibleObject'
          description: Bad Request.
      summary: Update order with driver unassigned details
      tags:
      - Order Delivery API
  /orders/{orderId}/deliverystate/onitsway:
    put:
      description: 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.
      parameters:
      - in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/on-its-way-details'
        required: true
      responses:
        '200':
          description: OK
      summary: Update order with driver on its way details
      tags:
      - Order Delivery API
components:
  schemas:
    eta-estimate:
      properties:
        bestGuess:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the restaurant.
          format: date-time
          type: string
        estimatedAt:
          description: This is the time at which you are doing the estimation
          format: date-time
          type: string
      type: object
    bulk-delivery-details:
      properties:
        EtaAtDeliveryAddress:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the delivery address.
          example: '2020-12-25T16:45:28.7537228+00:00'
          format: date-time
          type: string
        EtaAtRestaurant:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the restaurant.
          example: '2020-12-25T16:30:28.7537228+00:00'
          format: date-time
          type: string
        Location:
          $ref: '#/components/schemas/location'
        OrderId:
          description: Just Eat order identifier
          type: string
        TimeStampWithUtcOffset:
          description: This should represent the bulk delivery updated timestamp.
          format: date-time
          type: string
      type: object
    delivery-driver-details-with-eta:
      example:
        EtaAtDeliveryAddress: '2018-03-10T15:45:28.7537228+00:00'
        Location:
          Accuracy: 12.814
          Heading: 357.10382
          Latitude: 51.51641
          Longitude: -0.103198
          Speed: 8.68
        TimeStampWithUtcOffset: '2018-03-10T14:45:28.7537228+00:00'
      properties:
        EtaAtDeliveryAddress:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the delivery address.
          format: date-time
          type: string
        Location:
          $ref: '#/components/schemas/location'
        TimeStampWithUtcOffset:
          description: This should represent the Eta calculated timestamp.
          format: date-time
          type: string
      type: object
    delivery-driver-assigned-details:
      properties:
        DriverContactNumber:
          description: This should represent the driver's contact number.
          example: 07123456789
          type: string
        DriverName:
          description: This should represent the driver's name.
          example: David
          type: string
        EtaAtDeliveryAddress:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the delivery address.
          example: '2020-12-25T16:45:28.7537228+00:00'
          format: date-time
          type: string
        EtaAtRestaurant:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the restaurant. In other words, it should not just contain the pick-up time initially requested by Just Eat.
          example: '2020-12-25T15:30:28.7537228+00:00'
          format: date-time
          type: string
        Location:
          $ref: '#/components/schemas/location'
        TimeStampWithUtcOffset:
          description: This should represent the driver assigned timestamp.
          example: '2020-12-25T15:45:28.7537228+00:00'
          format: date-time
          type: string
        VehicleDetails:
          $ref: '#/components/schemas/vehicle-details'
      type: object
    delivery-details:
      example:
        TimeStampWithUtcOffset: '2018-03-10T14:45:28.7537228+00:00'
      properties:
        Location:
          $ref: '#/components/schemas/location'
        TimeStampWithUtcOffset:
          description: This should represent the delivery detailed updated timestamp.
          format: date-time
          type: string
      type: object
    location:
      description: GeoLocation object containing latitude and longitude values.
      example:
        Accuracy: 12.814
        Heading: 357.10382
        Latitude: 51.51641
        Longitude: -0.103198
        Speed: 8.68
      properties:
        Accuracy:
          description: This should represent the accuracy of driver's location.
          format: double
          type: number
        Heading:
          description: This should represent the degree of heading direction, for example, 0 is north, 90 is east.
          format: double
          type: number
        Latitude:
          description: This should represent the latitude of the driver's location.
          format: double
          type: number
        Longitude:
          description: This should represent the longitude of the driver's location.
          format: double
          type: number
        Speed:
          description: This should represent the travel speed of the driver.
          format: double
          type: number
      required:
      - Latitude
      - Longitude
      type: object
    on-its-way-details:
      properties:
        EstimatedArrivalTime:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the customer's address. In other words, it should not just contain the delivery time initially requested by Just Eat.
          example: '2020-12-25T16:45:28.7537228+00:00'
          format: date-time
          type: string
        Location:
          $ref: '#/components/schemas/location'
        TimeStampWithUtcOffset:
          description: This should represent the driver on its ways timestamp.
          example: '2020-12-25T15:30:28.7537228+00:00'
          format: date-time
          type: string
      type: object
    extensibleObject:
      additionalProperties: true
      type: object
    estimated-delivery-time:
      properties:
        DurationInMinutes:
          type: string
        RestaurantReference:
          type: string
      type: object
    vehicle-details:
      properties:
        Vehicle:
          example: Motorbike
          type: string
        VehicleRegistration:
          example: JU51 SAY
          type: string
      type: object
    delivery-driver-location:
      properties:
        EtaAtDeliveryAddress:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the delivery address.
          example: '2020-12-25T16:45:28.7537228+00:00'
          format: date-time
          type: string
        EtaAtRestaurant:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the restaurant.
          example: '2020-12-25T16:30:28.7537228+00:00'
          format: date-time
          type: string
        Location:
          $ref: '#/components/schemas/location'
          example:
            Accuracy: 12.814
            Heading: 357.10382
            Latitude: 51.51641
            Longitude: -0.103198
            Speed: 8.68
        TimeStampWithUtcOffset:
          description: This should represent the location updated timestamp.
          example: '2020-12-25T15:45:28.7537228+00:00'
          format: date-time
          type: string
      type: object
    delivery-driver-unassigned-details:
      properties:
        Comment:
          description: This should represent the comment on the unassignment.
          example: Order was not ready
          type: string
        DriverContactNumber:
          description: This should represent the driver's contact number.
          example: 07123456789
          type: string
        DriverName:
          description: This should represent the driver's name.
          example: David McDriverson
          type: string
        EtaAtDeliveryAddress:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the delivery address.
          example: '2020-12-25T16:45:28.7537228+00:00'
          format: date-time
          type: string
        EtaAtRestaurant:
          description: This should represent the delivery partner's best guess at when the driver will arrive at the restaurant. In other words, it should not just contain the pick-up time initially requested by Just Eat.
          example: '2020-12-25T16:30:28.7537228+00:00'
          format: date-time
          type: string
        'Location:':
          $ref: '#/components/schemas/location'
          description: This should represent the driver's geographic location (longitude and latitude)
        Reason:
          description: This should represent the delivery partner's reason for unassigning themselves from the order.
          example: package_not_ready
          type: string
        TimeStampWithUtcOffset:
          description: This should represent the driver unassigned timestamp.
          example: '2020-12-25T15:30:28.7537228+00:00'
          format: date-time
          type: string
        UnassignedBy:
          description: This should represent the actor who triggered unassignment.
          example: operation
          type: string
      type: object
    bulk-delivery-details-list:
      items:
        $ref: '#/components/schemas/bulk-delivery-details'
      type: array
  securitySchemes:
    Bearer:
      bearerFormat: JWT
      description: Bearer token authentication using a JSON Web Token (JWT).
      scheme: bearer
      type: http
    api_key:
      description: APIs for delivery partners require an API key that will have been issued to you.
      in: header
      name: Authorization
      type: apiKey
    basic_auth:
      description: A few services allow the use of basic authentication when a partner doesn't support OAuth based authentication.
      scheme: basic
      type: http
    justeat_adfs:
      description: ADFS authentication provider for internal Just Eat tools.
      openIdConnectUrl: https://adfs.just-eat.com/adfs/.well-known/openid-configuration
      type: openIdConnect
    restaurantsignup_jwt:
      bearerFormat: JWT token with payload `RestaurantId` and Role `[RestaurantRead | VerifyEmail | RestaurantWrite | FullAccess | DocumentRead]`
      description: Bearer token authentication using a JSON Web Token (JWT), used by the restaurant sign up system
      scheme: bearer
      type: http
x-tagGroups:
- name: Consumer Experience
  tags:
  - Authorization
  - Consumers
  - ConsumerOffers
  - ConsumerQueries
  - Consumer Queries Webhooks
  - ConsumerOrders
  - Search
  - Basket
  - Payments
  - Giftcards
  - Experiments
  - Vouchers
  - Promoted Placement
  - Menu
  - Recommendations
  - Location Services
- name: Manage Order Journey
  tags:
  - Order Acceptance API
  - Order Acceptance Webhooks
  - Order Delivery API
  - Order Delivery Webhooks
  - Order API
  - Order Webhooks
  - Customer Order Details
  - DeliveryFee
  - Delivery Pools API
  - Attempted Delivery API
  - Attempted Delivery Webhooks
  - Checkout
  - Courier Feedback
- name: Restaurant Management
  tags:
  - Restaurant Product
  - Restaurants
  - RestaurantOffers
  - Restaurant OrderTimes
  - Restaurants Webhooks
  - RestaurantSignup
  - RestaurantQueries
  - RestaurantQueries Webhooks
  - Restaurant Claims
  - Restaurant Events
  - Restaurant Events Webhooks
  - Restaurant API
  - Restaurant Webhooks
  - Products
  - Logistics POS Restaurants
  - Restaurant Smiley Rating