Mergeport Ordering (4.0.19)

Download OpenAPI specification:Download

Introduction

Mergeport Ordering is a channel manager for online ordering and delivery services. With a single interface we can forward all incoming orders from multiple service providers in a standardized format.

Access details and developer account

If not already done, contact us for a developer account. You will receive a unique siteId and apiKey.

Provider configuration

Typically, once you register with a service provider, they will provide you with some access details for their services, e.g. restaurantId or apiKey and apiSecret. You will need to forward each of those access details to Mergeport and we are ready to go.

Data flow

The connected online ordering services will synchronize orders with our platform. You can download all "active" orders [ status=receivedByProvider or status=canceledByProvider ] by calling /orders?filter=active. If you are using the HTTP Rest API, we would recommend to poll the orders with a delay of 1-2 minutes. Should anything go wrong during the download of the orders (aborted or missing connectivity), simply repeat the request until you have stored them, and then mark them as downloaded/read by calling /orders/{id} and setting [ status=fetchedByPOS ] to avoid duplicates. From that moment on, the order won’t be active anymore. To accept the order, you need to update the status to confirm the processing [ status=acceptedByPOS]. Upon confirmation, we will forward the information to the provider (if supported) and set the status to acceptedByPOS. This action confirms the processing. You can also accept the order right away and skip the fetchedByPOS state.

For MJAM direct integration: Additionally, in order to support the MJAM direct integration, the POS needs to send additional states to MERGEPORT:

  • if the gastronomy takes care of the delivery : send inDelivery as soon as the order has been picked up by the rider. Note: there is no "delivered" status for vendor delivery in the MJAM integration.

  • if the order gets picked up by the customer: send pickedUp as soon as the order has been fulfilled.

  • If the MJAM delivery squad is in use: set the status to ready once the order can be picked up by the rider.

Cancelation workflow: if the provider cancels an already processed order, it is being added again to the active orders with the state canceledByProvider. This requests the POS to process the cancelation internally and set the order to canceledByPOS.

Please be aware that our interface can only forward and support as much information/features as the corresponding service provider provides. We do the best to standardize the information, but some data may be missing in the different cases.

Terms

In the following, we use different terms to explain the workflow/functionality of the API. Let us give you a quick briefing on how we use the mentioned terms:

  • site: site corresponds to a restaurant
  • POS item: article, menu item from the POS, e.g. "Spaghetti Bolognese"
  • service provider: delivery platform, app, website that is connected to MERGEPORT

Prices and currencies

All prices are expressed as a structured object, with the currency code, e.g. "EUR" and the value in the atomic part of that currency, typically "cent". 3€ will be represented as 300.

Deposit: We forward the deposit fees we receive from providers to the POS systems. These fees are usually transmitted on an item-specific basis in the deposit field and are already included in the item price. However, not all providers send information about deposits (e.g., Just Eat Takeaway), and some providers (e.g., foodora) only send the total deposit for the entire order. In such cases, this total is included in the order.deposit field.

Order item structure

We use a flat list of order items items within the order object which, paired with the parentId, offers the flexibility to represent any hierarchical order data structure. Please note: the order item quantity is absolute, we also provide the relativeQuantity. If the customer has ordered three pizzas, all of them with 2 x cheese as modifier, this will result in two order items:

  id      quantity    relativeQuantity    description   singlePrice   rowTotal    parentId
  9a1     3           3                   pizza         700           2100        null
  3fc     6           2                   cheese        200           1200        9a1
                                                        total         3300

The absolut quantity makes sum checks easier, without having to reconstruct the whole order first. This is very helpful when analyzing data and logs for support cases.

Responses

Typically, our responses are being returned with the HTTP status codes 200 OK, 400 Bad Request, 401 Unauthorized, 403 Forbidden. We have three response types, you can easily check the response for the following fields:

  • [data] - for read operations. The response contains an object or array of the requested data
  • success - for generic operations. The success property contains a message describing the operation result.
  • error - for minor errors. The error property contains a code and a message

Authentication

You need to provide an apiKey as "Authorization" header for all API calls. The apiKey is provided by Mergeport in the registration process.

Authorization header

Every API call requires a valid apiKey in the "Authorization" header.

Select Protocol

