Tables Payment Device Simulator (1.0)

Download OpenAPI specification:Download

Authentication

ApiKeyAuth

Security Scheme Type API Key
Header parameter name: accountName

GetBillItems

A request from Connect for bill items:

  1. Receive a GetBillItems request from Connect
  2. If the specified session does not exist, the EPOS should send an Error response with the code SESSION_NO_SUCH_SESSION
  3. Otherwise, if the session exists but no bill exists, return an Error response with the code BILL_NO_SUCH_BILL
  4. Otherwise, if the session and the bill exists, the EPOS should send a GetBillItems response

Authorizations:
Request Body schema: application/json
sessionId
required
string <uuid> (sessionId) ^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a...

The ID of the session to get bill items for

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "sessionId": "01234567-0123-0123-0123-0123456789ab",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
{
  • "totalAmount": 950,
  • "paidAmount": 100,
  • "taxAmount": 190,
  • "currency": "GBP",
  • "items": [
    ],
  • "sessionId": "123e4567-e89b-12d3-a456-426614174000"
}

GetFullBill

A request from Connect for an itemised bill receipt:

  1. Receive a GetFullBill request from Connect
  2. If the specified session does not exist, the EPOS should send an Error response with the code SESSION_NO_SUCH_SESSION
  3. Otherwise, if the session exists but no bill exists, return an Error response with the code BILL_NO_SUCH_BILL
  4. Otherwise, if the session and the bill exists, the EPOS should respond with a GetFullBill response
;

Authorizations:
Request Body schema: application/json
sessionId
required
string <uuid> (sessionId) ^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a...

The ID of the session to get bill items for

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "sessionId": "01234567-0123-0123-0123-0123456789ab",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
{
  • "header": {
    },
  • "billItems": {
    },
  • "footer": {
    }
}

GetSession

A request from Connect for a session. If the session does not exist, return SESSION_NO_SUCH_SESSION error message, otherwise return a session object.

Authorizations:
Request Body schema: application/json
sessionId
required
string <uuid> (sessionId) ^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a...

The ID of the session to get bill items for

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "sessionId": "01234567-0123-0123-0123-0123456789ab",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
Example
{
  • "id": "123e4567-e89b-12d3-a456-426614174001",
  • "name": "Bob's party",
  • "tableName": "Table 102",
  • "createdAt": "2021-01-01T15:00:00.000Z",
  • "isPayable": true,
  • "numberOfCovers": 15,
  • "waiter": {
    }
}

GetTable

A request from Connect for a table. If the table doesn't exist, the EPOS should return a SESSION_NO_SUCH_SESSION error message

Authorizations:
Request Body schema: application/json
name
required
string (name)

A human readable, EPOS-level unique table name. The table name MUST NOT include this sequence of characters: ' - ' (whitespace hyphen whitespace)

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "name": "Table 101",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
{
  • "name": "Tables 101",
  • "maxCovers": 2,
  • "status": "TABLE_STATUS_AVAILABLE"
}

ListBillItems

A request from Connect for multiple bills. The EPOS should return a list of the bills for sessions specified. If no bills can be found, or the specified sessions don't exist, the EPOS should return an empty list. Omitting sessionIds returns all bills:

  1. Receive a ListBillItems request from Connect
  2. The EPOS should respond with a ListBillItems response

Authorizations:
Request Body schema: application/json
sessionIds
Array of strings <uuid> (sessionIds)

The ID of the session to get

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

ListSessions

A request from Connect for a list of sessions. If there are filtering params specified, the response from the EPOS should contain only sessions matching all of the filters. If no sessions match the filters, the EPOS should return an empty list.

Authorizations:
Request Body schema: application/json
hasTable
boolean (hasTable)

If set and true, the returned list of sessions should only be for sessions that have a table. If false, only for sessions without a table

isFinished
boolean (isFinished)

If set and true, the returned list of sessions should only be for sessions that are finished. If false, only for sessions that are not finished

