NAV
shell

Xef

Prerequisites

Please read this section first. (Do you want to use our API?)

To be able to use the external api you need a Revo XEF test account and an Access Token and your Integrator Token

  1. Login into the desired account
  2. Go to account management
  3. Create a new token
  4. To get your integration token, contact us

Basic usage

The main URL for the external api is

https://revoxef.works/api/external/v2/

And you should provide the mandatory headers for the authentication

Header Value
tenant {account-username}
Authorization Bearer {the-token}
client-token {your-integrator-token}

The API has a data size límit of 2MB for each request.

The API has a limit of 120 requests every minute so the best practice is to cache for x time the fetched information done with the getXXX actions.

Contact us to get your client-token

Payment Methods

GET PaymentMethods

GET https://revoxef.works/api/external/v2/paymentMethods

Response is an array of payment methods with the following fields:

"id": 1,
"name": "Payment method name",
"active": true,

Rooms

GET Rooms

GET https://revoxef.works/api/external/v2/rooms

Response is paginated for every 20 rooms

    "id": 1,
    "name": "Room 1",
    "order": "0",
    "active": "1",

You can add ?withTables parameter. This way apart from rooms another array will be loaded called tables, it will contain a tables array within each room.

"tables": [
    {
        "id": 1,
        "name": "Table 1",
        "x": "0",
        "y": "0",
        "width": "100",
        "height": "100",
        "baseX": "0",
        "baseY": "0",
        "isJoined": "0",
        "baseWidth": "100",
        "baseHeight": "100",
        "color": "#dddddd",
        "type_id": "2",
        "room_id": "1",
        "price_id": null,
    }
]

GiftCards

POST GiftCards

Query parameter Description
balance required Card amount
uuid required Unique identifier for the card
campaign_id optional Campaign ID when giftcard should be linked with a campaign (get ID from backend)
GET https://revoxef.works/api/external/v2/giftCards

Response

{
    "balance": 1.25,
    "uuid": "123456"
    "campaign_id": "3"
}

Responses

Value Meaning Description
201 HTTP_CREATED Call succeed
422 HTTP_UNPROCESSABLE_ENTITY Call failed

Use Gift Card

Response

{
    "balance": 1.25,
    "customer_id": "3"
}

POST GiftCards/{uuid}

Query parameter Description
uuid required Unique identifier for the card
Post parameter Description
amount required The amount to discount

Customers

GET Customers

GET https://revoxef.works/api/external/v2/customers
GET https://revoxef.works/api/external/v2/customers/<customer_id>
POST https://revoxef.works/api/external/v2/customers
    Data must be sent as an array.
    Create a customer:          [{"name": "Customer 1", "active": 1}]
        "name" is required
    Update a customer:          [{"id": 2, "name": "Customer 1 updated", "active": 0}]
        "id" and "name" are required
    Create multiple customers:  [
            {"name": "Customer 1", "active": 1},
            {"name": "Customer 2", "active": 1}
        ]
DELETE https://revoxef.works/api/external/v2/customers/<customer_id>

Response is a groups paginated array with the following fields:

    'id',
    'name',
    'active',
    'tax_id',
    'photo',
    'super_group_id',
    'printer_id',
    'printer_group_id',

Others

Get images

To get the image, you need to do a get request the ideal thing for the images is to store it in your server and only request the image if the path changed.

Normal size:

https://storage.googleapis.com/revo-cloud-bucket/xef/{account}/images/{image_path}

Thumbnail size:

https://storage.googleapis.com/revo-cloud-bucket/xef/{account}/images/resized_100_{image_path}

Field  Type  Description
account string Is your account name, same name used for login into the app
image_path string is the photo variable of the model

The image_path is the photo name (with the extension). You can get the photos in the catalog.

Sync Resources

POST https://revoxef.works/api/external/chains/sync

With this endpoint, you will be able to sync some resources from the master account to each child account.

The 'tenant' must be from the master account.

The resources that will be synced, are the next ones:

More info about Master Accounts.

Xef Catalog

Inside catalog there are many resources; items, categories, groups, modifiers and sellingFormats.

To explore those resources as a paginated list we can use a GET request with the following pattern:

The API has a data size límit of 2MB for each request.

The API has a limit of 120 requests every minute so the best practice is to cache for x time the fetched information done with the getXXX actions.

Prerequisistes

To be able to use the external api you need a revo xef account and a access token

  1. Login into the desired account
  2. Go to account management
  3. Create a new token

Basic usage

The main URL for the external API:

https://revoxef.works/api/external/v2/catalog

The URL for the integrations API environment:

https://integrations.revoxef.works/api/external/v2/catalog

And you should provide the mandatory headers for the authentication

Header Value
tenant {account-username}
Authorization Bearer {the-token}
client-token {client-token}
Content-Type application/json

URL parameters

You can add the next URL parameters for the paginated responses:

Key Type Required Description
page number optional As the data is paginated, use this parameter to select the page to fetch.
pagination number optional Number of objects per page. The default value is 50 and the max allowed is 200.

At the bottom of the request, it is specified information about the current page and pagination.

Catalog structure

The main catalog structure is the following:

Groups => Categories => Items

Items cannot exist without Categories, and Categories cannot exists without Groups.

Groups

Can list, show, create, update and delete Groups

GET https://revoxef.works/api/external/v2/catalog/groups

Response is a groups paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
photo string optional
active boolean optional default: 1
tax_id number optional
printer_id number optional
printer_group_id number optional
super_group_id number optional
extra_id string optional

GET https://revoxef.works/api/external/v2/catalog/groups/<group_id>

POST https://revoxef.works/api/external/v2/catalog/groups

Create a group (POST) catalog/groups

All parameters are optional.

{
    "name": "Group 1",
    "active": 1
    ...
}

Update a group (POST) catalog/groups

{
    "id": 2, // required to update
    "name": "Group 1 updated",
    "active": 0
    ...
}

Create/update multiple groups (POST) catalog/groups

