Last.app API (2.0.0)

Download OpenAPI specification:

API Support: support@last.app

Introduction

Your integration is going to be linked with a Location, which belongs to an Organization. Each location can have more than one brand (Sushi, Poke, Burgers, ...). And each brand can have more than one catalog, with a different set of products.

When you create a new Tab, it has to be linked to a specific brand (brand ids are unique, the same brand in different locations has a different id). Then we will route the tab to the right location under the right brand name.

Please go to our developer portal to add your integration.

Authentication

For both the Rest API and the webhooks we use the same authentication method. We will share with you an unique and secret token as a integrator, and in all the requests it has to be included as a header.

Authorization: Bearer \${token}

How to get it?

You should also include in every endpoint (except this one, an extra header LocationID or OrganizationID. Look in every endpoint in AUTHORIZATIONS Field to know which one should be added.

Rate limits

There are 2 rate limits applying to all endpoints:

  • Rate limit of 600 reqs every 10 min indexed by token / entity.
  • Rate limit of 5 reqs every second indexed by token / entity.

And there is an specific rate limit only applying to /organizations endpoint:

  • Rate limit of 1 reqs every second indexed by token.

Being an entity a LocationId or OrganizationId which should be added as a header. Look in every endpoint in AUTHORIZATIONS Field to know which one should be added.

Migration Guide

Import changes if you come from V1:

  • We have defined for most entities 2 schemes to be shared with you: Simple scheme and Complete scheme.
    Note that GET routes which returns a LIST are returning entities with simple scheme format.
    On the other hand, GET routes which returns a SINGLE ELEMENT are returning entities with complete scheme format.
    The first example of this new behaviour is found on Locations.
    Look response samples of Location List and Location by ID

  • Tokens have completely changed:
    On V1, a token allows an integrator to operate over an organization.
    So every integrator had a token for every organization.
    On V2, a token allows an integrator to operate over ALL his organizations.

Integrations

  • Your integration is gonna be visible by all our locations on their Admin Marketplace. So please, apart from selecting your capabilities and webhooks, have a time to edit your integration on Developer Portal (logo, name, description, ...) Let restaurants know how you can help them in their daily lives!

  • When a restaurant wants to integrate with you, we ask them:

    1. A the name for the integration
    2. An externalId (this is their unique identifier on your system, so if needed help restaurants to get it)

Do you have a question?

Organizations

Valid operations over organizations

Organization list

Returns a list of the organizations that have at least 1 location integrated with you

Authorizations:
bearerAuth

Responses

Response samples

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

Organization Courses

Returns the list of courses defined by the organization

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
organizationId
required
string <uuid> = 36 characters

Organization Id

Responses

Response samples

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

Organization Catalog

Returns organization catalog.

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
organizationId
required
string <uuid> = 36 characters

Organization Id

Responses

Response samples

Content type
application/json
{
  • "modifiers": [
    ],
  • "modifierGroups": [
    ],
  • "products": [
    ],
  • "combos": [
    ]
}

Locations

Valid operations over locations. What is a brand?

Location list

Returns the location list integrated with you of this organization

Authorizations:
(bearerAuthorganizationAuth)
query Parameters
organizationId
required
string <uuid> = 36 characters

Unique identifier of the organization

Responses

Response samples

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

Location by Id

Returns the location with this identifier

Authorizations:
(bearerAuthlocationAuth)
path Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

Responses

Response samples

Content type
application/json
{
  • "id": "f2779a96-578f-4649-89f6-a0972183efea",
  • "name": "Pl Catalunya",
  • "address": "Plaça de Catalunya, 08002 Barcelona",
  • "email": "notifications@restBarcelona.com",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "postalCode": "08002",
  • "phoneNumber": "666666666",
  • "latitude": 41.441969,
  • "longitude": 2.203933,
  • "countryCode": "ES",
  • "regionCode": "CT",
  • "city": "Barcelona",
  • "defaultPosCatalogId": "12349a96-578f-4649-89f6-a0972183efea",
  • "brands": [
    ],
  • "preparationMinutes": 15,
  • "shopAreas": [
    ],
  • "workingTimes": {
    },
  • "paymentMethods": [
    ],
  • "offlinePaymentMethods": [
    ]
}

Floorplans

Valid operations over floorplans

Floorplan List

Returns a list of floorplans

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

name
string non-empty
Example: name=Sala

Name of the floorplan

Responses

Response samples

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

Floorplan by Id

Returns a floorplan by his identifier

Authorizations:
(bearerAuthlocationAuth)
path Parameters
floorplanId
required
string <uuid> = 36 characters

Unique identifier of the floorplan

Responses

Response samples

Content type
application/json
{
  • "id": "d482a7b0-377e-4a56-8c43-7d847738f044",
  • "name": "Main",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "tables": [
    ]
}

Catalogs

Valid operations over catalogs

Catalogs list

Returns a list of catalogs

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

name
string non-empty
Example: name=Delivery Catalog

Name of the catalog

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Catalogs by Id

Returns a catalog by his identifier

Authorizations:
(bearerAuthlocationAuth)
path Parameters
catalogId
required
string <uuid> = 36 characters

Unique identifier of the catalog

Responses

Response samples

Content type
application/json
{
  • "id": "93724e32-195d-49cd-9b0e-96e3dc0945b5",
  • "name": "My Catalog",
  • "organizationId": "19264e32-195d-49cd-9b0e-96e3dc0945b5",
  • "deleted": false,
  • "modifierGroups": [
    ],
  • "categories": [
    ]
}

Enable / Disable catalog product

Allows to enable or disable a existent catalog product

Authorizations:
(bearerAuthlocationAuth)
path Parameters
catalogId
required
string <uuid> = 36 characters

Unique identifier of the catalog

productId
required
string <uuid> = 36 characters

Unique identifier of the catalog product id

Request Body schema: application/json
required
enable
required
boolean

Status of the catalog product

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Response samples

Content type
application/json
{
  • "error": "Something wrong on your request"
}

Tabs

Valid operations over tabs. What is a tab?

Create Tab

Create a tab

Authorizations:
(bearerAuthlocationAuth)
Request Body schema: application/json
required
brandId
required
string <uuid> = 36 characters

Unique identifier for a location brand

code
required
string non-empty

Code shown to the user in your system

source
required
string non-empty

Source of the tab

required
Array of objects (addTabProducts)
externalId
string

Identifier of the tab on your system

operationalCode
string <= 4 characters

Operational code you want us to show on the ticket.

pickupTime
string <date-time>

Estimated pickupTime time in ISO 8601

schedulingTime
string <date-time>

Estimated scheduling time in ISO 8601

notes
string non-empty

Tab notes

object

Discount applied over the tab

object

Object containing company info

object

Object containing customer info

tableId
string <uuid> = 36 characters

Unique identifier of the table of restaurant. If it is present, tab is considered as a Restaurant.

object

Object details of the delivery. If it is present, the tab is considered as a delivery. Otherwise the tab is a take away.

Array of objects

Array containing payments

preferredPaymentMethod
string non-empty

Preferred payment method by customer

withoutBills
boolean
Default: false

Parameter to indicate automatic bill creation

Responses

Request samples

Content type
application/json
{
  • "brandId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "products": [
    ],
  • "notes": "I am allergic to tomato",
  • "code": "B1234567",
  • "operationalCode": "B123",
  • "pickupTime": "2019-09-10T13:17:00.000Z",
  • "preferredPaymentMethod": "cash",
  • "customer": {
    },
  • "company": {
    },
  • "discount": {
    },
  • "schedulingTime": "2019-09-10T13:17:00.000Z",
  • "delivery": {
    },
  • "payments": [
    ]
}

