Just Eat Order API API
The Order API API from Just Eat — 1 operation(s) for order api.
The Order API API from Just Eat — 1 operation(s) for order api.
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 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 API
paths:
/orders:
post:
description: Create order
parameters:
- description: The api version to use. Version 2.0 is the only available version.
example: 2
in: header
name: x-je-api-version
required: false
schema:
default: 1
type: number
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/order-request-v2'
required: true
responses:
'201':
content:
application/json:
schema:
properties:
OrderId:
type: string
type: object
description: Created
'400':
description: Bad Request - Request is for deprecated API version or has failed validation in some way - see response body for details
'409':
content:
application/json:
schema:
properties:
OrderId:
type: string
type: object
description: Conflict - you've already told us about an order with this `OrderReference`
summary: Create order
tags:
- Order API
components:
schemas:
item-v2:
properties:
Items:
items:
$ref: '#/components/schemas/item-v2'
type: array
Name:
type: string
Quantity:
type: integer
Reference:
type: string
UnitPrice:
format: money
type: integer
type: object
location-v2:
example:
Latitude: 51.51641
Longitude: -0.103198
properties:
Latitude:
format: double
type: number
Longitude:
format: double
type: number
required:
- Latitude
- Longitude
type: object
customer-v2:
properties:
Address:
$ref: '#/components/schemas/address-v2'
DisplayPhoneNumber:
description: If you implement phone masking provide a masked number here
type: string
Email:
type: string
Name:
type: string
PhoneNumber:
description: The customer's real phone number
type: string
required:
- Name
- PhoneNumber
- Address
type: object
fulfilment-v2:
example:
DueAsap: false
DueDate: '2020-01-01T09:00:00.000Z'
Method: Delivery
properties:
DueAsap:
description: If food should be delivered ASAP
type: boolean
DueDate:
description: The time the customer expects the food. Time must be in the future
format: date-time
type: string
Method:
enum:
- Delivery
- Collection
type: string
required:
- Method
- DueDate
type: object
tax-v2:
properties:
Percentage:
format: double
type: number
Type:
type: string
Value:
format: money
type: number
required:
- Value
- Type
- Percentage
type: object
lines-v2:
properties:
LastCardDigits:
type: string
Paid:
type: boolean
ServiceFee:
format: double
type: number
Type:
enum:
- Cash
- Card
- AccountCredit
- Voucher
type: string
Value:
format: money
type: number
required:
- Type
type: object
payment-v2:
example:
Fees:
- Type: card
Value: 0.25
- Type: delivery
Value: 3.5
Lines:
- LastCardDigits: '1234'
Paid: true
ServiceFee: 0
Type: Card
Value: 19.95
Tips:
- Type: driver
Value: 2.5
properties:
Fees:
items:
$ref: '#/components/schemas/fee'
type: array
Lines:
items:
$ref: '#/components/schemas/lines-v2'
type: array
PaidDate:
format: date-time
type: string
Taxes:
items:
$ref: '#/components/schemas/tax-v2'
type: array
Tips:
items:
$ref: '#/components/schemas/fee'
type: array
required:
- Lines
type: object
restaurant-v2:
oneOf:
- properties:
Id:
description: Our restaurant ID
type: integer
type: object
- properties:
Reference:
description: If we hold a mapping for your restaurant IDs to ours - use your ID here
type: string
type: object
order-request-v2:
properties:
Customer:
$ref: '#/components/schemas/customer-v2'
CustomerNotes:
example:
NoteForDelivery: Red door
NoteForRestaurant: Make it spicy
properties:
NoteForDelivery:
type: string
NoteForRestaurant:
type: string
type: object
FriendlyOrderReference:
type: string
Fulfilment:
$ref: '#/components/schemas/fulfilment-v2'
IsTest:
type: boolean
Items:
items:
$ref: '#/components/schemas/items-v2'
type: array
OrderReference:
type: string
Payment:
$ref: '#/components/schemas/payment-v2'
Restaurant:
$ref: '#/components/schemas/restaurant-v2'
TotalPrice:
format: double
type: number
required:
- OrderReference
- TotalPrice
- Restaurant
- Customer
- Fulfilment
- Payment
- Items
type: object
address-v2:
properties:
City:
type: string
GeoLocation:
$ref: '#/components/schemas/location-v2'
Lines:
items:
type: string
type: array
PostalCode:
type: string
required:
- Lines
- City
- PostalCode
- Geolocation
type: object
items-v2:
properties:
Items:
items:
$ref: '#/components/schemas/item-v2'
type: array
Name:
type: string
Quantity:
minimum: 1
type: integer
Reference:
description: The item's ID that you hold
type: string
TotalPrice:
description: Price of this item x quantity and all sub items
format: money
type: number
UnitPrice:
format: money
type: integer
required:
- TotalPrice
- Reference
- Name
- Quantity
type: object
fee:
properties:
Type:
type: string
Value:
format: money
type: number
type: object
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