Skip to content

Latest commit

 

History

History
1572 lines (1070 loc) · 43 KB

MenusApi.md

File metadata and controls

1572 lines (1070 loc) · 43 KB

Flipdish.MenusApi

All URIs are relative to https://api.flipdish.co

Method HTTP request Description
createDraftMenuFromExistingMenu POST /api/v1.0/menus/{menuId}/clone/{newName} Clone a menu, (without attaching stores)
createNewMenuAsync POST /api/v1.0/{appId}/menus/async Create a new menu asynchronously
createNewMenuForApp POST /api/v1.0/{appId}/menus Create a new menu
deleteMenu DELETE /api/v1.0/menus/{menuId} Mark a Menu as Deleted
deleteMenuImage DELETE /api/v1.0/menus/{menuId}/image Delete menu image
deleteMenuItemMetadata DELETE /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId} Delete menu item metadata
getAllMenuMetadataByMenuIdAndStoreId GET /api/v1.0/menus/{menuId}/metadata/store/{storeId} Get all menu metadata by menu ID and store ID
getMenuById GET /api/v1.0/menus/{menuId} Get menu by identifier
getMenuItemMetadata GET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId} Get menu item metadata
getMenuItemMetadataByKey GET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId} Get menu item metadata by key
getMenuItemOptionSetItemMetadata GET /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId} Get menu item option set item metadata by key
getMenuName GET /api/v1.0/menus/{menuId}/name Get Menus Name
getMenuStoreNames GET /api/v1.0/menus/{menuId}/stores Get menus store names
getMenuTaxDetails GET /api/v1.0/menus/{menuId}/tax Get menus tax details
getMenusByAppId GET /api/v1.0/{appId}/menus Get menus by appId
getMenusCheckpoints GET /api/v1.0/menus/{menuId}/checkpoints Get a Menus Checkpoints
menusDeleteTaxRate DELETE /api/v1.0/menus/{menuId}/tax/{taxId} Remove a Menus Tax Rate, can only remove a tax rate that does not have items/optionSetItems attached
menusGetMenuBulkShowHide GET /api/v1.0/menus/{menuId}/bulkshowhide/list Get bulk show/hide menu items and option set items
menusSetDisplayOnMenuTax POST /api/v1.0/menus/{menuId}/tax/show/{show} Set if tax shows for a Menu
menusSetItemDisplayOrders POST /api/v1.0/menus/{menuId}/sectiondisplayorders Re-arrange Sections within a Menu
menusShowHideBulkItems POST /api/v1.0/menus/{menuId}/bulkshowhide Bulk show/hide menu items or option set items
menusUpdateTaxType POST /api/v1.0/menus/{menuId}/tax/type/{type} Set the type of Tax on a Menu
menusUpsertTaxRate POST /api/v1.0/menus/{menuId}/taxrate Add/Update a Tax Rate
restoreAMenuCheckpoint POST /api/v1.0/menus/{menuId}/checkpoints/{checkpointId}/restore Restore a Menu to a checkpoint
setMenuItemMetadata PUT /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId} Update menu item metadata
setMenuItemOptionSetItemMetadata PUT /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId} Update menu item option set item metadata
setMenuLock POST /api/v1.0/menus/{menuId}/lock Lock/Unlock a Menu for Editing
setMenuName POST /api/v1.0/menus/{menuId}/name Set Menus Name
updateMenu POST /api/v1.0/menus/{menuId} Update menu
uploadMenuImage POST /api/v1.0/menus/{menuId}/image Upload menu image
uploadNewMenuForApp POST /api/v1.0/{appId}/menus/xlsx Create a new menu from xlsx file.

createDraftMenuFromExistingMenu

RestApiResultMenu createDraftMenuFromExistingMenu(menuId, newName)