Response samples

Content type
application/json
{
  • "name": null,
  • "creationTime": "2020-07-31T15:48:22.000Z",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "source": "Shop",
  • "allergyInfo": null,
  • "customerNote": null,
  • "kitchenNote": null,
  • "tableName": null,
  • "closeTime": "2020-08-06T15:32:04.000Z",
  • "locationBrandId": "23cdda27-2f82-46e4-a366-deecd5d420d0",
  • "customerId": "998a26bd-04a0-11ea-8884-0242ac110002",
  • "code": "S002",
  • "pickupType": "takeAway",
  • "schedulingTime": "2020-08-02T22:30:00.000Z",
  • "activationTime": "2020-08-06T15:32:04.000Z",
  • "tabTables": [ ],
  • "products": [
    ],
  • "seats": 1,
  • "waiters": [
    ],
  • "bills": [
    ],
  • "customerInfo": {
    },
  • "delivery": {
    }
}

Tab List

Returns a list of tabs.
NOTE Maximum interval date: 365 days

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters
Example: locationId=712b9774-5298-42ac-aa5e-c61debb8e419

Unique identifier of the location

startDate
required
string <date-time>
Example: startDate=2024-03-28 10:59:06

Retrieve tabs with activation time after startDate (in ISO 8601)

endDate
required
string <date-time>
Example: endDate=2024-04-04 10:59:06

Retrieve tabs with activation time after endDate (in ISO 8601)

offset
number >= 0
Default: 0

The number of tabs to skip.

limit
number [ 5 .. 100 ]
Default: 20

The maximum number of tabs to be returned.

tabName
string
Example: tabName=Ricardo

Only retrieve tabs with a specific name

tableId
string
Example: tableId=bb4ff314-4d9f-4fa9-a046-749fd1d12b18

Only retrieve tabs from tables with this id

tableName
string
Example: tableName=A1

Only retrieve tabs from tables with a specific name

open
boolean

Only retrieve tabs which are open/closed

customerId
string <uuid> = 36 characters
Example: customerId=712b9774-5298-42ac-aa5e-c61debb8e419

Only retrieve tabs from a specific customer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Tab by ID

Allows to retrieve a specific tab by its ID.

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string <uuid> = 36 characters

Unique identifier of the tab

Responses

Response samples

Content type
application/json
{
  • "name": null,
  • "creationTime": "2020-07-31T15:48:22.000Z",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "source": "Shop",
  • "allergyInfo": null,
  • "customerNote": null,
  • "kitchenNote": null,
  • "tableName": null,
  • "closeTime": "2020-08-06T15:32:04.000Z",
  • "locationBrandId": "23cdda27-2f82-46e4-a366-deecd5d420d0",
  • "customerId": "998a26bd-04a0-11ea-8884-0242ac110002",
  • "code": "S002",
  • "pickupType": "takeAway",
  • "schedulingTime": "2020-08-02T22:30:00.000Z",
  • "activationTime": "2020-08-06T15:32:04.000Z",
  • "tabTables": [ ],
  • "products": [
    ],
  • "seats": 1,
  • "waiters": [
    ],
  • "bills": [
    ],
  • "customerInfo": {
    },
  • "delivery": {
    }
}

