API Reference

Motivation

Order API v3 allows partners to access and manage orders of a merchant's SumUp POS. When compared to Order API v2, Order API v3 uses OAuth to authenticate all requests and uses more abstract terminology to describe orders, which is not specific to restaurants.

Migrating

Authentication

Instead of using the restaurant_token and provider_token in the request body to authenticate requests, Order API v3 uses OAuth. More information available here. In short, the provided credentials are used to request an access token from the Auth Server and it needs to be included in every request’s Authorization header (Authorization: Bearer <access token>). When requesting the token to use Order API v3, the order/read and order/write scopes need to be included.

Concept mapping

The terminology used in the Order API v2 was focused on restaurants. For Order API v3, the terminology has changed to cover other areas such as retail. We have compiled below a list mapping the terms used in Order API v2 to the ones used in Order API v3. You may also refer to the Glossary for more information.

Order API v2Order API v3Description
RestaurantStoreRestaurants are now referred to as stores, a more general concept.
ProviderPartnerProviders are now partners. Partners are identified by their OAuth credentials and their information is excluded from the request body.
LineItemLineNew name, but still refers to an item.
ExtraLineItemOptionLineNew name, refers to the options associated to an ItemLine.
-PackageLineMeals are now referred to as packages, a more generic term. It refers to a list of items that are bundled together.
-PackageItemLineRefers to an item contained in the package.
-PackageItemOptionLineRefers to an option associated with a PackageItemLine.
CustomerConsumerNew name, same concept.
-DiscountRepresents a discount associated with an order, item or package line.
-PreparationRepresents the preparation of a given item or package.

Request body attribute mapping

The general structures haven't changed, however, besides the concept name changes mentioned above, there are new concepts as well as changes to attributes. First of all, a camelCase approach is now used instead of snake_case. We have compiled below a table for each schema in Order API v2, which maps all changes in attributes when migrating to the corresponding Order API v3.

Order API v2 - OrderOrder API v3 - OrderComments
restaurant_token-The store id is now required as a query parameter.
provider_token-Removed, the information in the access token is now used to identify partners.
number-Removed.
namedisplayName
externalIdexternalId
statusstatusNow it is read only, not necessary on POST.
nbCustomersguestNumber
openDatedateMoved inside openingInformations.
tableIdlocation
waiterIdstaffMoved inside openingInformations.
waiterName-
type-Only Order is supported.
isBooking-Booking is not supported by Order API v3.
linesitemLines
-packageLines
paymentspayments
-preparations
-discounts
customerconsumer
-currencyCode
-openingInformations
-partnerName
-comment
Order API v2 - CustomerOrder API v3 - Consumer (Read model)Comments
ididOrder creation needs to reference an existing consumer.
firstnamefirstname
lastnamelastname
phonephoneNumber
emailemail
-deliveryAddress
-billingAddress
Order API v2 - OrderLine / ExtraLinesOrder API v3 - ItemLineComments
productIditemId
namename
priceunitPriceChanged type to an object.
initialPrice-
discountAmountamountMoved to discount.
taxtaxRate
commentcomment
status-
date-
position-
extraLinesoptionLines
nbPayed-
-externalId
-preparationId
-preparationExternalId
-priceBookId
Order API v2 - OrderLine / ExtraLinesOrder API v3 - ItemOptionLineComments
productIditemId
quantity-
namename
type-
priceunitPrice
initialPrice-
discountAmount-
taxtaxRate
comment-
status-
date-
position-
extraLines-
nbPayed-
-externalId
Order API v2 - PaymentOrder API v3 - Payment
amountamount
typetype
statusstatus
datedate
waiterId-
waiterName-
-externalId
-reason
-id
-paymentDifference