isPayable
boolean (isPayable)

If set and true, the returned list of sessions should only be for sessions that can currently be paid

tableNames
Array of strings (tableNames)

If not empty, the returned list of sessions MUST only contain sessions linked to the tables with tableName from this list. If empty, this field MUST be ignored

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "hasTable": true,
  • "isFinished": false,
  • "isPayable": true,
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

ListTables

A request for a list of tables. If there are params set, the response should contain only tables matching all of the filters using AND logic

Authorizations:
Request Body schema: application/json
statuses
Array of strings (statuses)
Items Enum: "TABLE_STATUS_UNSPECIFIED" "TABLE_STATUS_AVAILABLE" "TABLE_STATUS_PENDING_AVAILABLE" "TABLE_STATUS_OCCUPIED" "TABLE_STATUS_NOT_IN_USE"

If set, the returned list of tables should only be for ones that have matching statuses using OR logic

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

LockSession

A request from Connect to lock a specific session. If the session does not exist, the EPOS should return SESSION_NO_SUCH_SESSION error. If it is already locked, the EPOS should return SESSION_ALREADY_LOCKED error. Otherwise, the EPOS should return a bill for the session.

Authorizations:
Request Body schema: application/json
sessionId
required
string <uuid> (sessionId) ^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a...

The ID of the session to get bill items for

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "sessionId": "01234567-0123-0123-0123-0123456789ab",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
{
  • "totalAmount": 950,
  • "paidAmount": 100,
  • "taxAmount": 190,
  • "currency": "GBP",
  • "items": [
    ],
  • "sessionId": "123e4567-e89b-12d3-a456-426614174000"
}

RecordPayment

A request from Connect to record a payment. If the session does not exist, the EPOS should return a SESSION_NO_SUCH_SESSION error. If the session connected to the payment is not locked, the EPOS should return a SESSION_NOT_LOCKED error. If this particular payment has already been recorded, the EPOS should return a PAYMENT_ALREADY_RECORDED error. If the EPOS cannot record the payment for internal reasons, return a PAYMENT_NOT_RECORDED error. If the request is successful, the EPOS should return a RecordPayment response.

  1. Receive a RecordPayment request from Connect
  2. If the specified session does not exist, the EPOS should respond with an Error response with the code SESSION_NO_SUCH_SESSION
  3. Otherwise, if the specified session exists and is not locked, the EPOS should respond with an Error response with the code SESSION_NOT_LOCKED
  4. Otherwise, if the session exists AND is locked AND the session has already been recorded, the EPOS should respond with an Error response with the code PAYMENT_ALREADY_RECORDED
  5. Otherwise, if the session exists AND is locked AND is yet to be recorded AND fails to record on the EPOS, the EPOS should respond with an Error response with the code PAYMENT_NOT_RECORDED
  6. Otherwise, if the session exists AND is locked AND has not already been recorded AND is successfully recorded on the EPOS, the EPOS should respond with a RecordPayment response

Authorizations:
Request Body schema: application/json
required
object (Payment)

An object representing a single payment

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "requestorInfo": {
    },
  • "payment": {
    }
}

Response samples

Content type
application/json
{ }

UnlockSession

A request from Connect to unlock a locked session. If the session is not locked, the EPOS should return SESSION_NOT_LOCKED error. If the EPOS cannot unlock the session due to internal reasons, it should return a SESSION_UNABLE_TO_UNLOCK error. Otherwise, the EPOS should return an empty result

Authorizations:
Request Body schema: application/json
sessionId
required
string <uuid> (sessionId) ^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a...

The ID of the session to get bill items for

required
CardMachineRequest (object) or ConsumerDeviceRequest (object)

An object providing information on the requesting device or service

Responses

Request samples

Content type
application/json
Example
{
  • "sessionId": "01234567-0123-0123-0123-0123456789ab",
  • "requestorInfo": {
    }
}

Response samples

Content type
application/json
{ }