{
    "groups": [
        {
            "id": 1, // only required to update
            "name": "Group 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Group 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/groups/<group_id>

Categories

Can list, show, create, update and delete Categories

GET https://revoxef.works/api/external/v2/catalog/categories or

GET https://revoxef.works/api/external/v2/catalog/groups/<group_id>/categories

Response for GET categories is a categories paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
photo string optional
active boolean optional default: 1
group_id number required
tax_id number optional
printer_id number optional
printer_group_id number optional
modifier_category_id number optional
modifier_group_id number optional
super_group_id number optional
dish_order_id number optional
extra_id string optional

GET https://revoxef.works/api/external/v2/catalog/categories/<category_id>

POST https://revoxef.works/api/external/v2/catalog/categories

Create a category (POST) catalog/categories

{
    "name": "Category 1",
    "active": 1,
    "group_id": 1
    ...
}

Update a category (POST) catalog/categories

{
    "id": 1, // required to update
    "name": "Category 1 updated",
    "active": 0
    ...
}

Create/update multiple categories (POST) catalog/categories

{
    "categories": [
        {
            "id": 1, // only required to update
            "name": "Category 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Category 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/categories/<category_id>

Items

For the Items, there are the following types:

Can list, show, create, update and delete Items

GET https://revoxef.works/api/external/v2/catalog/items or

GET https://revoxef.works/api/external/v2/catalog/categories/<category_id>/items

Response for GET items is an items paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
price decimal required
photo string optional
active boolean optional default: 1
info string optional
type number required normal = 0, menu = 1, selling format = 4
hasInventory boolean optional default: 0
usesWeight boolean optional default: 0
category_id number required
tax_id number optional
printer_id number optional
printer_group_id number optional
modifier_group_id number optional
modifier_category_id number optional
isMenu boolean optional default: 0
shouldAppearInMenuList boolean optional default: 0
super_group_id number optional
isOpen boolean optional default: 0
nameKitchen string optional
costPrice decimal required
displayInventory boolean optional default: 0
isLinked boolean optional default: 0
allergies string optional see Allergies
dish_order_id number optional
barcode string optional
unit_id number optional
extra_id string optional
useAverageCostPrice boolean optional default: 0
cookDuration number optional
buttonName string optional
minQuantity number optional
report_category_id number optional
config string optional

Allergies

There are the following allergies:

Allergies Value
eggs 1
sesame 2
lupin 3
mustard 4
fish 5
celery 6
crustaceans 7
peanuts 8
mollusks 9
soy 10
nuts 11
sulfites 12
dairy 13

To save (POST) the allergies, you must send the values split by ';' Example: "2;3;6;10"

GET https://revoxef.works/api/external/v2/catalog/items/<item_id>

POST https://revoxef.works/api/external/v2/catalog/items

Create a item (POST) catalog/items

{
    "name": "Product 1",
    "price": 8.50,
    "active": 1,
    "category_id": 1
    ...
}

Update a item (POST) catalog/items

{
    "id": 1, // required to update
    "name": "Category 1 updated",
    "active": 0
    ...
}

Create/update multiple items (POST) catalog/items

{
    "items": [
        {
            "id": 1, // only required to update
            "name": "Item 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Item 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/items/<item_id>

Selling Formats

Can list, show, create, update and delete Selling Formats

GET https://revoxef.works/api/external/v2/catalog/sellingFormats

Response for GET selling formats is a selling formats paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
photo string optional
order number optional
active boolean optional default: 1

GET https://revoxef.works/api/external/v2/catalog/sellingFormats/<format_id>

POST https://revoxef.works/api/external/v2/catalog/sellingFormats

Create a selling format (POST) catalog/sellingFormats

{
    "name": "Selling format 1",
    "active": 1
    ...
}

Update a selling format (POST) catalog/sellingFormats

{
    "id": 1, // required to update
    "name": "Selling format 1 updated",
    "active": 0
    ...
}

Create/update multiple selling formats (POST) catalog/sellingFormats

{
    "sellingFormats": [
        {
            "id": 1, // only required to update
            "name": "Selling format 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Selling format 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/sellingFormats/<format_id>

Selling Format Pivots

An Item can be of Selling format type.

This can be distinguished by item.type = 4.

The Selling format item can manage different Selling formats, with different prices and quantities, for its TPV selling.

Can list, show, create, update and delete Selling Format Pivots

GET https://revoxef.works/api/external/v2/catalog/sellingFormatPivots

Response for GET selling format pivots is a selling format pivots paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
quantity decimal required
price decimal required
order number optional
format_id number required selling format
item_id number required item.type = 4
combination_group_id number optional
unit_id number optional

GET https://revoxef.works/api/external/v2/catalog/sellingFormatPivots/<format_pivot_id>

POST https://revoxef.works/api/external/v2/catalog/sellingFormatPivots

Create a selling format pivot (POST) catalog/sellingFormatPivots

{
    "price": 5.00,
    "quantity": 1,
    "format_id": 1,
    "item_id": 1,
    ...
}

Update a selling format pivot (POST) catalog/sellingFormatPivots

{
    "id": 1, // required to update
    "quantity": 2
    ...
}

Create/update multiple selling format pivots (POST) catalog/sellingFormatPivots

{
    "sellingFormatPivots": [
        {
            "id": 1, // only required to update
            "quantity": 1,
            "format_id": 1,
            "item_id": 1,
            ...
        },
        {
            "id": 2, // only required to update
            "quantity": 2,
            "format_id": 2,
            "item_id": 2,
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/sellingFormatPivots/<format_pivot_id>

Modifiers

The Modifiers structure is the following:

Modifier groups (<= Modifier pivot =>) Modifier categories => Modifiers.

Modifiers must exist in a Modifier category, and Modifier categories can exist independently or in a Modifier group.

Both Modifier groups and Modifier categories can be linked to catalog Categories and Items.

Can list, show, create, update and delete Modifiers

GET https://revoxef.works/api/external/v2/catalog/modifiers

Response for GET modifiers is a modifiers paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
price decimal required
photo string optional
order number optional
category_id number required modifier category
cookDuration number optional
active boolean optional default: 1
extra_id string optional

GET https://revoxef.works/api/external/v2/catalog/modifiers/<modifier_id>

POST https://revoxef.works/api/external/v2/catalog/modifiers

Create a modifier (POST) catalog/modifiers

{
    "name": "Modifier 1",
    "price": 1.00,
    "category_id": 1,
    "active": 1
    ...
}

Update a modifier (POST) catalog/modifiers

{
    "id": 1, // required to update
    "price": 2.00
    ...
}

Create/update multiple modifiers (POST) catalog/modifiers

{
    "modifiers": [
        {
            "id": 1, // only required to update
            "name": "Modifier 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Modifier 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/modifiers/<modifier_id>

Modifier Categories

Can list, show, create, update and delete Modifier Categories

GET https://revoxef.works/api/external/v2/catalog/modifierCategories

Response for GET modifier categories is a modifier categories paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
order number optional
isChoice boolean optional 0 for select one, 1 (default) for multiple choice
isOptional boolean optional default: 1
active boolean optional default: 1

GET https://revoxef.works/api/external/v2/catalog/modifierCategories/<modifier_category_id>

POST https://revoxef.works/api/external/v2/catalog/modifierCategories

Create a modifier category (POST) catalog/modifierCategories

{
    "name": "Modifier category 1"
    ...
}

Update a modifier category (POST) catalog/modifierCategories

{
    "id": 1, // required to update
    "isChoice": 0
    ...
}

Create/update multiple modifier categories (POST) catalog/modifierCategories

{
    "modifierCategories": [
        {
            "id": 1, // only required to update
            "name": "Modifier category 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Modifier category 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/modifierCategories/<modifier_category_id>

Modifier Groups

Can list, show, create, update and delete Modifier Groups

GET https://revoxef.works/api/external/v2/catalog/modifierGroups

Response for GET modifier groups is a modifier groups paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
order number optional
dont_show_automatically boolean optional default: 0

GET https://revoxef.works/api/external/v2/catalog/modifierGroups/<modifier_group_id>

POST https://revoxef.works/api/external/v2/catalog/modifierGroups

Create a modifier group (POST) catalog/modifierGroups

{
    "name": "Modifier group 1"
    ...
}

Update a modifier group (POST) catalog/modifierGroups

{
    "id": 1, // required to update
    "name": "Modifier group updated 1"
    ...
}

Create/update multiple modifier groups (POST) catalog/modifierGroups

{
    "modifierGroups": [
        {
            "id": 1, // only required to update
            "name": "Modifier group 1",
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Modifier group 2",
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/modifierGroups/<modifier_group_id>

Modifier Pivot

The next pivot endpoints define the (optional) relationship between Modifier Categories and Modifier Groups.

Can list, show, create, update and delete Modifier Pivots

GET https://revoxef.works/api/external/v2/catalog/modifierPivots

Response for GET modifier pivots is a modifier pivots paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
order number optional
group_id number required modifier group
category_id number required modifier category

GET https://revoxef.works/api/external/v2/catalog/modifierPivots/<modifier_pivot_id>

POST https://revoxef.works/api/external/v2/catalog/modifierPivots

Create a modifier pivot (POST) catalog/modifierPivots

{
    "group_id": 1,
    "category_id": 1
    ...
}

Update a modifier pivot (POST) catalog/modifierPivots

{
    "id": 1, // required to update
    "group_id": 2
    ...
}

Create/update multiple modifier pivots (POST) catalog/modifierPivots

{
    "modifierPivots": [
        {
            "id": 1, // only required to update
            "category_id": 1,
            ...
        },
        {
            "id": 2, // only required to update
            "category_id": 1,
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/modifierPivots/<modifier_pivot_id>

An Item can be of Menu type.

This can be distinguished by item.type = 1.

Each Menu Item can contain different Menu Categories and each Menu Category can have multiple Normal Items (item.type = 0):

Menu Item => Menu Categories => Normal Items

Can list, show, create, update and delete Menu Categories

GET https://revoxef.works/api/external/v2/catalog/menuMenuCategories

Response for GET menu categories is a menu categories paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
name string required
order number optional
isMultipleChoice number optional Select One: 0, Multiple choice: 1 (default), Select one mandatory: 2, Select by default (min-max): 3, Custom (min-max): 4
max number optional default: 1
min number optional default: 0
item_id number required item.type = 1
dish_order_id number optional

GET https://revoxef.works/api/external/v2/catalog/menuMenuCategories/<menu_category_id>

POST https://revoxef.works/api/external/v2/catalog/menuMenuCategories

Create a menu category (POST) catalog/menuMenuCategories

{
    "name": "First dishes",
    "item_id": 1
    "isMultipleChoice": 2,
    ...
}

Update a menu category (POST) catalog/menuMenuCategories

{
    "id": 1, // required to update
    "isMultipleChoice": 2
    ...
}

Create/update multiple menu menu categories (POST) catalog/menuMenuCategories

{
    "menuMenuCategories": [
        {
            "id": 1, // only required to update
            "name": "Menu category 1",
            "item_id": 1,
            ...
        },
        {
            "id": 2, // only required to update
            "name": "Menu category 2",
            "item_id": 2,
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/menuMenuCategories/<menu_category_id>

This endpoint links the Normal Items, from the menu, with their Menu Category.

Can list, show, create, update and delete Menu Item-Category Pivot

GET https://revoxef.works/api/external/v2/catalog/menuMenuItemCategoryPivots

Response for GET menu item-category pivots is a menu item-category pivots paginated array with the following fields:

Field Type Required Extra info
id number - autoincrement
active boolean optional default: 1
order number optional
price decimal required
addModifiersPrice boolean optional default: 1
item_id number required item.type = 0
category_id number required menu category
separatorName string optional
modifier_group_id number optional
format_pivot_id number optional

GET https://revoxef.works/api/external/v2/catalog/menuMenuItemCategoryPivots/<menu_item_category_pivot_id>

POST https://revoxef.works/api/external/v2/catalog/menuMenuItemCategoryPivots

Create a menu item-category pivot (POST) catalog/menuMenuItemCategoryPivots

{
    "item_id": 1,
    "category_id": 1
    ...
}

Update a menu item-category pivot (POST) catalog/menuMenuItemCategoryPivots

{
    "id": 1, // required to update
    "price": 1.00
    ...
}

Create/update multiple menu item-category pivots (POST) catalog/menuMenuItemCategoryPivots

{
    "menuMenuItemCategoryPivots": [
        {
            "id": 1, // only required to update
            "item_id": 1,
            "category_id": 1
            ...
        },
        {
            "id": 2, // only required to update
            "item_id": 2,
            "category_id": 1
            ...
        }
        ...
    ]
}

DELETE https://revoxef.works/api/external/v2/catalog/menuMenuItemCategoryPivots/<menu_item_category_pivot_id>

Warehouses

GET Warehouses https://revoxef.works/api/external/v2/warehouses

Response is a warehouses paginated array with the following fields:

    'id',
    'name',
    'order',

GET Warehouses stocks https://revoxef.works/api/external/v2/warehouses/<warehouse_id>

Response for a warehouse is a stocks paginated array with the following fields:

    'id',
    'quantity',
    'defaultQuantity',
    'alert',
    'warehouse_id',
    'item_id',
    'unit_id'

POST https://revoxef.works/api/external/v2/warehouses/<warehouse_id>/addStock

Add a stock to a warehouse (POST) warehouses/<warehouse_id>/addStock

{"item_id": <item_id>, "quantity": <quantity_to_add>}

POST https://revoxef.works/api/external/v2/warehouses/<warehouse_id>/setStock

Set a item stock to a warehouse (POST) warehouses/<warehouse_id>/setStock

{"item_id": <item_id>, "quantity": <quantity_to_set>}

Set multiple stocks to a warehouse (POST) warehouses/<warehouse_id>/setStock

{"stocks": [
    {"item_id": <item_id>, "quantity": <quantity_to_set>},
    {"item_id": <item_id>, "quantity": <quantity_to_set>},
]}

Purchases

GET Purchase orders https://revoxef.works/api/external/v2/purchaseOrders

Response is a purchase orders paginated array with the following fields:

    'id',
    'vendor_order_id',
    'reference',
    'subtotal',
    'tax',
    'total',
    'status',
    'vendor_id',
    'vendorName',
    'contentsArray'

GET Purchase order contents https://revoxef.works/api/external/v2/purchaseOrders/{purchase_order_id}

Response is a purchase order contents paginated array with the following fields:

    'id',
    'status',
    'quantity',
    'received',
    'price',
    'subtotal',
    'tax',
    'total',
    'order_id',
    'item_vendor_id',
    'itemName',
    'itemBarcode',
    'item_id'

Vendors

GET https://revoxef.works/api/external/v2/vendors

GET ...vendors

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "RevoVendor",
            "address": "Address",
            "city": "City",
            "state": "State",
            "country": "Country",
            "postalCode": "00000",
            "nif": "000000000B",
            "web": null,
            "email": null,
            "phone": "111222333",
            "notes": null,
            "shouldBeNotified": 0
        },
        ...

GET https://revoxef.works/api/external/v2/vendors/{vendor_id}

GET ...vendors/{vendor_id}

{
    "id": 1,
    "name": "RevoVendor",
    "address": "Address",
    "city": "City",
    "state": "State",
    "country": "Country",
    "postalCode": "00000",
    "nif": "000000000B",
    "web": null,
    "email": null,
    "phone": "111222333",
    "notes": null,
    "shouldBeNotified": 0
}

POST https://revoxef.works/api/external/v2/vendors

POST ...vendors

{
    "name": "RevoVendor", // required
    "address": "Address", // required
    "city": "City",
    "state": "State",
    "country": "Country",
    "postalCode": "00000",
    "nif": "000000000B", // required | unique
    "web": null,
    "email": null,
    "phone": "111222333",
    "notes": null,
    "shouldBeNotified": 0
}

PUT https://revoxef.works/api/external/v2/vendors/{vendor_id}

PUT ...vendors/{vendor_id}

{
    "name": "RevoVendor",
    "address": "Address",
    "city": "City",
    "state": "State",
    "country": "Country",
    "postalCode": "00000",
    "nif": "000000000B", // unique
    "web": null,
    "email": null,
    "phone": "111222333",
    "notes": null,
    "shouldBeNotified": 0
}

DELETE https://revoxef.works/api/external/v2/vendors/{vendor_id}

Vendor Items

GET https://revoxef.works/api/external/v2/vendors/{vendor_id}/items

GET ...items

{
    "current_page": 1,
    "data": [
        {
            "item_id": 1,
            "reference": "",
            "costPrice": "1.00",
            "unit_id": 1,
            "pack": 1,
            "tax_id": null
        },
        ...

POST https://revoxef.works/api/external/v2/vendors/{vendor_id}/items

POST ...items

With this endpoint you can create or update, if the vendor.item_id already exists.

{
    "items": [
        {
            "item_id": 1, // required
            "costPrice": "1.00",  // required
            "pack": 2,  // required
            "tax_id": 2,
            "unit_id": 1
        },
        {
            "item_id": 2, // required
            "costPrice": "2.00",  // required
            "pack": 2,  // required
            "reference": "Reference"
        }
    ]
}

DELETE https://revoxef.works/api/external/v2/vendors/{vendor_id}/items

DELETE ...items

All items_id must exist to delete their relation to vendor.

{ 
    "items": [ item1_id, item3_id, item10_id ]
}

Xef Booking (Flow API)

Prerequisistes

To be able to use the Flow api you need a revo xef account and a access token

  1. Login into the desired account
  2. Go to account management
  3. Create a new token

Basic usage

The main URL for the external api is

https://revoxef.works/apiFlow

Creating an order with customer

POST

shell script POST message={ "auth":{ "tenant":"account", "token":"account_token" }, "action":"newOrder", "data":{ "customer":{ "name":"customer name", "email":"email2@example.com", "notes":"{\"note1\":\"text1\",\"note2\":\"text2\"...} }, "table_id":[ 1, 2, 3 ], "guests":"8", "contents":[ ], "payments":[ ] } }

Response with the created order identifier

shell script { "result" : true, "errorMessage" : null, "data" : { "id" : 1 } }

Xef Loyalty

Basic usage

The main URL for the external API:

https://revoxef.works/api/loyalty

The API has a data size límit of 2MB for each request.

The API has a limit of 120 requests every minute so the best practice is to cache for x time the fetched information done with the getXXX actions.

The URL for the integrations API environment:

https://integrations.revoxef.works/api/loyalty

And you should provide the mandatory headers for the authentication

Header Value
tenant {account-username}
Authorization Bearer {the-token}
client-token {client-token}
Content-Type application/json

Create an order

POST https://revoxef.works/api/loyalty/orders

The payload to create the order, must be sent as a JSON.

The parameters for the payload, are the following:

Field Type Required Extra info
order JSON required see Order payload
customer JSON optional see Customer payload
delivery JSON optional see Delivery payload
skipMerge boolean optional default: false. If you don't want the order to be merged if there is another one already opened.
warehouse_id number optional Send the Revo XEF warehouse_id if you want the stock to be discounted.
emailToSendInvoice string optional Email where the invoice will be sent.

General payload example:

{
    "order": {
        ...
    },
    "customer": {
        ...
    },
    "delivery": {
        ...
    }
}

Response:

{
    "order_id": 1
}

Order payload

Most of the parameters are recalculated when the order is processed in the POS.

Field Type Required Extra info
total decimal required must be the sum of the order contents with their extra modifiers. Discounts must be applied too.
table_id number optional If not sent, order is set as a delivery.
tableName string optional default: 'InTouch'. If table_id sent, gets real tableName, otherwise gets payload data.
guests number optional default: 1
notes string optional
extraId string optional Used to register an external order_id/reference.
orderDiscount JSON optional see Order discount payload
contents array required Must be an array of JSON. see Contents payload
payment JSON optional see Payment payload

Order payload example:

{
    "order": {
        "total": 10.50,
        "table_id": 1,
        "tableName": "TableName",
        "guests": 1,
        "notes": "Notes",
        "extraId": "Ext-1",
        "orderDiscount": {
            ...
        },
        "contents": [
            {
                ...
            },
            ...
        ],
        "payment": {
            ...
        },
    }
    ...
}

Order discount payload

Field Type Required Extra info
name string optional default: 'Discount'
amount decimal required Must have negative sign.

Order discount payload example:

{
    "order": {
        "total": 8.00, // discount subtracted
        ...
        "orderDiscount": {
            "name": "Discount",
            "amount": -2.50
        },
        ...
    }
    ...
}

Contents payload

Field Type Required Extra info
item_id number required Existing item ID. It can be a normal item, a selling format item or a menu item.
itemPrice decimal required Individual item price.
quantity number optional default: 1
modifiers array optional Only for normal and selling format items. Must be an array of JSON. see Modifiers payload
menuContents array optional Only for menu items. Must be an array of JSON. see MenuContents payload

Content payload example:

{
    "order": {
        "total": 13.00
        ...
        "contents": {
            "item_id": 1,
            "itemPrice": 6.50,
            "quantity": 2,
            "modifiers" or "menuContents": [
                {
                    ...
                },
                ...
            ],
        }
        ...
    }
    ...
}

Modifiers payload

Only for normal and selling format items.

For normal items (item.type = 0):

There is no quantity and each modifier must be sent idividually.

Field Type Required Extra info
id number optional Existing modifier ID.
name string required If modifier ID is found, it is set the modifier name.
price decimal required -

Modifier (normal item) payload example:

{
    "order": {
        "total": 17.80
        ...
        "contents": {
            "itemPrice": 6.50,
            "quantity": 2,
            ...
            "modifiers": [
                {
                    "id": 1, // modifier ID exists ("name": "Nuts")
                    "price": 1.20
                },
                {
                    "name": "Nuts",
                    "price": 1.20
                },
                ...
            ]
        }
        ...
    }
    ...
}

For selling format items (item.type = 4):

Normal modifiers cannot be set.

Field Type Required Extra info
id number required Existing format pivot ID.
price decimal optional default: 0

Modifier (selling format item) payload example:

{
    "order": {
        ...
        "contents": {
            ...
            "modifiers": [ // only 1 modifier to set the selling format
                {
                    "id": 1,
                }
            ]
        }
        ...
    }
    ...
}

Only for menu items (item.type = 1):

Field Type Required Extra info
item_id number required Existing item ID. It can be a normal menu item or a selling format menu item.
name string required Menu ittem name.
price decimal required Item menu price.
quantity number optional Only can be set 1 quantity.
dishOrder number optional Must be an existing Menu Item-Category Pivot.
modifiers array optional Only for normal and selling format items. Must be an array of JSON. see Modifiers payload

MenuContents (menu item) payload example:

{
    "order": {
        "total": 25.70
        ...
        "contents": {
            "item_id": 12, // menu item
            "itemPrice": 10.00,
            ...
            "menuContents": [
                {
                    "item_id": 1, // normal item
                    "price": 6.50,
                    "quantity": 1,
                    "modifiers": [
                        {
                            "name": "Nuts",
                            "price": 1.20
                        },
                        ...
                    ]
                },
                {
                    "item_id": 2, // selling format item
                    "itemPrice": 7,
                    "quantity": 1,
                    "modifiers": [
                        {
                            "id",
                            "price": 1.00
                        }
                    ]
                }
                ...
            ]
        }
        ...
    }
    ...
}

Payment payload

Field Type Required Extra info
amount decimal required The amount to pay. Must not exceed the order total amount - order already paid amount.
payment_method_id number optional Existing payment method ID. default: channel payment method is used or created.
payment_reference string optional The reference of the payment.
tip decimal optional
contents array optional Only for Standalone payment section. Pay per items. Array of content IDs. The amount must match contents+modifiers sum amount.

Regarding the payment methods, there are 2 fix payment methods for all accounts:

Payment payload example:

{
    "order": {
        "total": 12.20,
        ...
        "payment": {
            "amount": 12.20
            "payment_method_id": 1,
            "payment_reference": "QR code payment.",
            ...
        }
    }
    ...
}

Customer payload

If a customer is found with the email or phone from this section, respectively, we will get the existing customer, and the other fields will not be updated.

If the customer is not found, we will create one with all the fields sent.

The customer info and the delivery info are not the same. Customer object is the customer itself, the customer data linked to the invoice. The delivery object is a complement data only linked to the delivery order. It is up to you if you want to match customer and delivery fields, in case of non existing customer.

We recommend to manage customers using the specific endpoints. Check the customer section

Field Type Required Extra info
name string required
email string required
phone string optional
nif string optional
web string optional
address string optional
postalCode string optional
city string optional
state string optional
extra_id string optional
notes string optional

Customer payload example:

{
    "order": {
        ...
    },
    "customer": {
        "name": "Customer Name",
        "email": "customer@revo.test"
    }
    ...
}

Delivery payload

The delivery info and the customer info are not the same.

The delivery data is the info for the delivery/pickup order. This info will not be saved in the customer data.

Field Type Required Extra info
phone number required The phone for the delivery/pickup order.
date string optional Date when the order has to be prepared. "YYYY-MM-DD HH:MM:SS" - default: current time.
address string optional Set address for delivery orders. NO address for pickup orders.
city string optional
channel number optional default: REVO channel (InTouch)

Delivery payload example:

{
    "order": {
        ...
    },
    "delivery": {
        "phone": 123456789,
        "date": "2009-05-02 21:45:00",
        ...
    }
    ...
}

Standalone payment

If you only want to make a payment for an existing order, you must use the following endpoint:

POST orders/{orderId}/payments

The payload structure is the same as the payment done in the order creation, but sent as a form-data body request. See again the details.

Standalone payload example:

# Must be sent as a form-data body request.
"payment": {
    "amount": 12.20
    "payment_method_id": 1,
    "payment_reference": "QR code payment.",
    "contents": [1,2,3]
    ...
}

Fetch an Order

GET orders/{orderId}

You can fetch an order information using this endpoint

Fetch an Order with Table Id

If you want to fetch an order for an specific table you can use this endpoint.

GET tables/{tableId}/order

It will return a 404 if there is no open order at that table at the moment

Fetch multiple Order with list of tables id

If you want to fetch an order for an specific table you can use this endpoint. It will return the open orders paginated by 50.

GET orders?table_id[]=5&table_id[]=6&table_id[]=7

You can send the array using the body as well instead of the query

It will return a 404 if there is no open order at that table at the moment

Cancel Order

curl -XDELETE -H 'tenant: {tenant}' -H 'Authorization: Bearer {token}' \
-d 'reason="Payment Failed"' \
'https://revoxef.works/api/loyalty/orders/123456'

This endpoint makes a refund (a new order with negatives values).

There is a limit time to cancel the order. If the account has configured the Previous delivery minutes, the limit to cancel the order will be the Delivery date subtract the Delivery minutes. Otherwise, you will have 5 minutes after an order has been place.

DELETE orders/{orderId}

Field Required  Description
reason yes The reason why the order is canceled

Fetch Invoice details

You can use this endpoint to fetch an specific invoice details

GET invoices/{invoiceId}

Fetch tables

Get all the tables with is name and id

GET tables

Tables availability

{
    "available" : true
}

Use this method to know if a table is available or not (there is no open order on it)

GET tables/{tableId}/available

Xef Loyalty WebView

Introduction

Since Revo Xef 4.1 we include a new integration that lets you manipulate the current order through a webview and a powerful Javascript Api.

You can enable it by adding the integration called RevoLoyalty WebView and providing your URL. When this integration is enabled in the edit order screen, there will appear a new action that will open your site and inject the RevoLoyaltyJs framework for you to be able to interact with the current order.

This api includes a few methods described below

To be able to interact with iOS all the function will have a callback parameter that will be called when the action is finished in the POS

GET ORDER

Gets all the information of the current order

    RevoLoyalty.getOrder(function(json) {
        var order = JSON.parse(json)
        const total = order["total"]
    })

GET ACCOUNT

Gets the account id and the account name

    RevoLoyalty.getAccount(function(json) {
        var items = JSON.parse(json)
        document.getElementById("text").innerHTML = json
        document.getElementById("orderTotal").innerHTML = "Account id: "+ account["id"]
    })

GET ITEMS

Gets all the information of the items requested by its ids, array of ints. If there is no item with a requested id, it won't be in the response

    RevoLoyalty.getItems([itemId1, itemId2, itemId3], function(json) {
        var items = JSON.parse(json)
        document.getElementById("text").innerHTML = json
        document.getElementById("orderTotal").innerHTML = "Account id: "+ account["id"]
    })

ADD EXISTING DISCOUNT

Adds a discount that exists in the database to the whole order

    RevoLoyalty.addExistingDiscount({id}, function(error) {

    })
Parameter Type Description
id int The id of the discount on the database

Result: Error if the discount does not exist

ADD PERCENTAGE DISCOUNT

Adds a new discount with percentage to the whole order

RevoLoyalty.addPercentageDiscount({name}, {percentage}, function() {

})
Parameter Type Description
name string The name of the discount to show on the ticket
percentage number The percentage for the discount

ADD AMOUNT DISCOUNT

Adds a new discount with amount to the whole order

RevoLoyalty.addAmountDiscount({name}, {amount}, function() {

})
Parameter Type Description
name string The name of the discount to show on the ticket
amount number The amount for the discount

ADD EXISTING CONTENT DISCOUNT

Adds a discount that exists in the database to the whole order

    RevoLoyalty.addContentExistingDiscount({line}, {id}, function(error) {

    })
Parameter Type Description
line int The index of the array of the content received in the getOrder to apply the discount
id int The id of the discount on the database

Result: Error if the discount does not exist

ADD CONTENT PERCENTAGE DISCOUNT

Adds a new discount with percentage to the whole order

RevoLoyalty.addContentPercentageDiscount({line}, {name}, {percentage}, {withoutExtras}, function() {

})
Parameter Type Description
line int The index of the array of the content received in the getOrder to apply the discount
name string The name of the discount to show on the ticket
percentage number The percentage for the discount
withoutExtras bool If the discount should be applied to the extras or not (ex: modifiers)

ADD CONTENT AMOUNT DISCOUNT

Adds a new discount with amount to the whole order

RevoLoyalty.addContentAmountDiscount({line}, {name}, {amount}, {withoutExtras}, function() {

})
Parameter Type Description
line int The index of the array of the content received in the getOrder to apply the discount
name string The name of the discount to show on the ticket
amount number The amount for the discount
withoutExtras bool If the discount should be applied to the extras or not (ex: modifiers)

ADD PRODUCT

Adds a new content to the order, the product must me of type standard as no popups can be shown

RevoLoyalty.addProduct({id}, {price}, function(error) {

})
Parameter Type Description
id int The id of the product
price number optional The price of the product, send null to use the database price

Error when the product does not exists or is not standard

ADD Payment

Adds a payment to the order, it will create an invoice there isn't one yet

RevoLoyalty.addPayment({id}, {amount}, function(error) {

})
Parameter Type Description
id int The id of the payment method
amount number The amount paid

error when the payment method does not exist

CLOSE

Closes the webview

    RevoLoyalty.close()

Xef Reports

Authentication

curl --header "tenant: {myaccount}" \
     --header "authorization: Bearer {token}" \
     --header 'client-token: {client-token}' \
https://revoxef.works/api/external/v3

Base endpoint

https://revoxef.works/api/external/v3

You should send the headers tenant with your account username and authorization with the token created at account > tokens

The API has a data size límit of 2MB for each request.

The API has a limit of 120 requests every minute so the best practice is to cache for x time the fetched information done with the getXXX actions.

Get your token at https://revoxef.works/account/tokens

Request

curl --header "tenant: {myaccount}" --header "authorization: Bearer {token}" \ --header 'client-token: {client-token}' \
https://revoxef.works/api/external/v3/reports/{reportName}?start_date=2018-01-01&end_date=2018-01-29

GET reports/{reportName}

Field Type Required Description
start_date YYYY-mm-dd optional The initial date for the report. Default: start of month.
end_date YYYY-mm-dd optional The final date for the report. Default: today.
page number optional As the data is paginated, use this parameter to select the page to fetch.
pagination number optional Number of objects per page. The default value is 50 and the max allowed is 200.

Response

{
    "current_page": 1,
    "data": {"HERE WILL GO THE SPECIFIC REPORT DATA"},
    "from": 1,
    "last_page": 4,
    "next_page_url": "https://revoxef.works/api/external/v3/reports/{reportName}?page=2",
    "path": "https://revoxef.works/api/external/v3/reports/{reportName}",
    "per_page": 50,
    "prev_page_url": null,
    "to": 50,
    "total": 190
}

All responses will have this header

Available reports

Here is a list of all available reports

Filters

All filters and flags must be used as a query parameters.

Filter/Flag  Type Belongs to report/resource Description
start_date YYYY-mm-dd All (required) The initial date for the report
end_date YYYY-mm-dd All (required) The final date for the report
start_time HH:mm All The start time for the report
end_time HH:mm All The end time for the report
dayofweek int All Where Sunday is 1 and Saturday is 7
room int Orders Room id
priceRate int Contents Price rate id
forTurn int Orders Filter orders for turn_id (forTurn=turn_id). This filter already includes withInvoices and withPayments filters. Date filters (start_date and end_date) do nothing with forTurn filter
table int Orders / Contents Filter orders/contents for table_id (table=table_id).
fullPrecision bool All Displays all possible numeric fields with their complete decimal precision when ?fullPrecision=true is applied
withInvoices - Orders Append invoices resource
withContents - Orders Append contents resource
withDelivery - Orders Append delivery resource
withPayments - Invoices Append payments resource
withFiscal - Invoices Append fiscal data resource
withItem - Contents Append item resource
withSubContents - Contents Append subContents (menu contents) resource
withModifiers - Contents Append modifier resource
withPriceRate - Contents Append price rate resource ("type": 0(percentage)/1(price))
withAppliedTaxes - Contents / Invoices Append taxes information applied to the resource (JSON example in the lateral shell screen)

Example:

Using order reports endpoint, if you want PriceRates resource, as it belongs to Contents, you will also need withContents filter.

?withAppliedTaxes
{
    ...
    "RESOURCE": [ // "invoices", "contents", "sub_contents"
        {
            ...
            "applied_taxes": [
                {
                    "id": 1, // register ID
                    "tax_id": 3, // tax ID
                    "tax_name": "IVA 21%",
                    "tax_percentage": 21.00,
                    "base_amount": 0.8264, // up to 4 decimal precision
                    "tax_amount": 0.1736 // up to 4 decimal precision
                }
            ],
            ...
        }
    ]
}

Fields with fullPrecision

This section lists all fields that can have their decimal precision increased by using the "?fullPrecision=true" flag.

Field  Resource Precision without flag Precision with flag
subtotal Contents 2 4
tax Contents 2 4
discount_amount Contents 2 4

Master

In case you have a master account you can create a token for the master account and use it to access all the chain reports as well as get a list of all the accounts within the master account

Get Accounts V3

GET https://revoxef.works/api/external/v3/accounts

Using the optional query parameter ?withBusiness=true in the endpoint, we can retrieve information about the business account.

V3 accounts endpoint
{
    "data": [
        {
            "id": 1,
            "tenant": "accountname",
            "business": { // only with withBusiness flag
                "name": "Name",
                "legal_name": "Legal Name",
                "slogan": "Sloga",
                "phone": "123456789",
                "address": "Address",
                "city": "City",
                "state": "State",
                "country": "Country",
                "postal_code": "01234",
                "nif": "B123456789",
                "logo": "abcdefg123.png",
                "web": "https://www.revo.works",
                "tax_included": true, // bool
                "opening_time": "05:00:00",
                "cash_control_type": "SIMPLE", // "NONE", "SIMPLE", "FULL" or "AUTO"
                "blind_cashier": false, // bool
                "presence_control": true, // bool
                "currency": "EUR",
                "second_currency": "USD",
                "exchange_rate": 0,  // 4 decimal precision
                "currency2_cash_payment_method_id": 8,
                "currency2_card_payment_method_id": 9,
                "comma_decimal": true, // bool
                "languages": [ // "ca", "en", "es", "eu", "fr", "pt", "it", "zh", "de"
                    "ca"
                ]
            }
        },
        ...
    ]
}

Get Accounts V2 (old)

GET https://revoxef.works/api/external/v2/accounts

V2 endpoint (old)
{
    "IDTenant": "Tenant/AccountName"
}

Chain reports

GET https://revoxef.works/api/external/v2/accounts/reports/{reportName}

And you have to add a new header that defines the chain to connect to

Header  Value  Description
tenant account Master account name,
authorization Bearer {token} The token created at backoffice
chain chain chain username returned in the accounts GET method

Chain fetch order

GET https://revoxef.works/api/external/v2/accounts/orders/{id}

You can fetch one (or multiple orders) for an specific chain using the same header as in the previous example.

The id field can be a single order id or multiple orders separated by , such as id1,id2,id3

Xef Webhooks

Introduction

Revo Xef offers webhooks, allowing you to add as many as needed on the webhooks page:

When you create your first webhook, a secret key will be generated. This key is used to create a hash that we include in every webhook call, allowing you to verify that the request comes from us.

When creating a new webhook you will have the following options

Option          Description
Active Indicates whether the event should be sent.
Url The URL to which the event should be sent.
Event The event that will trigger the webhook.
Retry count Explained here.
Send test webhook This button always triggers the order.updated event as an example to verify that the configured URL can recieve the webhooks correctly.

Webhook Request

We include the following headers in the request:

The payload will always include the following keys:

{
    "tenant": "tenant",
    "event" : "event.name",
    "data" : {
        ...
    }
}
Key Description
tenant The name of the account that triggered the event
event The webhook event name
data The specific data from the event

Available Webhooks

There is a {model}.* event, which signifies that you want to receive all available events associated with the model.

Product Webhooks

Event Payload example Extra info
product.created Product created Only triggered for normal product type (0)
product.updated Product updated Only triggered for normal product type (0)
product.deleted Product deleted Only triggered for normal product type (0)

Customer webhooks

Event Payload example   Extra info
customer.created Customer created See allergies
customer.updated Customer updated See allergies
customer.deleted Customer deleted See allergies

Purchase Order Webhooks

Event Payload example      Extra info
purchaseOrder.created Purchase order created
purchaseOrder.updated Purchase order updated

Stocks Webhooks

Event Payload example Extra info
stocks.created Stocks created
stocks.updated Stocks updated

Order Webhooks

Event Payload example Extra info
order.created Order created
order.updated Order updated
order.closed Order closed
order.moved Order moved
order.merged Order merged
order.cancelled Order cancelled

Gift Card Webhooks

Event Payload example Extra info
giftCard.created Gift card created

KDS Webhooks

Event Payload example    Extra info
kds.contentsReady KDS contents ready

Order Payment Webhooks

Event Payload example      Extra info
orderPayment.updated Order payment updated

Turn Webhooks

Event Payload example Extra info
turn.opened Turn opened
turn.closed Turn closed

Webhooks Retries

Each time a webhook is triggered, several retry attempts are made until one of them receives a successful HTTP client response from the URL.

These retries are made consecutively every:

If none of these attempts are successful, we increment the "Retry count".

Once the "Retry count" reaches 5, we deactivate the event for security reasons.

Xef (Deprecated)

Although this api is still working, it has been deprecated in favor of the new REST one See Xef Catalog section one instead

Basic Request

    {
        "auth":{
            "tenant"  :"account",
            "password":"password"
        },
        "action":"action",
        "data":data
    }

To work with Revo external api a POST or GET request is required to the following url:

https://revoxef.works/apiExternal

With a variable named message that has to be a json with the following information

Field  Type  Description
account string is the account (same name used to login)
password string is the app password (not the backend password)
action string the action to perform (explained below)
data json data required for the action (explained below)

The API has a limit of 120 requests every minute so the best practice is to cache for x time the fetched information done with the getXXX actions.

Get (Deprecated)

Returns the full data for an specific model and id.

"data":{
        "model":"model",
        "id":"id"
        }
Field  Description
model is the model to fetch within MenuGroup MenuCategory MenuItem ModifierGroup ModifierCategory Modifier
id is the id of the model to fetch
https://revoxef.works/apiExternal?message=
    {
        "auth"      : {"tenant":"account","password":"password"},
        "action"    : "get",
        "data"      : {"model":"MenuItem","id":"236"}
    }

getMenuGroups (Deprecated)

https://revoxef.works/apiExternal?message=
    {
        "auth":{"tenant":"account","password":"password"},
        "action":"getMenuGroups",
        "data":{}
    }

Since maybe we want to create an online shop that starts with menu groups, we can get them all using the action getMenuGroups with empty data. This will return a list of all the groups (with their ID). With this Id we can fetch the categories.

getChildren (Deprecated)

"data":{
    "model":"parentModel",
    "id":id
    }

This action returns all the children for an specific model

Field  Type  Description
parentModel string is the model we want its children. MenuGroup MenuCategories ModifierCategory
id int the id of the model we want its children.
https://revoxef.works/apiExternal?message=
    {
        "auth":{"tenant":"account","password":"password"},
        "action":"getChilds",
        "data":{"model":"MenuGroup","id":2}
    }

It will return all the childs of the menuGroup with ID 2.

getInventory (Deprecated)

 https://revoxef.works/apiExternal?message=
     {
         "auth":{"tenant":"account","password":"password"},
         "action":"getInventory",
         "data":{"warehouse_id":1,"items":[2,4,10]}
     }

Gets the current inventory for an Item in a Warehouse.

Field  Type  Description
warehouse_id int Is the ID of the warehouse to get the quantity from
items array int Array of the ids of the items to get the quantity

decreaseInventory (Deprecated)

Decreases the inventory for an Item in a Warehouse.

 https://revoxef.works/apiExternal?message=
     {
         "auth":{"tenant":"account","password":"password"},
         "action":"decreaseInventory",
         "data":{"warehouse_id":1,"item_id":2, "quantity":1}
     }
Field  Type  Description
warehouse_id int Is the ID of the warehouse to decrease the quantity from
item_id int Is the ID of the item to decrease
quantity int Is the quantity to decrease

Revo Display Images (Deprecated)

Returns an array of paths for each Revo Display ads image.

To get the image

https://a89f683ae563759322a9-3330e0d085d4ba4fd7f5395ee3f3cd7a.ssl.cf3.rackcdn.com/{account}/banners/{image_path}

Field  Type  Description
account string the account name
image_path string the image path returned in the array

Orders (Deprecated)

GET Orders

GET https://revoxef.works/api/external/v2/orders?from=2017-01-02&to=2017-01-04

Response is paginated for every 50

    "id": 4,
    "opened": "2017-12-15 08:40:52",
    "closed": "2017-01-03 00:00:00",
    "merged": null,
    "canceled": null,
    "guests": "4",
    "status": "0",
    "orderDiscountAmount": "0",
    "sum": "0",
    "discountAmount": "0",
    "subtotal": "0",
    "taxAmount": "0",
    "total": "14.5",
    "alreadyPaid": "0.0",
    "tenantUser_id": null,
    "tenantUserName": null,
    "discount": null,
    "table_id": null,
    "tableName": null,
    "margin": null,
    "delivery_id": null,
    "orderInvoices": [],
    "delivery": null,
    "orderContents": [
        {
            "id": 1,
            "order_id": "4",
            "item_id": "1",
            "dishOrder": "0",
            "seat": "0",
            "quantity": "2",
            "weight": "0",
            "itemName": "Oran Cartwright",
            "itemPrice": "17.49",
            "alreadyPaidQuantity": "0",
            "alreadyPrintedQuantity": "0",
            "modifiers": null,
            "discount": null,
            "taxPercentage": "0",
            "discountAmount": "79.84",
            "taxAmount": "85.91",
            "total": "98.98",
            "extrasAmount": "12.96",
            "subtotal": "74.96",
            "priceWithExtrasIndividual": "66.52",
            "notes": null,
            "price_id": null,
            "optional_modifiers": null,
            "format_pivot_id": null,
            "margin": null,
            "menuMenuContents": [],
        }
       ],
      } 
Field Type Required Description
from YYYY-mm-dd required The starting date of the orders fetched.
to YYYY-mm-dd required The ending date of the orders fetched.
page number optional As the orders are paginated, use this parameter to select the page to fetch.
pagination number optional Number of objects per page. The default value is 50 and the max allowed is 200.

You can add ?withPayments parameter. This way apart from orderContents another array will be loaded called orderInvoices, it will contain an array of invoices and each invoice will contain an array of orderPayments.

"orderContents": [{}, {}, …],
"orderInvoices": [
    {
        "orderPayments": [
            {
                "payAmount": 10,
                "paymentMethod": 1,
                …
            }, {}, …
        ], …
    }, {}, …
]

You can add ?withRooms parameter. This way apart from orderContents another array will be loaded called table which will contain a room.

"orderContents": [{}, {}, …],
"table": {
    "id"        : <table_id>,
    "name"      : <tableName>,
    "room_id"   : <room_id>,
    "room"      : {
        "id"    : <room_id>,
        "name"  : <roomName>
    },
}