Skip to main content

Pragma API (1)

Download OpenAPI specification:Download

Pragma provides a REST API exposing a set resources from our compatible POS solutions. This API is designed to be used by third-party applications from partners.

Server Health

This section contains an endpoint for checking if the server is online.

Get server health

Get the health of the server and some useful information.

Authorizations:
apiKey

Responses

Response Schema: application/json
status
required
string

Status of the server

uptime
required
string

Uptime of the server

docURL
required
string <uri>

URL of the API documentation

apiVersions
required
string

List of API versions

Response samples

Content type
application/json
{}

Reports

This section contains endpoints for managing reports.

Get list of reports

Get a list of reports ordered by created date from a location depending on the page parameters provided.

Authorizations:
apiKey
query Parameters
since
string^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][...

Start date for date range (first day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

until
string^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][...

End date for date range (last day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

index
integer >= 0
Default: 0

Index of the page query parameter

size
integer [ 1 .. 100 ]
Default: 10

Number of record on a page query parameter (capped to 100)

Responses

Response Schema: application/json
required
Array of objects
Example: "[object Object]"
required
object

Metadata for list of elements

object

Links for pagination

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get a report

Get a report based on the id provided.

Authorizations:
apiKey
path Parameters
id
required
string <uuid>

Report id path parameter

Responses

Response Schema: application/json
id
required
string <uuid>

Unique identifier of the report

createdAt
required
string <date-time>

Date when the report was first recorded by the server

updatedAt
required
string <date-time>

Date when the report was last updated

locationId
required
string <uuid>

Unique identifier of the seller location that this order is associated with

startedAt
required
string <date-time>

Start date of the report. This date is generated by the customer's device. As such, we cannot guarantee its consistency.

finalizedAt
required
string <date-time>

End date of the report. This date is generated by the customer's device. As such, we cannot guarantee its consistency.

deviceName
required
string

Name of the customer's device

deviceIdentifier
required
string or null

Unique identifier of the POS that opened the report session.

reportNumber
required
integer >= 1

The report number

guestsNumber
required
integer >= 0

Number of guests

totalSales
required
number

Total report sales (tax included). This amount does not include transferred orders (see also Order Transferred)

required
object

Header info of the location

required
Array of objects

List of aggregated sales data for each product

required
Array of objects

List of shift data for each clerk

clerkName
required
string or null

Name of the clerk who closed the till session

clerkId
required
string or null <uuid>

Unique identifier of the clerk who closed the till session

required
Array of objects

List of discounts

required
Array of objects

List of taxes

required
Array of objects

List of payments

required
Array of objects

List of accounting entries

initialCashBalance
required
integer or null >= 0

Initial cash fund when the till session was opened.

finalCashBalance
required
integer or null >= 0

Final cash fund once the till session was closed.

orders
required
Array of strings

List of unique identifiers of orders

Response samples

Content type
application/json
{
  • "id": "9f3ffd49-7148-469d-ae3e-b34f84e16d33",
  • "createdAt": "2024-04-29T14:21:04.225Z",
  • "updatedAt": "2024-04-29T14:21:04.225Z",
  • "locationId": "671bd3b3-c942-4989-95ba-76776a6b6cb7",
  • "startedAt": "2024-03-13T13:24:14.000Z",
  • "finalizedAt": "2024-03-13T14:14:08.000Z",
  • "deviceName": "TestBox",
  • "deviceIdentifier": null,
  • "reportNumber": 1,
  • "guestsNumber": 146,
  • "totalSales": 1000,
  • "reportHeaderInfo": {
    },
  • "reportProducts": [
    ],
  • "reportClerksShift": [
    ],
  • "clerkName": null,
  • "clerkId": null,
  • "reportDiscounts": [
    ],
  • "reportTaxes": [
    ],
  • "reportPayments": [
    ],
  • "initialCashBalance": 3000,
  • "finalCashBalance": 11000,
  • "reportEntries": [
    ],
  • "orders": [
    ]
}

Catalog

This section contains endpoints for managing the catalog.

Get catalog products

Get all catalog products configured on the POS.

Authorizations:
apiKey

Responses

Response Schema: application/json
Array
id
required
string <uuid>

Product ID in the catalog

name
required
string

Product name

category
required
string

Product category

categoryId
required
string <uuid>

Product category ID in the catalog

Array of objects
Default: []

List of subcategories - keep in mind that a product can be in multiple subcategories. If this array is empty, the product is not in any subcategory and has been archived.

required
Array of objects

List of price and tax rate for each type of price (we also provide the type name)

sku
string or null

Product stock keeping unit. More info here

Response samples

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

Get the catalog payments

Get catalog payments configured on the POS.

Authorizations:
apiKey

Responses

Response Schema: application/json
Array
id
required
string <uuid>

Payment method client id

name
required
string

Payment method name

enabled
required
boolean

Availability of the payment method

Response samples

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

Get the catalog taxes

Get catalog taxes list configured on the POS.

Authorizations:
apiKey

Responses

Response Schema: application/json
Array
id
required
string <uuid>

Tax client id

name
required
string

Tax name

percentage
required
integer

Tax rate

Response samples

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

Get the catalog modifiers

Get catalog modifiers list configured on the POS.

Authorizations:
apiKey

Responses

Response Schema: application/json
Array
id
required
string <uuid>

Modifier client id

name
required
string

Modifier name

required
Array of objects

Response samples

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

Get catalog's categories

Get the catalog category list configured on the POS.

Authorizations:
apiKey

Responses

Response Schema: application/json
Array
id
required
string <uuid>

The unique id of the category

name
required
string

The name of the category

index
required
integer >= 0

The position of the category in the configuration

Response samples

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

Orders

This section contains endpoints for managing orders.

Get list of orders

Get a list of orders ordered by created date from a location depending on the page parameters provided.

Authorizations:
apiKey
query Parameters
since
string^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][...

Start date for date range (first day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

until
string^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][...

End date for date range (last day included). Accepts a date in the format ISO 8601 : YYYY-MM-DD

index
integer >= 0
Default: 0

Index of the page query parameter

size
integer [ 1 .. 100 ]
Default: 10

Number of record on a page query parameter (capped to 100)

reportId
string <uuid>

Report id query parameter

Responses

Response Schema: application/json
required
Array of objects

List of orders

required
object

Metadata for list of elements

object

Links for pagination

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    },
}

Get an order

Get an order based on the id provided.

Authorizations:
apiKey
path Parameters
id
required
string <uuid>

Order id path parameter

Responses

Response Schema: application/json
id
required
string <uuid>

Order unique identifier

createdAt
required
string <date-time>

Date when the order was first recorded by the server

updatedAt
required
string <date-time>

Date when the order was last updated

customerId
required
string or null

Unique identifier of a customer. The value is set to null for anonymous transactions

deviceId
required
string or null

Unique identifier of the device

deviceName
string or null

Name of the device

locationId
required
string <uuid>

Unique identifier of the seller location that this order is associated with

reportId
required
string <uuid>

Unique identifier of the generated report that this order is associated with

openedAt
required
string <date-time>

Date when the order was opened

closedAt
required
string <date-time>

Date when the order was closed

guests
required
number >= 0

Number of guests

orderPlace
required
string

Order selling place

orderNumber
required
string

Order number

operatorId
required
string <uuid>

Unique identifier of the operator

operatorName
required
string

Operator name

total
required
number

Total order amount (discounts and taxes included)

totalTax
required
number

Total order tax amount

totalDiscount
required
number

Total order discount amount

required
Array of objects

List of items

required
Array of objects

List of menus

required
Array of objects

List of payments

required
Array of objects or null

List of tips

isCanceled
required
boolean

Order canceled state. An order cancelled after or before payment will not count in the total for the day (see also Order canceled)

isTransferred
required
boolean

Order transferred state. An order can be transferred to a PMS for hotel (Property Management System app). A guest of a hotel-restaurant can request to transfer the order made from the restaurant to their room account (see also Order transferred)

transferReason
required
string or null

Order transfer reason, related to the attribute isTransferred

cancelReason
required
string or null

Order cancellation reason, related to the attribute isCancelled

Response samples

Content type
application/json
{
  • "id": "b3b4c5d6-e7f8-a9b0-c1d2-e3f4a5b6c7d8",
  • "deviceId": "a2049f39-026a-4c54-a411-8a1d9271804b",
  • "createdAt": "2022-06-10T12:30:00.000Z",
  • "updatedAt": "2022-06-10T12:15:00.000Z",
  • "locationId": "d6f5e4d3-c2b1-42a0-9c68-31a3b4d5e6f7",
  • "reportId": "9cad608b-48cc-40ed-ae8b-032ec54a0472",
  • "openedAt": "2022-06-10T12:00:00.000Z",
  • "closedAt": "2022-06-10T13:30:00.000Z",
  • "guests": 2,
  • "orderPlace": "Terrasse",
  • "orderNumber": "10",
  • "operatorId": "70c3d28a-1b3a-43f0-aa4f-5b78a932f7dc",
  • "operatorName": "Jane Doe",
  • "total": 20,
  • "totalTax": 1.82,
  • "totalDiscount": 5,
  • "customerId": "-Mkw59Hj9X7iGwz0Y866",
  • "isCanceled": false,
  • "isTransferred": false,
  • "transferReason": null,
  • "cancelReason": null,
  • "items": [
    ],
  • "menus": [ ],
  • "payments": [
    ],
  • "tips": null
}

Locations

This section contains endpoints for managing locations.

Get location info

GET the location info related to your API key. You can opt-in to get the device list as well

Authorizations:
apiKey
query Parameters
devices
boolean
Value: true

Pass true if you want the device list of the location.

Responses

Response Schema: application/json
id
required
string <uuid>

Unique identifier of the location

address
required
string or null

Address of the location

siret
required
string or null

SIRET code of the location

city
required
string or null

City of the location

country
required
string or null

Country of the location

naf
required
string or null

NAF code of the location

name
required
string or null

Name of the location

phone
required
string or null

Phone number of the location

text
required
string or null

Text of the location

tva
required
string or null

VAT number of the location

url
required
string or null

URL of the location

zip
required
string or null

Zip code of the location

Array of objects

List of POS devices

Response samples

Content type
application/json
{
  • "id": "d6f5e4d3-c2b1-42a0-9c68-31a3b4d5e6f7",
  • "name": "Monzù Grands Hommes",
  • "address": "Centre commercial des, 12 Pl. des Grands Hommes",
  • "siret": "43779154400012",
  • "city": "Bordeaux",
  • "country": "France",
  • "naf": "5610A",
  • "phone": "05 56 48 55 24",
  • "text": "",
  • "tva": "FR76437791544",
  • "zip": "33000",
  • "deviceList": [
    ]
}