Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @flipdish/api-client-javascript with all npm packages installed. Try it out:

var apiClientJavascript = require("@flipdish/api-client-javascript")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@flipdish/api-client-javascript v1.0.16

Javascript Flipdish API client

@flipdish/api-client-javascript

Flipdish - JavaScript client for @flipdish/api-client-javascript No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @flipdish/api-client-javascript --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your @flipdish/api-client-javascript from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('@flipdish/api-client-javascript') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/@flipdish/api-client-javascript then install it via:

    npm install YOUR_USERNAME/@flipdish/api-client-javascript --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Flipdish = require('@flipdish/api-client-javascript');

var defaultClient = Flipdish.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new Flipdish.AuthorizationTokensApi()

var clientId = "clientId_example"; // {String} Client identifier

var opts = { 
  'page': 56, // {Number} Requested page number
  'limit': 56 // {Number} Requested page limit
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAuthorizationTokens(clientId, opts, callback);

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
Flipdish.AuthorizationTokensApigetAuthorizationTokensGET /api/v1.0/authorizationtokens/{clientId}Get authorization tokens
Flipdish.AuthorizationTokensApirevokeTokenDELETE /api/v1.0/authorizationtokens/{key}Revoke token
Flipdish.EventsApigetCustomerEventsGET /api/v1.0/events/customer/{customerId}Get customer events
Flipdish.EventsApigetEventsGET /api/v1.0/eventsGet events
Flipdish.EventsApigetEventsByIdGET /api/v1.0/events/{eventId}Get event by Id
Flipdish.EventsApigetMenuEventsGET /api/v1.0/events/menu/{menuId}Get menu events
Flipdish.EventsApigetOrderEventsGET /api/v1.0/events/order/{orderId}Get order events
Flipdish.EventsApigetOrderEventsByCustomerGET /api/v1.0/events/orderGet order events by customer
Flipdish.EventsApigetStoreEventsGET /api/v1.0/events/store/{storeId}Get store events
Flipdish.EventsApigetUserEventsGET /api/v1.0/events/user/{userId}Get user events
Flipdish.EventsApigetWhiteLabelEventsGET /api/v1.0/events/whitelabel/{whitelabelId}Get WhiteLabel events
Flipdish.HttpRequestResponseLogsApigetHttpLogsByUserIdAsyncGET /api/v1.0/interactions/logsGet API interaction logs
Flipdish.MenuOptionSetItemsApiaddMenuItemOptionSetItemPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitemsCreate menu item option set item
Flipdish.MenuOptionSetItemsApideleteOptionSetItemImageDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}/imageDelete menu item option set item image
Flipdish.MenuOptionSetItemsApigetMenuItemOptionSetItemByIdGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}Get menu item option set item by identifier
Flipdish.MenuOptionSetItemsApigetMenuItemOptionSetItemsGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitemsGet menu item option set items
Flipdish.MenuOptionSetItemsApiremoveMenuItemOptionSetItemDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}Delete menu item option set item
Flipdish.MenuOptionSetItemsApiupdateMenuItemOptionSetItemPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}Update menu item option set item
Flipdish.MenuOptionSetItemsApiuploadOptionSetItemImagePOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}/imageUpload menu item option set item image
Flipdish.MenuOptionSetsApicreateMenuItemOptionSetPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsetsCreate menu item option set
Flipdish.MenuOptionSetsApideleteMenuItemOptionSetDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}Delete menu item option set
Flipdish.MenuOptionSetsApideleteOptionSetImageDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/imageDelete option set image
Flipdish.MenuOptionSetsApigetMenuItemOptionSetByIdGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}Get menu item option set by identifier
Flipdish.MenuOptionSetsApigetMenuItemOptionSetsGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsetsGet menu item option sets
Flipdish.MenuOptionSetsApiupdateMenuItemOptionSetPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}Update menu item option set
Flipdish.MenuOptionSetsApiuploadOptionSetImagePOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/imageUpload menu item option set image
Flipdish.MenuSectionItemsApicreateMenuSectionItemPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitemsCreate menu section item
Flipdish.MenuSectionItemsApideleteMenuSectionItemDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}Delete menu section item
Flipdish.MenuSectionItemsApideleteMenuSectionItemImageDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/imageDelete menu section item image
Flipdish.MenuSectionItemsApigetMenuItemByIdGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}Get menu item by identifier
Flipdish.MenuSectionItemsApigetMenuItemsGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitemsGet menu items
Flipdish.MenuSectionItemsApiupdateMenuSectionItemPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}Update menu section item
Flipdish.MenuSectionItemsApiuploadMenuSectionItemImagePOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/imageUpload menu section item image
Flipdish.MenuSectionsApicreateMenuSectionPOST /api/v1.0/menus/{menuId}/sectionsCreate menu section
Flipdish.MenuSectionsApideleteMenuSectionDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}Delete menu section
Flipdish.MenuSectionsApideleteMenuSectionImageDELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/imageDelete menu section image
Flipdish.MenuSectionsApigetMenuSectionByIdGET /api/v1.0/menus/{menuId}/sections/{menuSectionId}Get menu section by identifier
Flipdish.MenuSectionsApigetMenuSectionsGET /api/v1.0/menus/{menuId}/sectionsGet menu sections
Flipdish.MenuSectionsApiupdateMenuSectionPOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}Update menu section
Flipdish.MenuSectionsApiuploadMenuSectionImagePOST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/imageUpload menu section image
Flipdish.MenusApideleteMenuItemMetadataGET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId}Get a menu item metadata by key
Flipdish.MenusApideleteMenuItemMetadata_0DELETE /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId}Update a menu items metadata
Flipdish.MenusApideleteMenuSectionImageDELETE /api/v1.0/menus/{menuId}/imageDelete menu image
Flipdish.MenusApigetMenuByIdGET /api/v1.0/menus/{menuId}Get menu by identifier
Flipdish.MenusApigetMenuItemMetadataGET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId}Get a menu items metadata
Flipdish.MenusApigetMenuItemOptionSetItemMetadataGET /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId}Get a menu item option set item metadata by key
Flipdish.MenusApisetMenuItemMetadataPUT /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId}Update a menu items metadata
Flipdish.MenusApisetMenuItemOptionSetItemMetadataPUT /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId}Update a menu item option set items metadata
Flipdish.MenusApiupdateMenuPOST /api/v1.0/menus/{menuId}Update menu
Flipdish.MenusApiuploadMenuSectionImagePOST /api/v1.0/menus/{menuId}/imageUpload menu image
Flipdish.OAuthClientsApiaddRedirectUriPOST /api/v1.0/oauthclients/{oAuthClientId}/redirecturisCreate OAuth client redirect uri
Flipdish.OAuthClientsApicreateOAuthClientPOST /api/v1.0/oauthclientsCreate OAuth client
Flipdish.OAuthClientsApideleteOAuthClientDELETE /api/v1.0/oauthclients/{oAuthClientId}Delete OAuth client
Flipdish.OAuthClientsApigetOAuthClientByClientIdGET /api/v1.0/oauthclients/{clientId}Get OAuth client by identifier
Flipdish.OAuthClientsApigetOAuthClientSecretGET /api/v1.0/oauthclients/{clientId}/secretGet OAuth client secret key
Flipdish.OAuthClientsApigetOAuthClientsGET /api/v1.0/oauthclientsGet all OAuth client
Flipdish.OAuthClientsApigetOauthAccessTokenGET /api/v1.0/oauthclients/{oAuthClientId}/accesstokenGet OAuth access token for client
Flipdish.OAuthClientsApigetRedirectUrisGET /api/v1.0/oauthclients/{oAuthClientId}/redirecturisGet OAuth client redirect uris
Flipdish.OAuthClientsApiremoveRedirectUriDELETE /api/v1.0/oauthclients/{oAuthClientId}/redirecturis/{uriId}Delete OAuth client redirect uri
Flipdish.OrdersApiacceptOrderPOST /api/v1.0/orders/{id}/acceptAccept order
Flipdish.OrdersApigetOrderByIdGET /api/v1.0/orders/{id}Get order by ID
Flipdish.OrdersApigetOrdersGET /api/v1.0/ordersGet orders by filter
Flipdish.OrdersApirefundOrderPOST /api/v1.0/orders/{id}/refundRefund order
Flipdish.OrdersApirejectOrderPOST /api/v1.0/orders/{id}/rejectReject order
Flipdish.StoresApigetStoreByIdGET /api/v1.0/stores/{storeId}Get store by identifier
Flipdish.StoresApigetStoresGET /api/v1.0/storesGet all stores
Flipdish.UsersApigetRolesGET /api/v1.0/users/rolesGet role names
Flipdish.VouchersApideleteVoucherMetadataDELETE /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key}Delete voucher metadata
Flipdish.VouchersApigetVoucherByIdGET /api/v1.0/vouchers/{voucherId}Get voucher by identifier
Flipdish.VouchersApigetVoucherMetadataGET /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadataGet voucher metadata
Flipdish.VouchersApigetVoucherMetadata_0GET /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key}Get voucher metadata
Flipdish.VouchersApigetVouchersGET /api/v1.0/vouchersGet vouchers
Flipdish.VouchersApisetVoucherMetadataPUT /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key}Add voucher metadata
Flipdish.WebhooksApicraeteWebhookSubscriptionPOST /api/v1.0/webhooks/{clientId}/subscriptionsCreate a webhook subscription for you Oauth client
Flipdish.WebhooksApicreateWebhookSubscriptionEventNamesPOST /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/events/{eventName}Add event name to your webhook subscription
Flipdish.WebhooksApideleteWebhookSubscriptionDELETE /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}Delete you webhook subscription
Flipdish.WebhooksApideleteWebhookSubscriptionEventNameDELETE /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/events/{eventName}Remove event name to your webhook subscription
Flipdish.WebhooksApigetWebhookEventNamesGET /api/v1.0/webhooks/eventsGet all webhook subscription event names
Flipdish.WebhooksApigetWebhookEventNamesBySubscriptionIdGET /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/eventsGet your webhook subscriptions selected event names
Flipdish.WebhooksApigetWebhookLogsGET /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/logsGet logs for your webhook subscription
Flipdish.WebhooksApigetWebhookSubscriptionsGET /api/v1.0/webhooks/{clientId}/subscriptionsGet all webhook subscriptions by your Oauth client id
Flipdish.WebhooksApiupdateWebhookSubscriptionPUT /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}Update a webhook subscription object

Documentation for Models

Documentation for Authorization

oauth2

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://app.getflipdish.com/identity/connect/authorize
  • Scopes:
    • api: Access to Flipdish API
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free