From this point on, you can choose to use the REST API, the WebSocket or a mixture of both. We recommend the usage of the WebSocket, as it enables a real-time communication and saves resources.

WebSocket API

WebSocket-URL: wss://socket.ordering.mergeport.com/v4

This API can give you push notifications of arriving orders or deliver the entire order upon arrival. All REST API functions can be used directly. To establish a connection with the WebSocket, you need to set a valid apiKey in the Sec-WebSocket-Protocol header. For example "'Sec-WebSocket-Protocol': '1f3a2007-8674-4496-9ccb-f1e9a8bebae5'". More details in the WebSocket-section.

  • JavaScript example with protocol header parameter used for apiKey:

    // WebSocket Client endpoint to open the connection
    
    let exampleSocket = new WebSocket(url, apiKey);
    
    //Sample connect: let exampleSocket = new WebSocket("wss://socket.ordering.mergeport.com/v4", "1f3a2007-8674-4496-9ccb-f1e9a8bebae5");
    // you need to replace the sample key "1f3a2007-8674-4496-9ccb-f1e9a8bebae5" with your own provided **apiKey**
    
    // Event handler for the WebSocket connection opening
    exampleSocket.onopen = function (event) {
      exampleSocket.send("Here's some text that the server is urgently awaiting!");
    };
    
    // Event handler for receiving text messages
    exampleSocket.onmessage = function (event) {
      console.log(event.data);
    }
    
    // Event handler for errors in the WebSocket object
    exampleSocket.onerror = function (event) {
      console.log("Error ",event.data);
    }
    
    // Event handler for the close connection event
    exampleSocket.onclose = function(event) {
      console.log("WebSocket is closed now.");
    };
    
    // Function for sending commands to the server
    function sendAction(action, data = null) {
      // Construct a msg object containing the data the server needs to process the message from the client.
      var msg = {
        action: action,
        data: data,
        date: Date.now()
      };
      // Send the msg object as a JSON-formatted string.
      exampleSocket.send(JSON.stringify(msg));
    }
    
    // Send a test command for example get the version
    sendAction("version");
    
    // Finally close the connection
    exampleSocket.close();
  • If setting a header is not possible in your environment, you can pass the apiKey as an url parameter accesstoken

    let exampleSocket = new WebSocket("wss://socket.ordering.mergeport.com/v4?accesstoken=1f3a2007-8674-4496-9ccb-f1e9a8bebae5");

    Websocket Events

    gotNewOrder Upon arrival of new orders, the Websocket sends an GotNewOrder-Action with the order

    {
    "action": "GotNewOrder",
    "data": {
      "orderId": "123456789",
      "providerId": "c933b71f-8efc-48ce-bd8c-630eb153ce10",
      "order": { **have_a_look_at_the_order_schema** }
    }
    }

    GetTable Upon arrival of provider request for table data, the Websocket sends an GetTable-Action with the table request

    {
    "action": "GetTable",
    "data": {
      "siteId": "c933b71f-8efc-48ce-bd8c-630eb153ce10",
      "tableId": "15",
      "providerId": "e5ec3c9a-325a-897e-a6b3-23a1953a6eee"
    }
    }

    WebSocket Requests

    The WebSocket supports the whole set of functionalities. Hence why you will find a "WebSocket" action in the description of every REST-endpoint. Just pass the WebSocket action as the "action" parameter in the WebSocket request (for example "GetOrders"):

    {
    "action": "GetOrders"
    }

    If you has to pas an url parameter {id} in the REST call you can pass them in the Socket-call as id:

    {
    "action": "GetOrder",
    "id": "8702f7e0-b2a7-452f-95db-ee69fd0aa3b6"
    }

    To serialize a requestBodyData inside the WebSocket-request, just add a data parameter:

    {
    "action": "SetOrderState",
    "id": "8702f7e0-b2a7-452f-95db-ee69fd0aa3b6",
    "data": {
      "state": "receivedByProvider"
    }
    }

    Websocket Responses

    PutTable Upon arrival of GetTable-Action, you should respond with an PutTable-Action with the table data

    {
    "action": "PutTable",
    "data": {
      "siteId": "c933b71f-8efc-48ce-bd8c-630eb153ce10",
      "tableId": "15",
      "providerId": "e5ec3c9a-325a-897e-a6b3-23a1953a6eee",
      "table": { **have_a_look_at_the_table_schema** }
    }
    }

    WebSocket Keep Alive

    In order to keep the WebSocket connection alive, the client is supposed to ping periodically. We recommend a period of 60s.

    {
    "action": "ka",
    "data": "ping" 
    }

    The maximum connection duration of the WebSocket API is 2h and cannot be increased. Hence why the client needs to implement a reconnect upon the closing signal.

    Request validation

    All requests will be validated. The following cases will lead to a validation error:

  • Missing required properties

  • Unknown properties in the request body

  • Invalid data format.

    Important: date-time fields and parameters must be formatted as UTC ISO 8601 strings, e.g. '2000-01-01T10:10:10.123Z'.

