Just Eat Checkout API
The Checkout API from Just Eat — 2 operation(s) for checkout.
The Checkout API from Just Eat — 2 operation(s) for checkout.
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 Checkout 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: Checkout
paths:
/checkout/{tenant}/{checkoutId}:
get:
description: "Get the details required to fulfil an order, which includes:\n - The restaurant selling the items to be purchased\n - The customer making the purchase\n - How, where and when the items will be received by the customer\n - Instructions about the order\n"
parameters:
- description: "A two-character country code. \n\nThe following countries are supported:\n - United Kingdom (UK)\n - Australia (AU)\n - New Zealand (NZ)\n"
in: path
name: tenant
required: true
schema:
type: string
- description: A unique identifier for a checkout. This is currently a Basket Id.
in: path
name: checkoutId
required: true
schema:
type: string
- description: Allows the server to identify the application making the request.
in: header
name: User-Agent
required: true
schema:
type: string
responses:
'200':
content:
application/json:
example:
customer:
firstName: Joe
lastName: Bloggs
phoneNumber: '+447111111111'
fulfilment:
location:
address:
administrativeArea: Somerset
lines:
- 1 Bristol Road
locality: Bristol
postalCode: BS1 1AA
geolocation:
latitude: 1
longitude: -1
time:
asap: false
scheduled:
from: '2020-01-01T00:30:00.000Z'
to: '2020-01-01T00:30:00.000Z'
isFulfillable: true
issues:
- code: RESTAURANT_NOT_TAKING_ORDERS
- additionalSpendRequired: 100
code: MINIMUM_ORDER_VALUE_NOT_MET
currency: GBP
minimumOrderValue: 1000
restaurant:
availabilityId: '5678'
id: '1234'
serviceType: delivery
schema:
$ref: '#/components/schemas/CheckoutGetResponse'
description: 'OK : Request has succeeded.'
headers:
cache-control:
description: Response caching must not be applied.
schema:
enum:
- no-store
type: string
'400':
content:
application/json:
example:
fault:
errors:
- description: The tenant is invalid
errorCode: TENANT_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutGet400Error'
description: 'BAD REQUEST : Cannot process the request due to error by client.'
'401':
content:
application/json:
example:
fault:
errors:
- description: Authentication required to access this resource
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'UNAUTHORIZED : Missing authentication credentials to access target resource.'
'403':
content:
application/json:
example:
fault:
errors:
- description: Access to the resource is forbidden
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'FORBIDDEN : Not authorised to access target resource.'
'404':
content:
application/json:
example:
fault:
errors:
- description: The tenant is not supported
errorCode: TENANT_NOT_SUPPORTED
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/Checkout404Error'
description: 'NOT FOUND : Target resource could not be found.'
'409':
content:
application/json:
example:
fault:
errors:
- description: The checkout is in an invalid state
errorCode: CHECKOUT_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/Checkout409Error'
description: 'CONFLICT : Request not completed as it conflicts with target resource.'
'429':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'TOO MANY REQUESTS : Request not completed as server has received too many requests in a given amount of time.'
'500':
content:
application/json:
example:
fault:
errors:
- description: Internal Server Error
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'INTERNAL SERVER ERROR : Error on server preventing request from being fulfilled.'
'503':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'SERVICE UNAVAILABLE : Server currently unable to fulfil the request. The request can be retried.'
security:
- Bearer: []
summary: Get Checkout
tags:
- Checkout
x-status: Stable
patch:
description: "Update the details required to fulfil an order, which includes:\n - The customer making the purchase\n - Where and when the items will be received by the customer\n - Instructions about the order\n"
parameters:
- description: "A two-character country code. \n\nThe following countries are supported:\n - United Kingdom (UK)\n - Australia (AU)\n - New Zealand (NZ)\n"
in: path
name: tenant
required: true
schema:
type: string
- description: A unique identifier for a checkout. This is currently a Basket Id.
in: path
name: checkoutId
required: true
schema:
type: string
- description: Allows the server to identify the application making the request.
in: header
name: User-Agent
required: true
schema:
type: string
requestBody:
content:
application/json-patch+json:
example:
- op: add
path: /customer
value:
dateOfBirth: '1980-01-30'
phoneNumber: '+447111111111'
schema:
$ref: '#/components/schemas/CheckoutUpdateRequest'
required: true
responses:
'200':
content:
application/json:
example:
isFulfillable: true
issues:
- code: RESTAURANT_NOT_TAKING_ORDERS
- additionalSpendRequired: 100
code: MINIMUM_ORDER_VALUE_NOT_MET
currency: GBP
minimumOrderValue: 1000
schema:
$ref: '#/components/schemas/CheckoutUpdateResponse'
description: 'OK : Request has succeeded.'
headers:
cache-control:
description: Response caching must not be applied.
schema:
enum:
- no-store
type: string
'400':
content:
application/json:
example:
fault:
errors:
- description: The tenant is invalid
errorCode: TENANT_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutUpdate400Error'
description: 'BAD REQUEST : Cannot process the request due to error by client.'
'401':
content:
application/json:
example:
fault:
errors:
- description: Authentication required to access this resource
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'UNAUTHORIZED : Missing authentication credentials to access target resource.'
'403':
content:
application/json:
example:
fault:
errors:
- description: Access to the resource is forbidden
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'FORBIDDEN : Not authorised to access target resource.'
'404':
content:
application/json:
example:
fault:
errors:
- description: The tenant is not supported
errorCode: TENANT_NOT_SUPPORTED
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/Checkout404Error'
description: 'NOT FOUND : Target resource could not be found.'
'409':
content:
application/json:
example:
fault:
errors:
- description: The checkout is in an invalid state
errorCode: CHECKOUT_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/Checkout409Error'
description: 'CONFLICT : Request not completed as it conflicts with target resource.'
'429':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'TOO MANY REQUESTS : Request not completed as server has received too many requests in a given amount of time.'
'500':
content:
application/json:
example:
fault:
errors:
- description: Internal Server Error
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'INTERNAL SERVER ERROR : Error on server preventing request from being fulfilled.'
'503':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'SERVICE UNAVAILABLE : Server currently unable to fulfil the request. The request can be retried.'
security:
- Bearer: []
summary: Update Checkout
tags:
- Checkout
x-status: Stable
/checkout/{tenant}/{checkoutId}/fulfilment/availabletimes:
get:
description: Gets a collection of times for when an order can be fulfilled.
parameters:
- description: "A two-character country code. \n\nThe following countries are supported:\n - United Kingdom (UK)\n - Australia (AU)\n - New Zealand (NZ)\n"
in: path
name: tenant
required: true
schema:
type: string
- description: A unique identifier for a checkout. This is currently a Basket Id.
in: path
name: checkoutId
required: true
schema:
type: string
- description: Allows the server to identify the application making the request.
in: header
name: User-Agent
required: true
schema:
type: string
responses:
'200':
content:
application/json:
example:
asapAvailable: true
times:
- from: '2020-01-01T00:30:00.000Z'
to: '2020-01-01T00:45:00.000Z'
- from: '2020-01-01T00:45:00.000Z'
to: '2020-01-01T01:00:00.000Z'
schema:
$ref: '#/components/schemas/GetAvailableFulfilmentTimesResponse'
description: 'OK : Request has succeeded.'
headers:
cache-control:
description: Response caching must not be applied.
schema:
enum:
- no-store
type: string
'400':
content:
application/json:
example:
fault:
errors:
- description: The tenant is invalid
errorCode: TENANT_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutGet400Error'
description: 'BAD REQUEST : Cannot process the request due to error by client.'
'404':
content:
application/json:
example:
fault:
errors:
- description: The tenant is not supported
errorCode: TENANT_NOT_SUPPORTED
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/Checkout404Error'
description: 'NOT FOUND : Target resource could not be found.'
'409':
content:
application/json:
example:
fault:
errors:
- description: The fulfilment time bands are in an invalid state
errorCode: FULFILMENT_TIME_BANDS_INVALID
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/AvailableFulfilmentTimes409Error'
description: 'CONFLICT : Request not completed as it conflicts with target resource.'
'429':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'TOO MANY REQUESTS : Request not completed as server has received too many requests in a given amount of time.'
'500':
content:
application/json:
example:
fault:
errors:
- description: Internal Server Error
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'INTERNAL SERVER ERROR : Error on server preventing request from being fulfilled.'
'503':
content:
application/json:
example:
fault:
errors:
- description: Couldn't complete request
faultId: 72d7036d-990a-4f84-9efa-ef5f40f6044b
traceId: 0HLOCKDKQPKIU
schema:
$ref: '#/components/schemas/CheckoutDefaultError'
description: 'SERVICE UNAVAILABLE : Server currently unable to fulfil the request. The request can be retried.'
summary: Get Available Fulfilment Times
tags:
- Checkout
x-status: Stable
components:
schemas:
CheckoutUpdate400Error:
description: An HTTP 400 error response
properties:
fault:
additionalProperties: false
description: A list of values that helps identify this response back to logs, so we can easily find faults.
nullable: true
properties:
errors:
description: List of errors that may assist you in resolving the issues.
items:
additionalProperties: false
description: Details about the error that may assist you in resolving the issue.
nullable: false
properties:
description:
description: Specific details about the error that may assist you in resolving the issue.
nullable: false
type: string
errorCode:
description: A code that identifies the problem type. It will be supported by human-readable documentation that identifies how to resolve the error.
enum:
- TENANT_INVALID
- CHECKOUT_ID_INVALID
- INVALID_REQUEST
- FIRST_NAME_INVALID
- LAST_NAME_INVALID
- PHONE_NUMBER_INVALID
- DATE_OF_BIRTH_INVALID
- FULFILMENT_TIME_INVALID
- ADDRESS_LINES_INVALID
- LOCALITY_INVALID
- ADMINISTRATIVE_AREA_INVALID
- POSTAL_CODE_INVALID
- GEOLOCATION_INVALID
- DELIVERY_NOTE_INVALID
nullable: false
type: string
required:
- description
- errorCode
type: object
nullable: false
type: array
faultId:
description: A value that helps identify this response back to logs, so we can easily find this specific fault.
nullable: false
type: string
traceId:
description: A value that helps identify the trace back to logs, so that we can easily find what was happening on our system when the fault was generated.
nullable: false
type: string
required:
- faultId
- traceId
- errors
type: object
type: object
AvailableFulfilmentTimes409Error:
description: An HTTP 409 error response
properties:
fault:
additionalProperties: false
description: A list of values that helps identify this response back to logs, so we can easily find faults.
nullable: true
properties:
errors:
description: List of errors that may assist you in resolving the issues.
items:
additionalProperties: false
description: Details about the error that may assist you in resolving the issue.
nullable: false
properties:
description:
description: Specific details about the error that may assist you in resolving the issue.
nullable: false
type: string
errorCode:
description: A code that identifies the problem type. It will be supported by human-readable documentation that identifies how to resolve the error.
enum:
- FULFILMENT_TIME_BANDS_INVALID
- FULFILMENT_TIME_BANDS_NOT_FOUND
nullable: false
type: string
required:
- description
- errorCode
type: object
nullable: false
type: array
faultId:
description: A value that helps identify this response back to logs, so we can easily find this specific fault.
nullable: false
type: string
traceId:
description: A value that helps identify the trace back to logs, so that we can easily find what was happening on our system when the fault was generated.
nullable: false
type: string
required:
- faultId
- traceId
- errors
type: object
type: object
Checkout409Error:
description: An HTTP 409 error response
properties:
fault:
additionalProperties: false
description: A list of values that helps identify this response back to logs, so we can easily find faults .
nullable: true
properties:
errors:
description: List of errors that may assist you in resolving the issues.
items:
additionalProperties: false
description: Details about the error that may assist you in resolving the issue.
nullable: false
properties:
description:
description: Specific details about the error that may assist you in resolving the issue.
nullable: false
type: string
errorCode:
description: A code that identifies the problem type. It will be supported by human-readable documentation that identifies how to resolve the error.
enum:
- CHECKOUT_INVALID
nullable: false
type: string
required:
- description
- errorCode
type: object
nullable: false
type: array
faultId:
description: A value that helps identify this response back to logs, so we can easily find this specific fault.
nullable: false
type: string
traceId:
description: A value that helps identify the trace back to logs, so that we can easily find what was happening on our system when the fault was generated.
nullable: false
type: string
required:
- faultId
- traceId
- errors
type: object
type: object
CheckoutGetResponse:
description: Properties apply to all supported country codes, except where specified.
properties:
customer:
description: 'Details of the customer making the purchase.
Details of the customer will need to be submitted to the service. No default values will be set.
'
nullable: false
properties:
firstName:
description: "Customer's first name. \n\nAlso known as Given Name(s).\n"
maxLength: 100
minLength: 1
nullable: true
type: string
lastName:
description: 'Customer''s last name (Optional).
Also known as Family Name.
'
maxLength: 100
minLength: 0
nullable: true
type: string
phoneNumber:
description: "Customer's phone number.\n\nA phone number can be represented in:\n - E.164 format e.g. +447777111111 or;\n - Local format of submitted tenant e.g. 07777111111.\n\nE.164 formatted phone numbers are preferred.\n"
maxLength: 16
minLength: 3
nullable: true
type: string
type: object
fulfilment:
description: How and when the items will be received by the customer.
nullable: false
properties:
location:
description: 'The destination the customer wants to receive the order.
This only applies to purchases with a delivery service type.
'
nullable: true
properties:
address:
description: The postal address where the customer wants to receive the order.
nullable: true
properties:
administrativeArea:
description: "Geographical region of this address. \n\nAlso known as County or State.\n\nRequired in Australia (AU) only for an order to be fulfilled.\n"
maxLength: 50
minLength: 1
nullable: true
type: string
lines:
description: One or more lines representing the street address.
items:
description: Represents part of a street address.
maxLength: 100
minLength: 1
nullable: false
type: string
maxItems: 4
minItems: 0
nullable: false
type: array
locality:
description: 'The locality of this address.
Also known as Town or City.
'
maxLength: 50
minLength: 1
nullable: true
type: string
postalCode:
description: Postal code of this address.
maxLength: 50
minLength: 1
nullable: true
type: string
type: object
geolocation:
description: 'The coordinates of a geographical location where the customer wants to receive the order.
Required in Australia (AU) and New Zealand (NZ) only for an order to be fulfilled.
'
nullable: true
properties:
latitude:
description: The latitude of the geographical location.
format: decimal
nullable: false
type: number
longitude:
description: The longitude of the geographical location.
format: decimal
nullable: false
type: number
required:
- latitude
- longitude
type: object
type: object
time:
description: Time the customer wants to receive the order i.e. when order is fulfilled.
nullable: true
properties:
asap:
description: 'If the order should be fulfilled as soon as possible (ASAP).
ASAP may not be fulfillable.
Default is false.
'
nullable: false
type: boolean
scheduled:
description: 'Scheduled time the customer wants the order to be fulfilled.
If ASAP is selected and f
# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/just-eat/refs/heads/main/openapi/just-eat-checkout-api-openapi.yml