Cancel Tab

Cancel a Tab

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string <uuid> = 36 characters

Unique identifier of the tab

Request Body schema: application/json
required
cancelReason
required
string

Responses

Request samples

Content type
application/json
{
  • "cancelReason": "User cancelled manually"
}

Response samples

Content type
application/json
{
  • "error": "Something wrong on your request"
}

Add Tab Products

Allows to add products to a tab

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string

Tab Id

Request Body schema: application/json
required
Array
id
string <uuid> = 36 characters

Unique identifier for the product in Last

name
required
string

Name of the product

quantity
required
number >= 1

Quantity of the product

price
required
number

Price per unit of the product (without modifiers included). Represented as an integer in the smallest denomination of the currency

type
required
string
Enum: "PRODUCT" "COMBO"

Type of the product

course
string non-empty

Course of the product

externalId
string non-empty

Identifier of the product in the external system

comments
string non-empty

Comments of the product

Array of objects

Array containing the modifiers of the product. Only if product type is PRODUCT

object

Optional discount object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "name": null,
  • "creationTime": "2020-07-31T15:48:22.000Z",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "source": "Shop",
  • "allergyInfo": null,
  • "customerNote": null,
  • "kitchenNote": null,
  • "tableName": null,
  • "closeTime": "2020-08-06T15:32:04.000Z",
  • "locationBrandId": "23cdda27-2f82-46e4-a366-deecd5d420d0",
  • "customerId": "998a26bd-04a0-11ea-8884-0242ac110002",
  • "code": "S002",
  • "pickupType": "takeAway",
  • "schedulingTime": "2020-08-02T22:30:00.000Z",
  • "activationTime": "2020-08-06T15:32:04.000Z",
  • "tabTables": [ ],
  • "products": [
    ],
  • "seats": 1,
  • "waiters": [
    ],
  • "bills": [
    ],
  • "customerInfo": {
    },
  • "delivery": {
    }
}

Tab pending products list

Allows to retrieve tab products which are not billed yet.
This endpoint can be helpful if you want flexibility when creating bills.
Check pendingProducts on POST Create Bill endpoint.

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string

Tab Id

Responses

Response samples

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

Bills

Valid operations over bills. What is a bill?

Create bill

Allows to create a bill for a specific tab.
Default: If pendingProducts not specified, bill will be created for all pending products & fees pending to be paid.
In case you want to generate a bill only for specific pending products, use pendingProducts array specifying the tabProductIds.
Check Tab pending products list GET endpoint.

Authorizations:
(bearerAuthlocationAuth)
Request Body schema: application/json
tabId
required
string <uuid> = 36 characters

Unique identifier of the tab

object

Optional discount object

Array of objects

Responses

Request samples