Ordering

Ordering operations allow the POS to synchronize orders and articles with ordering platforms. Ordering platforms include delivery services, Dine-In/Dine-Out apps & websites, table ordering services and discovery pages as well as websites. The Ordering API enables connected services to query the articles and menu items of the connected POS system and inject orders into the POS. As a feedback, the platforms receive status updates and preparation time changes.

Typically, the workflow is as following:

  • Enduser orders within the ordering platform
  • POS receives the list of active orders
  • POS set the state of the active orders to "fetchedByPOS"
  • POS processes the order and injects it into the workflow of the restaurant
  • POS updates the state to "acceptedByPos" and continues to update along the processing

Orders

retrieves all requested orders for the requesting site

WebSocket action: GetOrders

This endpoint returns all orders for the requesting site with the possibility to filter by state, date and pagination-block. As part of the POS integration, this endpoint should only be included with the active filter to gather new orders.

Reminder:

Websocket: data: {filter: 'active'}

REST: ?filter=active

Without a filter, the response will be paginated with the "startKey" if the return value is too large. To fetch the complete data, please iterate this request with the updated startKey until it is null again.

  • Description startKey: startKey to fetch further results
query Parameters
filter
string
Value: "active"

filter to provide a subset of the orders ( example: active)

dateFrom
string <date-time>

date to start with the subset of the orders

dateTo
string <date-time>

date to end with the subset of the orders

startKey
string <uuid>

id to continue with the subset of the orders

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ],
  • "startKey": "f2c499b1-ac1a-481d-98e2-77b3a197a97a"
}

retrieves all active orders for the requesting site Deprecated

WebSocket action: GetOrdersOld

Caution: As default the Websocket action will get all orders to get only the recently changed and new ones specify an active filter: data: {filter: 'active'}

query Parameters
filter
string
Value: "active"

filter to provide a subset of the orders ( example: active)

dateFrom
string <date-time>

date to start with the subset of the orders

dateTo
string <date-time>

date to end with the subset of the orders

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
[
  • {
    }
]

retrieves all active orders for the requesting site Deprecated

WebSocket action: GetOrders

Caution: As default the Websocket action will get all orders to get only the recently changed and new ones specify an active filter: data: {filter: 'active'}

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
[
  • {
    }
]

retrieves the specified order for the requesting site

WebSocket action: GetOrder

path Parameters
id
required
string <uuid>

internal ID of the order

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",
  • "providerName": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "orderId": "string",
  • "orderReference": "string",
  • "creationDate": "2019-08-24T14:15:22Z",
  • "lastModifyDate": "2019-08-24T14:15:22Z",
  • "expiryDate": "2019-08-24T14:15:22Z",
  • "status": "receivedByProvider",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "paymentInfo": [
    ],
  • "receiptInfo": [
    ],
  • "requireReceipt": true,
  • "deliveryInfo": {
    },
  • "pickupInfo": {
    },
  • "inHouseOrderingInfo": {
    },
  • "notes": "string",
  • "discounts": [
    ],
  • "amountToPay": {
    },
  • "additionalCosts": [
    ],
  • "items": [
    ],
  • "possibleActions": [
    ],
  • "possibleStateChanges": [
    ],
  • "preOrder": true,
  • "platformUpdates": [
    ],
  • "deposit": 0
}

sets the 'status' for the specified order

WebSocket action: SetOrderState

path Parameters
id
required
string <uuid>