Clone a menu, (without attaching stores)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let newName = "newName_example"; // String | Name of the new Menu
apiInstance.createDraftMenuFromExistingMenu(menuId, newName, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
newName String Name of the new Menu

Return type

RestApiResultMenu

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

createNewMenuAsync

Object createNewMenuAsync(appId, menu, opts)

Create a new menu asynchronously

You must listen to the webhook menu.async_creation.completed to know when the menu is ready

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let appId = "appId_example"; // String | App id
let menu = new Flipdish.CreateFullMenu(); // CreateFullMenu | Menu
let opts = {
  'orgId': "orgId_example" // String | Org id
};
apiInstance.createNewMenuAsync(appId, menu, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String App id
menu CreateFullMenu Menu
orgId String Org id [optional]

Return type

Object

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

createNewMenuForApp

Number createNewMenuForApp(appId, menu)

Create a new menu

[DEPRECATED] - Please use the async version as this endpoint may timeout for large menus

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let appId = "appId_example"; // String | App identifier
let menu = new Flipdish.CreateFullMenu(); // CreateFullMenu | Menu. If empty the system will create a menu with default items
apiInstance.createNewMenuForApp(appId, menu, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String App identifier
menu CreateFullMenu Menu. If empty the system will create a menu with default items

Return type

Number

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

deleteMenu

deleteMenu(menuId)

Mark a Menu as Deleted

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu Identifier
apiInstance.deleteMenu(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu Identifier

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

deleteMenuImage

deleteMenuImage(menuId)

Delete menu image

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.deleteMenuImage(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Message

deleteMenuItemMetadata

deleteMenuItemMetadata(menuId, storeId, menuItemId, key)

Delete menu item metadata

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let menuItemId = 56; // Number | Menu item identifier
let key = "key_example"; // String | Metadata key
apiInstance.deleteMenuItemMetadata(menuId, storeId, menuItemId, key, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
menuItemId Number Menu item identifier
key String Metadata key

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

getAllMenuMetadataByMenuIdAndStoreId

RestApiArrayResultAllMetadataResult getAllMenuMetadataByMenuIdAndStoreId(menuId, storeId)

Get all menu metadata by menu ID and store ID

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
apiInstance.getAllMenuMetadataByMenuIdAndStoreId(menuId, storeId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier

Return type

RestApiArrayResultAllMetadataResult

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data

getMenuById

RestApiResultMenu getMenuById(menuId)

Get menu by identifier

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.getMenuById(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

RestApiResultMenu

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

getMenuItemMetadata

RestApiArrayResultMetadata getMenuItemMetadata(menuId, storeId, menuItemId)

Get menu item metadata

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let menuItemId = 56; // Number | Menu item identifier
apiInstance.getMenuItemMetadata(menuId, storeId, menuItemId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
menuItemId Number Menu item identifier

Return type

RestApiArrayResultMetadata

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data

getMenuItemMetadataByKey

RestApiResultMetadata getMenuItemMetadataByKey(menuId, storeId, menuItemId, key)

Get menu item metadata by key

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let menuItemId = 56; // Number | Menu item identifier
let key = "key_example"; // String | Metadata key
apiInstance.getMenuItemMetadataByKey(menuId, storeId, menuItemId, key, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
menuItemId Number Menu item identifier
key String Metadata key

Return type

RestApiResultMetadata

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

getMenuItemOptionSetItemMetadata

RestApiResultMetadata getMenuItemOptionSetItemMetadata(menuId, storeId, optionSetItemId)

Get menu item option set item metadata by key

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let optionSetItemId = 56; // Number | Menu item option set item identifier
apiInstance.getMenuItemOptionSetItemMetadata(menuId, storeId, optionSetItemId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
optionSetItemId Number Menu item option set item identifier

Return type

RestApiResultMetadata

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data

getMenuName

String getMenuName(menuId)

Get Menus Name

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.getMenuName(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

String

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

getMenuStoreNames

RestApiArrayResultMenuStoreNames getMenuStoreNames(menuId)

Get menus store names

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.getMenuStoreNames(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

RestApiArrayResultMenuStoreNames

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

getMenuTaxDetails

RestApiArrayResultMenuTaxDetails getMenuTaxDetails(menuId)

Get menus tax details

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.getMenuTaxDetails(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

RestApiArrayResultMenuTaxDetails

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data

getMenusByAppId

RestApiArrayResultMenuSummary getMenusByAppId(appId)

Get menus by appId

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let appId = "appId_example"; // String | Get Menus for this appId
apiInstance.getMenusByAppId(appId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String Get Menus for this appId

Return type

RestApiArrayResultMenuSummary

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

getMenusCheckpoints

RestApiArrayResultMenuCheckpoint getMenusCheckpoints(menuId)

Get a Menus Checkpoints

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
apiInstance.getMenusCheckpoints(menuId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier

Return type

RestApiArrayResultMenuCheckpoint

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

menusDeleteTaxRate

menusDeleteTaxRate(menuId, taxId)

Remove a Menus Tax Rate, can only remove a tax rate that does not have items/optionSetItems attached

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let taxId = 56; // Number | Id of Menu Tax to be removed
apiInstance.menusDeleteTaxRate(menuId, taxId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
taxId Number Id of Menu Tax to be removed

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

menusGetMenuBulkShowHide

RestApiArrayResultMenuElementListResponse menusGetMenuBulkShowHide(menuId, isAvailable)

Get bulk show/hide menu items and option set items

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu id
let isAvailable = true; // Boolean | Is available flag
apiInstance.menusGetMenuBulkShowHide(menuId, isAvailable, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu id
isAvailable Boolean Is available flag

Return type

RestApiArrayResultMenuElementListResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

menusSetDisplayOnMenuTax

menusSetDisplayOnMenuTax(menuId, show)

Set if tax shows for a Menu

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let show = true; // Boolean | Boolean show or dont show tax (Exclusive tax type can only ever be TRUE)
apiInstance.menusSetDisplayOnMenuTax(menuId, show, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
show Boolean Boolean show or dont show tax (Exclusive tax type can only ever be TRUE)

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

menusSetItemDisplayOrders

menusSetItemDisplayOrders(menuId, displayOrders)

Re-arrange Sections within a Menu

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let displayOrders = new Flipdish.MenuObjectDisplayOrders(); // MenuObjectDisplayOrders | Section Ids and their new display order
apiInstance.menusSetItemDisplayOrders(menuId, displayOrders, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
displayOrders MenuObjectDisplayOrders Section Ids and their new display order

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

menusShowHideBulkItems

RestApiArrayResultMenuElementEditResponse menusShowHideBulkItems(menuId, isAvailable, menuElements)

Bulk show/hide menu items or option set items

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu id
let isAvailable = true; // Boolean | Is available flag
let menuElements = [new Flipdish.MenuElementHide()]; // [MenuElementHide] | Elements to be show/hide
apiInstance.menusShowHideBulkItems(menuId, isAvailable, menuElements, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu id
isAvailable Boolean Is available flag
menuElements [MenuElementHide] Elements to be show/hide

Return type

RestApiArrayResultMenuElementEditResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

menusUpdateTaxType

menusUpdateTaxType(menuId, type)

Set the type of Tax on a Menu

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let type = "type_example"; // String | Type of Tax
apiInstance.menusUpdateTaxType(menuId, type, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
type String Type of Tax

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

menusUpsertTaxRate

MenuTaxRate menusUpsertTaxRate(menuId, taxRate)

Add/Update a Tax Rate

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let taxRate = new Flipdish.MenuTaxRate(); // MenuTaxRate | Tax rate to add/update
apiInstance.menusUpsertTaxRate(menuId, taxRate, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
taxRate MenuTaxRate Tax rate to add/update

Return type

MenuTaxRate

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

restoreAMenuCheckpoint

restoreAMenuCheckpoint(menuId, checkpointId)

Restore a Menu to a checkpoint

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let checkpointId = 56; // Number | Checkpoint to restore menu to
apiInstance.restoreAMenuCheckpoint(menuId, checkpointId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
checkpointId Number Checkpoint to restore menu to

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

setMenuItemMetadata

setMenuItemMetadata(menuId, storeId, menuItemId, metadata)

Update menu item metadata

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let menuItemId = 56; // Number | Menu item identifier
let metadata = new Flipdish.Metadata(); // Metadata | Metadata object
apiInstance.setMenuItemMetadata(menuId, storeId, menuItemId, metadata, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
menuItemId Number Menu item identifier
metadata Metadata Metadata object

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

setMenuItemOptionSetItemMetadata

setMenuItemOptionSetItemMetadata(menuId, storeId, optionSetItemId, metadata)

Update menu item option set item metadata

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let storeId = 56; // Number | Store identifier
let optionSetItemId = 56; // Number | Menu item option set item identifier
let metadata = new Flipdish.Metadata(); // Metadata | Metadata object
apiInstance.setMenuItemOptionSetItemMetadata(menuId, storeId, optionSetItemId, metadata, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
storeId Number Store identifier
optionSetItemId Number Menu item option set item identifier
metadata Metadata Metadata object

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

setMenuLock

setMenuLock(menuId, locked)

Lock/Unlock a Menu for Editing

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let locked = true; // Boolean | True: Locks menu for editing, False: Unlocks for editing
apiInstance.setMenuLock(menuId, locked, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
locked Boolean True: Locks menu for editing, False: Unlocks for editing

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

setMenuName

setMenuName(menuId, name)

Set Menus Name

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let name = "name_example"; // String | Name to set for this Menu
apiInstance.setMenuName(menuId, name, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
name String Name to set for this Menu

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

updateMenu

updateMenu(menuId, menu)

Update menu

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let menu = new Flipdish.MenuBase(); // MenuBase | Full menu data
apiInstance.updateMenu(menuId, menu, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
menu MenuBase Full menu data

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

uploadMenuImage

RestApiStringResult uploadMenuImage(menuId, Image)

Upload menu image

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let menuId = 56; // Number | Menu identifier
let Image = "/path/to/file"; // File | Menu image
apiInstance.uploadMenuImage(menuId, Image, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
menuId Number Menu identifier
Image File Menu image

Return type

RestApiStringResult

Authorization

oauth2

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, text/json, application/xml, text/xml, Data

uploadNewMenuForApp

Number uploadNewMenuForApp(appId, Menu)

Create a new menu from xlsx file.

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.MenusApi();
let appId = "appId_example"; // String | App identifier
let Menu = "/path/to/file"; // File | Uploaded xlsx menu
apiInstance.uploadNewMenuForApp(appId, Menu, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String App identifier
Menu File Uploaded xlsx menu

Return type

Number

Authorization

oauth2

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, text/json, application/xml, text/xml