Content type
application/json
{
  • "tabId": "1a224103-8015-4e9d-8f5b-19cc701429a4",
  • "discount": {
    },
  • "pendingProducts": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Bill List

Returns a list of bills.
Paginated endpoint.
NOTE Maximum interval date: 365 days

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid>
Example: locationId=712b9774-5298-42ac-aa5e-c61debb8e419

Retrieve bills related to this location

startDate
required
string <date-time>
Example: startDate=2024-03-28 10:59:06

Retrieve bills with activation time after startDate (in ISO 8601)

endDate
required
string <date-time>
Example: endDate=2024-04-04 10:59:06

Retrieve bills with activation time after endDate (in ISO 8601)

offset
number >= 0
Default: 0

The number of bills to skip

limit
number [ 5 .. 100 ]
Default: 20

Number of elements per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Bill by Id

Returns a bill by his identifier.

Authorizations:
(bearerAuthlocationAuth)
path Parameters
billId
required
string <uuid> = 36 characters

Unique identifier of the bill

Responses

Response samples

Content type
application/json
{
  • "id": "866ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "number": 859,
  • "creationTime": "2020-07-31T15:48:23.000Z",
  • "finalizingTime": "2020-07-31T15:48:23.000Z",
  • "company": {
    },
  • "total": 1400,
  • "tax": 127,
  • "taxableBase": 1273,
  • "discountTotal": 0,
  • "deliveryFee": 0,
  • "minimumBasketSurcharge": 0,
  • "terraceSurcharge": 0,
  • "terraceSurchargePercentage": 0,
  • "preferredPaymentMethod": "card",
  • "payments": [ ],
  • "products": [
    ]
}

Payments

Valid operations over payments

Create Payment

Adds a payment to an existing bill from an open tab. It is possible for a bill to have multiple partial payments. Once all the tab bills are paid fully, the tab will be closed automatically. If the sum of all the payments is greater than the bill total, the difference will be considered as tip for that bill.

Authorizations:
(bearerAuthlocationAuth)
Request Body schema: application/json
required
billId
required
string <uuid> = 36 characters

Unique identifier of the bill

amount
required
number >= 1

Amount of the payment

type
required
string non-empty

Method used for the payment

tip
number >= 0

Amount of the payment paid as tip

externalId
string

Unique identifier of the payment on your system

Responses

Request samples

Content type
application/json
{
  • "billId": "0154734b-c56e-432c-9679-0961ec002166",
  • "amount": 2500,
  • "tip": 10,
  • "type": "card",
  • "externalId": "1111-8888-5555-4444-7777"
}

Response samples

Content type
application/json
{
  • "id": "bedffaac-5a09-498b-aa22-80323449a3ea",
  • "type": "cash",
  • "amount": 300,
  • "deleted": false,
  • "billId": "723ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "creationTime": "2020-07-31T15:48:23.000Z",
  • "userId": "174ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "tillId": "155ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "externalId": "3765d6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "tip": 0
}

Payment List

Returns a list of payments.
Paginated endpoint.
NOTE Maximum interval date: 365 days

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid>
Example: locationId=712b9774-5298-42ac-aa5e-c61debb8e419

Retrieve payments related to this location

startDate
required
string <date-time>
Example: startDate=2024-03-28 10:59:06

Retrieve payments with activation time after startDate (in ISO 8601)

endDate
required
string <date-time>
Example: endDate=2024-04-04 10:59:06

Retrieve payments with activation time after endDate (in ISO 8601)

offset
number >= 0
Default: 0

The number of payments to skip

limit
number [ 5 .. 100 ]
Default: 20

Number of elements per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Payment By Id

Returns the payment by his identifier.

Authorizations:
(bearerAuthlocationAuth)
path Parameters
paymentId
required
string <uuid> = 36 characters

Unique identifier of the payment

Responses

Response samples

Content type
application/json
{
  • "id": "bedffaac-5a09-498b-aa22-80323449a3ea",
  • "type": "cash",
  • "amount": 300,
  • "deleted": false,
  • "billId": "723ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "creationTime": "2020-07-31T15:48:23.000Z",
  • "userId": "174ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "tillId": "155ed6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "externalId": "3765d6ee-f325-434b-9c8a-e5d0fc07b53f",
  • "tip": 0
}

Delete Payment

Deletes a payment from an existing bill

Authorizations:
(bearerAuthlocationAuth)
path Parameters
paymentId
required
string <uuid> = 36 characters

Unique identifier of the payment

Responses

Response samples

Content type
application/json
{
  • "error": "Something wrong on your request"
}

Orders

Valid operations over orders. What is an order?

Order status

Allows to retrieve the status of an order

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string <uuid> = 36 characters

Tab Id

Responses

Response samples

Content type
application/json
{
  • "status": "KITCHEN"
}

Order status

Allows to update the status of an order

Authorizations:
(bearerAuthlocationAuth)
path Parameters
tabId
required
string <uuid> = 36 characters

Tab Id

Request Body schema: application/json
required
newStatus
required
string
Enum: "KITCHEN" "READY_TO_PICKUP" "ON_DELIVERY" "DELIVERED" "CLOSED"

New status of the order

Responses

Request samples

Content type
application/json
{
  • "newStatus": "READY_TO_PICKUP"
}

Response samples

Content type
application/json
{
  • "status": "KITCHEN"
}

Promotions

Valid operations over promotions

Create Promotion

Allows to create a promotion

Authorizations:
(bearerAuthorganizationAuth)
Request Body schema: application/json
required
name
required
string non-empty

Name of the promotion

discountType
required
string
Enum: "percentage" "currency"

Type of discount

discountAmount
required
number >= 1

Amount to be discounted by the promotion, can be a percentage or currency amount in cents depending on the type

organizationId
required
string <uuid> = 36 characters

Location IDs where the promotion will take effect

description
string non-empty

Description of the promotion

locations
Array of strings

Location IDs where the promotion will take effect

maxRedemptions
number

The amount after which the promotion will expire

minExpense
number >= 0
Default: 0

Minimum expense in cents for which the promotion will take effect

products
Array of strings

One of products array or categories array. Product IDs in which the promotion will take effect. This IDs are the organizationProductId or the organizationComboId of the catalog products.

categories
Array of strings

One of products array or categories array. Category IDs in which the promotion will take effect

weekdays
Array of strings
Items Enum: "monday" "tuesday" "wednesday" "thursday" "friday" "saturday" "sunday"

Weekdays in which the promotion will take effect

code
string non-empty

Code to get the promotion applied

startTime
string <date-time>

Promotion availability starting time in ISO 8601

endTime
string <date-time>

Promotion availability ending time in ISO 8601

pointsExpense
number >= 0
Default: 0

Amount of points that are needed and will be consumed when the promotion is used

accumulated
boolean
Default: false

If enabled the promotion could be accumulated with others

allowRepeat
boolean
Default: false

If enabled this promotion can be applied more than one time

availableInShop
boolean
Default: false

If enabled this promotion can be applied in LastShop

availableInPos
boolean
Default: false

If enabled this promotion can be applied in LastPOS

availableInAdmin
boolean
Default: false

If enabled this promotion will be shown in LastAdmin

enabled
boolean
Default: true

Availability of the promotion

customers
Array of strings

Array of customer identifiers which will be eligible to use the promotion

Responses

Request samples

Content type
application/json
{
  • "accumulated": true,
  • "allowRepeat": false,
  • "availableInShop": true,
  • "availableInPos": true,
  • "availableInAdmin": true,
  • "code": "KONAMICODE",
  • "description": "el tenedor desc",
  • "discountAmount": 1000,
  • "discountType": "currency",
  • "enabled": true,
  • "endTime": "2021-02-03T23:00:00.000Z",
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad43",
  • "locations": [
    ],
  • "maxRedemptions": 3,
  • "minExpense": 1290,
  • "name": "El tenedor",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "pointsExpense": 10,
  • "products": [
    ],
  • "startTime": "2021-01-14T23:00:00.000Z",
  • "weekdays": [
    ],
  • "customers": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad42",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "name": "El tenedor",
  • "description": "el tenedor",
  • "pointsExpense": null,
  • "discountType": "percentage",
  • "discountAmount": 10,
  • "allowRepeat": true,
  • "accumulated": true,
  • "categories": [
    ],
  • "products": [
    ],
  • "customers": [
    ]
}

Promotion List

Allows to retrieve the list of promotions

Authorizations:
(bearerAuthorganizationAuth)
query Parameters
organizationId
required
string

Organization of the promotion.

name
string

Name of the promotion.

offset
number >= 0
Default: 0

The number of promotions to skip.

limit
number [ 5 .. 100 ]
Default: 20

The maximum number of promotions to be returned.

Responses

Response samples

Content type
application/json
{
  • "promotions": [
    ]
}

Promotion By Id

Allows to retrieve a promotion

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
promotionId
required
string <uuid> = 36 characters

Unique identifier of the promotion

Responses

Response samples

Content type
application/json
{
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad42",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "name": "El tenedor",
  • "description": "el tenedor",
  • "pointsExpense": null,
  • "discountType": "percentage",
  • "discountAmount": 10,
  • "allowRepeat": true,
  • "accumulated": true,
  • "categories": [
    ],
  • "products": [
    ],
  • "customers": [
    ]
}

Update Promotion

Allows to update a promotion.
CAUTION! If you DON'T SPECIFY locations, products, categories, weekdays or customers
on a promotion update it means that you are DELETING this existent values for promo.

As we understand products, categories and customers could be a dynamic value over a promotion, in order to add / delete ONLY a subset of them, you can use this other endpoint.

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
promotionId
required
string <uuid> = 36 characters

Unique identifier of the promotion

Request Body schema: application/json
required
name
required
string non-empty

Name of the promotion

discountType
required
string
Enum: "percentage" "currency"

Type of discount

discountAmount
required
number >= 1

Amount to be discounted by the promotion, can be a percentage or currency amount in cents depending on the type

organizationId
required
string <uuid> = 36 characters

Location IDs where the promotion will take effect

description
string non-empty

Description of the promotion

locations
Array of strings

Location IDs where the promotion will take effect

maxRedemptions
number

The amount after which the promotion will expire

minExpense
number >= 0
Default: 0

Minimum expense in cents for which the promotion will take effect

products
Array of strings

One of products array or categories array. Product IDs in which the promotion will take effect. This IDs are the organizationProductId or the organizationComboId of the catalog products.

categories
Array of strings

One of products array or categories array. Category IDs in which the promotion will take effect

weekdays
Array of strings
Items Enum: "monday" "tuesday" "wednesday" "thursday" "friday" "saturday" "sunday"

Weekdays in which the promotion will take effect

code
string non-empty

Code to get the promotion applied

startTime
string <date-time>

Promotion availability starting time in ISO 8601

endTime
string <date-time>

Promotion availability ending time in ISO 8601

pointsExpense
number >= 0
Default: 0

Amount of points that are needed and will be consumed when the promotion is used

accumulated
boolean
Default: false

If enabled the promotion could be accumulated with others

allowRepeat
boolean
Default: false

If enabled this promotion can be applied more than one time

availableInShop
boolean
Default: false

If enabled this promotion can be applied in LastShop

availableInPos
boolean
Default: false

If enabled this promotion can be applied in LastPOS

availableInAdmin
boolean
Default: false

If enabled this promotion will be shown in LastAdmin

enabled
boolean
Default: true

Availability of the promotion

customers
Array of strings

Array of customer identifiers which will be eligible to use the promotion

Responses

Request samples

Content type
application/json
{
  • "accumulated": true,
  • "allowRepeat": false,
  • "availableInShop": true,
  • "availableInPos": true,
  • "availableInAdmin": true,
  • "code": "KONAMICODE",
  • "description": "el tenedor desc",
  • "discountAmount": 1000,
  • "discountType": "currency",
  • "enabled": true,
  • "endTime": "2021-02-03T23:00:00.000Z",
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad43",
  • "locations": [
    ],
  • "maxRedemptions": 3,
  • "minExpense": 1290,
  • "name": "El tenedor",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "pointsExpense": 10,
  • "products": [
    ],
  • "startTime": "2021-01-14T23:00:00.000Z",
  • "weekdays": [
    ],
  • "customers": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad42",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "name": "El tenedor",
  • "description": "el tenedor",
  • "pointsExpense": null,
  • "discountType": "percentage",
  • "discountAmount": 10,
  • "allowRepeat": true,
  • "accumulated": true,
  • "categories": [
    ],
  • "products": [
    ],
  • "customers": [
    ]
}

Edit Promotion entities

Allows to ADD / DELETE entities for a particular promotion.
If you don't specify some entity, nothing will be done to this one.

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
promotionId
required
string <uuid> = 36 characters

Unique identifier of the promotion

Request Body schema: application/json
required
type
required
string
Enum: "add" "delete"

Type of edit

products
Array of strings

One of products array or categories array. Product IDs in which the promotion will take effect. This IDs are the organizationProductId or the organizationComboId of the catalog products.

categories
Array of strings

One of products array or categories array. Category IDs in which the promotion will take effect

customers
Array of strings

Array of customer identifiers which will be eligible to use the promotion

Responses

Request samples

Content type
application/json
{
  • "type": "delete",
  • "products": [
    ],
  • "customers": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "28afe959-6204-4169-b5ba-fc90f15aad42",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "name": "El tenedor",
  • "description": "el tenedor",
  • "pointsExpense": null,
  • "discountType": "percentage",
  • "discountAmount": 10,
  • "allowRepeat": true,
  • "accumulated": true,
  • "categories": [
    ],
  • "products": [
    ],
  • "customers": [
    ]
}

Delete Promotion

Allows to delete a promotion

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
promotionId
required
string <uuid> = 36 characters

Unique identifier of the promotion

Responses

Response samples

Content type
application/json
{
  • "error": "Something wrong on your request"
}

Customers

Valid operations over customers

Create Customer

Allows to create a customer

Authorizations:
(bearerAuthorganizationAuth)
Request Body schema: application/json
required
organizationId
required
string <uuid> = 36 characters

Organization of the customer

name
required
string non-empty

Name of the customer

phoneNumber
required
string non-empty

Full phone number with country code

source
required
string non-empty

Source of the customer

surname
string non-empty

Surname of the customer

internalNote
string

Internal note

email
string

Email of the customer

Responses

Request samples

Content type
application/json
{
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "name": "Bruce",
  • "surname": "Wayne",
  • "phoneNumber": "+34666666666",
  • "email": "hello@test.com",
  • "source": "MyWebsite"
}

Response samples

Content type
application/json
{
  • "id": "003ac58e-d27b-4c93-a6e8-559305300c20",
  • "name": "Bruce",
  • "surname": "Wayne",
  • "phoneNumber": "+34666666666",
  • "creationTime": "2020-05-21T19:01:02.000Z",
  • "email": "hello@test.com",
  • "source": "MyWebsite",
  • "marketingCommunication": true,
  • "internalNote": null
}

Customer List

Allows to retrieve a list of customers.
This request is paginated.

Authorizations:
(bearerAuthorganizationAuth)
query Parameters
organizationId
required
string non-empty
Example: organizationId=90724ad8-334b-40d8-a07b-45d4b5e563d4

Organization id of the customers

phoneNumber
string non-empty
Example: phoneNumber=+34666111222

Phone number of the customer

name
string non-empty
Example: name=Carlos

Name of the customer

email
string non-empty
Example: email=carlos1990@gmail.com

Email of the customer

offset
number >= 0
Default: 0

The number of customers to skip

limit
number [ 5 .. 100 ]
Default: 20

Number of elements per page

updateTime
string <date-time>
Example: updateTime=2024-04-04T12:00:00Z

Created OR updated AFTER this time (in ISO 8601)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Customer Points List

Allows to retrieve the list of customers with his points.
This request is paginated.

Authorizations:
(bearerAuthorganizationAuth)
query Parameters
organizationId
required
string non-empty
Example: organizationId=90724ad8-334b-40d8-a07b-45d4b5e563d4

Organization id of the customers

offset
number >= 0
Default: 0

The number of customers to skip

limit
number [ 5 .. 100 ]
Default: 20

Number of elements per page

Responses

Response samples

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

Customer By Id

Allows to retrieve a customer

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
customerId
required
string <uuid> = 36 characters

Unique identifier of the customer

Responses

Response samples

Content type
application/json
{
  • "id": "d40f1db8-4092-4f4c-bb48-a4405985ed2f",
  • "name": "Bruce",
  • "surname": "Wayne",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "phoneNumber": "+34666666666",
  • "email": "hello@test.com",
  • "source": "MyWebsite",
  • "marketingCommunication": true,
  • "hasUser": true,
  • "points": 30,
  • "addresses": [
    ]
}

Update Customer

Allows to update a customer.

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
customerId
required
string <uuid> = 36 characters

Unique identifier of the customer

Request Body schema: application/json
required
name
string non-empty

Name of the customer

surname
string non-empty

Surname of the customer

phoneNumber
string non-empty

Full phone number with country code

source
string non-empty

Source of the customer

internalNote
string

Internal note

email
string

Email of the customer

Responses

Request samples

Content type
application/json
{
  • "name": "Matt"
}

Response samples

Content type
application/json
{
  • "id": "003ac58e-d27b-4c93-a6e8-559305300c20",
  • "name": "Bruce",
  • "surname": "Wayne",
  • "phoneNumber": "+34666666666",
  • "creationTime": "2020-05-21T19:01:02.000Z",
  • "email": "hello@test.com",
  • "source": "MyWebsite",
  • "marketingCommunication": true,
  • "internalNote": null
}

Update Customer Points

Allows to update points to a customer
Use positive value on points for ADD points.
Use negative value points for SUBTRACT points.

Authorizations:
(bearerAuthorganizationAuth)
path Parameters
customerId
required
string

Unique identifier of the customer

Request Body schema: application/json
required
points
required
number

Number of points to add (use negative value to subtract)

concept
required
string

Description of points operation

Responses

Request samples

Content type
application/json
{
  • "points": 10,
  • "concept": "Birthday gift"
}

Response samples

Content type
application/json
{
  • "id": "d40f1db8-4092-4f4c-bb48-a4405985ed2f",
  • "name": "Bruce",
  • "surname": "Wayne",
  • "organizationId": "90724ad8-334b-40d8-a07b-45d4b5e563d4",
  • "phoneNumber": "+34666666666",
  • "email": "hello@test.com",
  • "source": "MyWebsite",
  • "marketingCommunication": true,
  • "hasUser": true,
  • "points": 30,
  • "addresses": [
    ]
}

Reservations

Valid operations over reservations

Create Reservation

Allows to create a reservation

Authorizations:
(bearerAuthlocationAuth)
Request Body schema: application/json
required
name
required
string non-empty

Customer name of the reservation

locationId
required
string <uuid> = 36 characters

Unique identifier of the location where the reservation is done

dateTime
required
string <date-time>

Date time of the reservation in ISO 8601

diners
required
number >= 1

Number of diners of the reservation

phoneNumber
string

Full phone number with country code

email
string

Email of the reservation customer

surname
string non-empty

Customer surname of the reservation

externalId
string

Id of the reservation on the reservation platform

customerComments
string

Specific requirements asked by the customer.

notify
boolean
Default: true

Receive notifications about the reservation

zone
string
Default: "sala"
Enum: "sala" "terraza"

Zone where allocate the reservation

Responses

Request samples

Content type
application/json
{
  • "name": "Juanito",
  • "surname": "Jones",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "externalId": null,
  • "phoneNumber": "+34666111444",
  • "diners": 2,
  • "customerComments": null,
  • "source": "TheFork",
  • "email": "juanito.jones@example.com",
  • "dateTime": "2024-02-05T14:00:00.000Z",
  • "zone": "Sala"
}

Response samples

Content type
application/json
{
  • "name": "Juanito",
  • "surname": "Jones",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "externalId": null,
  • "tabId": "76e48ce9-756a-4ee5-90e8-0d6e27337c27",
  • "phoneNumber": "+34666111444",
  • "diners": 2,
  • "customerComments": null,
  • "source": "TheFork",
  • "dateTime": "2024-02-05T14:00:00.000Z",
  • "cancelled": false,
  • "tables": [
    ],
  • "zone": "sala"
}

Reservation List

Allows to retrieve a list of reservations.

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid>
Example: locationId=712b9774-5298-42ac-aa5e-c61debb8e419

Retrieve reservations related to this location

startDate
required
string <date-time>
Example: startDate=2024-03-28T10:59:06Z

Retrieve reservation with date after startDate (in ISO 8601)

endDate
required
string <date-time>
Example: endDate=2024-04-04T10:59:06Z

Retrieve reservation with date before endDate (in ISO 8601)

showCancelled
boolean
Default: false

Unique identifier of the location of the reservation

searchQuery
string
Example: searchQuery=+34612345678

Filter reservations by name, phone number or email

offset
number >= 0
Default: 0

The number of reservations to skip

limit
number [ 5 .. 100 ]
Default: 20

Number of elements per page

Responses

Response samples

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

Get Day Availability

Allows to retrieve the availability for a specific day of this location.

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

diners
required
number
Example: diners=4

Specify diners to check availability

date
required
string <date>
Example: date=2025-06-01 (YYYY-MM-DD)

Specify day to know availability (in ISO format)

Responses

Response samples

Content type
application/json
{
  • "terraza": [
    ],
  • "sala": [
    ]
}

Get Month Availability

Allows to retrieve the availability for a specific month of this location.

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

diners
required
number
Example: diners=4

Specify diners to check availability

date
required
string
Example: date=2025-06 (YYYY-MM)

Specify month date to know availability (in ISO format)

Responses

Response samples

Content type
application/json
[
  • "2025-04-23T00:00:00.000+02:00",
  • "2025-04-24T00:00:00.000+02:00",
  • "2025-04-25T00:00:00.000+02:00",
  • "2025-04-26T00:00:00.000+02:00",
  • "2025-04-27T00:00:00.000+02:00",
  • "2025-04-28T00:00:00.000+02:00",
  • "2025-04-29T00:00:00.000+02:00",
  • "2025-04-30T00:00:00.000+02:00"
]

Get Reservation Schedules

Allows to retrieve reservation schedules of this location.

Authorizations:
(bearerAuthlocationAuth)
query Parameters
locationId
required
string <uuid> = 36 characters

Unique identifier of the location

Responses

Response samples

Content type
application/json
{
  • "thursday": [
    ],
  • "monday": [
    ],
  • "wednesday": [
    ],
  • "tuesday": [
    ],
  • "friday": [
    ]
}

Reservation by Id

Get a reservation by his Id

Authorizations:
(bearerAuthlocationAuth)
path Parameters
reservationId
required
string <uuid> = 36 characters

Unique identifier of the reservation

Responses

Response samples

Content type
application/json
{
  • "name": "Juanito",
  • "surname": "Jones",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "externalId": null,
  • "tabId": "76e48ce9-756a-4ee5-90e8-0d6e27337c27",
  • "phoneNumber": "+34666111444",
  • "diners": 2,
  • "customerComments": null,
  • "source": "TheFork",
  • "dateTime": "2024-02-05T14:00:00.000Z",
  • "cancelled": false,
  • "tables": [
    ],
  • "zone": "sala"
}

Update Reservation

Updates an existent reservation

Authorizations:
(bearerAuthlocationAuth)
path Parameters
reservationId
required
string <uuid> = 36 characters

Unique identifier of the reservation

Request Body schema: application/json
required
name
required
string non-empty

Customer name of the reservation

locationId
required
string <uuid> = 36 characters

Unique identifier of the location where the reservation is done

dateTime
required
string <date-time>

Date time of the reservation in ISO 8601

diners
required
number >= 1

Number of diners of the reservation

phoneNumber
string

Full phone number with country code

email
string

Email of the reservation customer

surname
string non-empty

Customer surname of the reservation

externalId
string

Id of the reservation on the reservation platform

customerComments
string

Specific requirements asked by the customer.

notify
boolean
Default: true

Receive notifications about the reservation

zone
string
Default: "sala"
Enum: "sala" "terraza"

Zone where allocate the reservation

Responses

Request samples

Content type
application/json
{
  • "name": "Juanito",
  • "surname": "Jones",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "externalId": null,
  • "phoneNumber": "+34666111444",
  • "diners": 2,
  • "customerComments": null,
  • "source": "TheFork",
  • "email": "juanito.jones@example.com",
  • "dateTime": "2024-02-05T14:00:00.000Z",
  • "zone": "Sala"
}

Response samples

Content type
application/json
{
  • "name": "Juanito",
  • "surname": "Jones",
  • "locationId": "f2779a96-578f-4649-89f6-a0972183efea",
  • "externalId": null,
  • "tabId": "76e48ce9-756a-4ee5-90e8-0d6e27337c27",
  • "phoneNumber": "+34666111444",
  • "diners": 2,
  • "customerComments": null,
  • "source": "TheFork",
  • "dateTime": "2024-02-05T14:00:00.000Z",
  • "cancelled": false,
  • "tables": [
    ],
  • "zone": "sala"
}

Cancel Reservation

Cancels a reservation

Authorizations:
(bearerAuthlocationAuth)
path Parameters
reservationId
required
string <uuid> = 36 characters

Unique identifier of the reservation

Responses

Response samples

Content type
application/json
{
  • "error": "Something wrong on your request"
}

Webhooks

Notification Webhook

Whenever there is a content change in our side that may be relevant for an integration we trigger webhook updates.
The request will be made via POST to your chosen webhook endpoint, which on success should return an empty response with status 200.
The update will come in json format in the body of the request, wrapped in an event object, with a corresponding payload (data) with the relevant resource or information.

header Parameters
Authorization
required
string

Your integrator token

Content-Type
required
string
Default: application/json

Specify that the content will be sent as JSON

locationId
string

LocationId related (only present if event is related to a location)

organizationId
string

OrganizationId related (only present if event is related to an organization)

Request Body schema: application/json
id
string

Unique identifier of the event

type
string

Type of the event

created
string

The time the event was created at (ISO-8601 UTC)

object

Location data

Responses

Request samples

Content type
application/json
Example
{
  • "id": "33f9dc36-5e99-4044-8e2e-9b22c403c5f7",
  • "type": "location:integrated",
  • "created": "2020-10-06T18:32:04.000Z",
  • "data": {
    }
}

How can I get a testing account and a testing auth token?

You need to:

  1. Create an account on Last Developers Portal
  2. Configurate your integrations and for every one you will get a Token.
  3. Go to Store to generate a dummy organization to start testing your integration.

If you have any doubt, please contact our support team at hola@last.app.

Once I have finished the integration with a testing account, how can I pass to Production?

You should ask for this to integrations@last.app sending us your integrator ID(s), we will check and answer you. After this is done, you will appear on the Admin page of every LastApp location to be discovered!

How can I get the ID of each location?

You should enable location:integrated location:desintegrated, to receive in real time when a location decides to add / delete the integration with your product. We will send you their locationId and locationName.

Which is the difference between Location and brand?

In our system, a Location is a Restaurant, in simple words. Each location may want to appear with different brands in their online sales channels. For example, a location named Rick Restaurant can have multiple brands appearing at JustEat and UberEats, for example Rick Chickens, Rick Pizza, and Rick Sushi.

Which catalogs is my location using currently?

In the response from GET Location By Id you will find a list of brands for each location, and each of this brands contains at the same time a list of catalogs.

How can I add a webhook URL or suscribe to a webhook event?

This should be done by yourself on the Developer Portal. If you have any doubt, please contact our support team at hola@last.app.

It is posible to update products pricing or catalogs through API?

This is not possible at the moment, the only thing you can update right now is the status of a catalog product.

How many tokens I need?

You'll only need ONE token for every product you have added on the Developer Portal. For example, let's imagine you have added a Reservation product and Reporting product. You will need a token for Reservation, and a token for Reporting, this token will identify your product in our system.

Which is the difference between tab, order, and bill?

A tab is a restaurant customer request. An order is a tab which will not be eaten on the Restaurant, which means is a tab with pickupType = ['delivery', 'ownDelivery', 'takeAway']. A bill is an invoice, and it belongs to a tab. It contains payments and invoice details.

Which is the difference between source and pickupType?

The source is who or where the tab has been created, for example can be Restaurant, Shop, Glovo. The pickupType specifies for the tabs which are orders, who should come to pick it up.