Skip to content

Latest commit

 

History

History
216 lines (144 loc) · 5.98 KB

LocationAreasApi.md

File metadata and controls

216 lines (144 loc) · 5.98 KB

Flipdish.LocationAreasApi

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

Method HTTP request Description
createLocationArea POST /api/v1.0/{appId}/stores/{storeId}/location-areas
getLocationArea GET /api/v1.0/{appId}/stores/{storeId}/location-areas/{locationAreaId}
getLocationAreasForStore GET /api/v1.0/{appId}/stores/{storeId}/location-areas
updateLocationArea POST /api/v1.0/{appId}/stores/{storeId}/location-areas/{locationAreaId}/update

createLocationArea

Object createLocationArea(appId, storeId, locationAreaInput)

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.LocationAreasApi();
let appId = "appId_example"; // String | 
let storeId = 56; // Number | 
let locationAreaInput = new Flipdish.CreateLocationArea(); // CreateLocationArea | 
apiInstance.createLocationArea(appId, storeId, locationAreaInput, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String
storeId Number
locationAreaInput CreateLocationArea

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

getLocationArea

RestApiResultLocationAreaWithLocations getLocationArea(locationAreaId, appId, storeId)

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.LocationAreasApi();
let locationAreaId = 56; // Number | 
let appId = "appId_example"; // String | 
let storeId = 56; // Number | 
apiInstance.getLocationArea(locationAreaId, appId, storeId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
locationAreaId Number
appId String
storeId Number

Return type

RestApiResultLocationAreaWithLocations

Authorization

oauth2

HTTP request headers

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

getLocationAreasForStore

RestApiArrayResultLocationAreaWithLocations getLocationAreasForStore(appId, storeId)

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.LocationAreasApi();
let appId = "appId_example"; // String | 
let storeId = 56; // Number | 
apiInstance.getLocationAreasForStore(appId, storeId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String
storeId Number

Return type

RestApiArrayResultLocationAreaWithLocations

Authorization

oauth2

HTTP request headers

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

updateLocationArea

RestApiResultLocationArea updateLocationArea(appId, storeId, locationAreaId, locationAreaInput)

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.LocationAreasApi();
let appId = "appId_example"; // String | 
let storeId = 56; // Number | 
let locationAreaId = "locationAreaId_example"; // String | 
let locationAreaInput = new Flipdish.UpdateLocationArea(); // UpdateLocationArea | 
apiInstance.updateLocationArea(appId, storeId, locationAreaId, locationAreaInput, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String
storeId Number
locationAreaId String
locationAreaInput UpdateLocationArea

Return type

RestApiResultLocationArea

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