internal ID of the order

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json
state
required
string
Enum: "receivedByProvider" "fetchedByPOS" "canceledByProvider" "canceledByPOS" "rejectedByPOS" "acceptedByPOS" "preparing" "ready" "pickedUp" "inDelivery" "delivered"

Desired "status" of the order.

timeChange
string Nullable

Eventual new date-time if there is a change in delivery or pickup time (ISO 8601). In case the platform has not set a pickup or delivery time, also consider sending a timeChange in the "acceptedByPOS" status update to inform the service provider about the expected delivery/pickup time.

Array of objects Nullable

Contains information about the created invoice (by POS) such as signature, item and taxes. Used for service providers to print the receipt for example. Also supports multiple receipts for one order (e.g. split payment)

Responses

Request samples

Content type
application/json
{
  • "state": "receivedByProvider",
  • "timeChange": "string",
  • "receipts": [
    ]
}

Response samples

Content type
application/json
{
  • "success": "order set status with succes",
  • "order": {
    }
}

Items

retrieves the POS items for the requesting site

WebSocket action: GetPosItems

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
[
  • {
    }
]

sets/uploads POS items for a restaurant

WebSocket action: SetPosItems

This action performs an upload of the items in the payload of the request. The items will be stored and saved on our end and can be curated in the MERGEPORT controller as well as queried by the services providers. Already existing items will be updated.

If the options "availableChoices" are set, they are the preferred source for service providers and ordering platforms to build their menu upon. "availableChoices" provide more flexibility and possibilities for a dynamic configuration. If empty, the ordering platforms usually fall back to the parentIds structure.

Please note that you need to use "set specifications of the specified POS item" endpoint to upload an image.

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Array of Pos Items

Array ()
id
required
string

item id in the pos system

object Nullable

price of a single order item in cents

object Nullable

associative array of different names for ISO-639-1-Codes

object Nullable
Deprecated

associative array of different categories for ISO-639-1-Codes

object Nullable
Deprecated

associative array of different subCategories for ISO-639-1-Codes

object Nullable

associative array of different descriptions for ISO-639-1-Codes

allergens
string Nullable

here you can specify the allergens

Codes:

  • A - Grains containing gluten
  • B - Crustaceans
  • C - Egg
  • D - Fish
  • E - Peanuts
  • F - Soy
  • G - Milk or lactose
  • H - Edible nuts
  • L - Celery
  • M - Mustard
  • N - Sesame
  • O - Sulphites
  • P - Lupines
  • R - Molluscs
reference
string Nullable

extra unique reference of the item (PLU)

parentId
string Nullable
Deprecated

item id of the parent item in the pos system

parentIds
Array of strings Nullable

list of item ids of the parent items in the pos system

imgUrl
string Nullable

url to the image of the product

enabled
boolean Nullable

on/off switch for the product

stock
number Nullable

items currently in stock

categoryIds
Array of strings Nullable

list of category ids of the parent categories in the pos system

menuIds
Array of strings Nullable

list of menu ids of the parent menus in the pos system

labels
Array of strings Nullable

list of extra labels for the product

ean
string Nullable

extra unique reference of the item (European Article Number)

type
string Nullable
Enum: "product" "topping"

extra type definition of the product

sort
number Nullable

number to sort items

object Nullable

additional options for case-dependent representation of the products

lastUpdated
string <date-time> Nullable

time item was changed (filled automatically)

deposit
number Nullable

Price of deposit in cents

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

retrieves the specified POS item

WebSocket action: GetItem

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "price": {
    },
  • "name": {
    },
  • "category": {
    },
  • "subCategory": {
    },
  • "description": {
    },
  • "allergens": "AELO",
  • "reference": "string",
  • "parentId": "string",
  • "parentIds": [
    ],
  • "imgUrl": "string",
  • "enabled": true,
  • "stock": 0,
  • "categoryIds": [
    ],
  • "menuIds": [
    ],
  • "labels": [
    ],
  • "ean": "8501110082969",
  • "type": "product",
  • "sort": 0,
  • "options": {
    },
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "deposit": 0
}

set specifications of the specified POS item

WebSocket action: SetPosItemSpecs

This action allows to update/set specifications for an already existing POS item. Mainly used for the image at the moment.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Specs Object for Pos Items

img
required
string <byte>

the base64 encoded image for the item

Responses

Request samples

Content type
application/json
{
  • "img": "string"
}

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "price": {
    },
  • "name": {
    },
  • "category": {
    },
  • "subCategory": {
    },
  • "description": {
    },
  • "allergens": "AELO",
  • "reference": "string",
  • "parentId": "string",
  • "parentIds": [
    ],
  • "imgUrl": "string",
  • "enabled": true,
  • "stock": 0,
  • "categoryIds": [
    ],
  • "menuIds": [
    ],
  • "labels": [
    ],
  • "ean": "8501110082969",
  • "type": "product",
  • "sort": 0,
  • "options": {
    },
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "deposit": 0
}

delete a specified POS item

WebSocket action: DeletePosItem

This action allows to delete a POS item.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "price": {
    },
  • "name": {
    },
  • "category": {
    },
  • "subCategory": {
    },
  • "description": {
    },
  • "allergens": "AELO",
  • "reference": "string",
  • "parentId": "string",
  • "parentIds": [
    ],
  • "imgUrl": "string",
  • "enabled": true,
  • "stock": 0,
  • "categoryIds": [
    ],
  • "menuIds": [
    ],
  • "labels": [
    ],
  • "ean": "8501110082969",
  • "type": "product",
  • "sort": 0,
  • "options": {
    },
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "deposit": 0
}

Categories

retrieves the POS categories for the requesting site

WebSocket action: GetPosCategories

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
[
  • {
    }
]

sets/uploads POS categories for a restaurant

WebSocket action: SetPosCategories

This action performs an upload of the categories in the payload of the request. The categories will be stored and saved on our end and can be curated in the MERGEPORT controller as well as queried by the services providers. Already existing categories will be updated.

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Array of Pos Categories

Array ()
id
required
string

category id in the pos system

object Nullable

associative array of different names for ISO-639-1-Codes

object Nullable

associative array of different descriptions for ISO-639-1-Codes

imgUrl
string Nullable

url to the image of the menu

parentIds
Array of strings Nullable

list of category ids of the parent categories in the pos system

enabled
boolean Nullable

on/off switch for the menu

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

retrieves the specified POS category

WebSocket action: GetCategory

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "parentIds": [
    ],
  • "enabled": true
}

set specifications of the specified POS category

WebSocket action: SetPosCategorySpecs

This action allows to update/set specifications for an already existing POS category. Mainly used for the image at the moment.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Specs Object for Pos Categories

img
required
string <byte>

the base64 encoded image for the item

Responses

Request samples

Content type
application/json
{
  • "img": "string"
}

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "parentIds": [
    ],
  • "enabled": true
}

delete a specified POS category

WebSocket action: DeletePosCategory

This action allows to delete a POS category.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "parentIds": [
    ],
  • "enabled": true
}

Menus

retrieves the POS menus for the requesting site

WebSocket action: GetPosMenus

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
[
  • {
    }
]

sets/uploads POS menus for a restaurant

WebSocket action: SetPosMenus

This action performs an upload of the menus in the payload of the request. The menus will be stored and saved on our end and can be curated in the MERGEPORT controller as well as queried by the services providers. Already existing menus will be updated.

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Array of Pos Menus

Array ()
id
required
string

menu id in the pos system

object Nullable

associative array of different names for ISO-639-1-Codes

object Nullable

associative array of different descriptions for ISO-639-1-Codes

imgUrl
string Nullable

url to the image of the menu

menuType
Array of strings Nullable
Items Enum: "pickup" "delivery" "inHouse"

list of expeditionTypes the product should be available for

enabled
boolean Nullable

on/off switch for the menu

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

retrieves the specified POS menu

WebSocket action: GetMenu

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "menuType": [
    ],
  • "enabled": true
}

set specifications of the specified POS menu

WebSocket action: SetPosMenuSpecs

This action allows to update/set specifications for an already existing POS menu. Mainly used for the image upload at the moment.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Specs Object for Pos Menus

img
required
string <byte>

the base64 encoded image for the item

Responses

Request samples

Content type
application/json
{
  • "img": "string"
}

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "menuType": [
    ],
  • "enabled": true
}

delete a specified POS menu

WebSocket action: DeletePosMenu

This action allows to delete a POS menu item.

path Parameters
id
required
string

id of the item

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "id": "string",
  • "name": {
    },
  • "description": {
    },
  • "imgUrl": "string",
  • "menuType": [
    ],
  • "enabled": true
}

Restaurant

Set specifications of the specified POS restaurant

WebSocket action: SetSiteSpecs

This action allows to update/set specifications for a POS restaurant.

header Parameters
Authorization
required
string <uuid>

static apiKey provided by Mergeport

Request Body schema: application/json

Object for Pos SiteSpecs

object Nullable

keeps track of the default preparation times of the restaurant

orderingActivated
boolean Nullable
Default: true

enables ordering for this restaurant

Responses

Request samples

Content type
application/json
{
  • "defaultPreparationTime": {
    },
  • "orderingActivated": true
}

Response samples

Content type
application/json
{
  • "success": {
    }
}

Payments

Payment operations enable the functionality “Self Payment”, which means that ordering platforms can pay for items on tables in restaurants, even if they have not been ordered by the same platform beforehand. The Payments API enables connected ordering platforms to query tables, view ordered items on tables and send payments to clear the whole/a fraction of the table. To support the optional Self Payment functionality, the POS system needs to send open positions on tables upon the request of an ordering platform, process payments of open positions (including split payments) and reply with receipt data. Typically, the workflow is as following:

  • Enduser uses an ordering platform to see the open positions on the table, e.g. by scanning a QR code
  • POS receives “Get Table” action
  • POS replies with the open positions on the table via “Put Table” action
  • Enduser selects and pays for all/some open positions on the table
  • POS receives “Get Payment” action
  • POS processes payment and replies with the receipt via “Put Receipt” action

In order to prevent consistency issues and high data traffic, the Self Payment functionality is only available via WebSocket and thus not documented in the HTTP REST statements underneath. The actions are only available for the ordering platforms if the POS has an active WebSocket connection.

GetTable

The connected ordering platforms can query a specific table. The POS receives a “Get Table” action in the WebSocket.

action
string

action command to execute

object

data to send with the command

{
  • "action": "GetTable",
  • "data": {
    }
}

PutTable

Upon arrival of the GetTable-Action, the POS should answer with PutTable, containing information about the table as well as the open (= not paid yet) items.

action
required
string

action command to execute

required
object

data to send with the command

requestId
required
string

unique request id generated by POS (Each reply message contains a correlation id, a unique identifier that indicates which request message this reply is for)

{
  • "action": "PutTable",
  • "data": {
    },
  • "requestId": "string"
}



Responses

action
string

the executed command

status
string

status of the executed command

statusCode
integer

status code of the executed command

correlationId
string

Each reply message contains a correlation id, a unique identifier that indicates which request message this reply is for (unique request id generated by POS)

Example
{
  • "action": "PutTable",
  • "status": "ok",
  • "statusCode": 200,
  • "correlationId": "string"
}

GotPaymentRequest

The ordering platform creates a “payment” once the enduser has paid for the selected items.

action
string

action command to execute

object

data to send with the command

{
  • "action": "GotPaymentRequest",
  • "data": {
    }
}

PutReceipt

To confirm the processing of the payment, the POS is supposed to send the receipt. If this confirmation is missing, the ordering platform will cancel the payment.

action
required
string

action command to execute

required
object

data to send with the command

requestId
required
string

unique request id generated by POS (Each reply message contains a correlation id, a unique identifier that indicates which request message this reply is for)

{
  • "action": "PutReceipt",
  • "data": {
    },
  • "requestId": "string"
}



Responses

action
string

the executed command

status
string

status of the executed command

statusCode
integer

status code of the executed command

correlationId
string

Each reply message contains a correlation id, a unique identifier that indicates which request message this reply is for (unique request id generated by POS)

Example
{
  • "action": "PutReceipt",
  • "status": "ok",
  • "statusCode": 200,
  • "correlationId": "string"
}

Version

get all version information

WebSocket action: version

Responses

Response samples

Content type
application/json
{
  • "service": "string",
  • "stage": "string",
  • "version": "string",
  • "codegenDate": "string"
}