Skip to content

Latest commit

 

History

History
208 lines (136 loc) · 5.43 KB

DeliveryZoneApi.md

File metadata and controls

208 lines (136 loc) · 5.43 KB

Flipdish.DeliveryZoneApi

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

Method HTTP request Description
addDeliveryZone POST /api/v1.0/stores/{storeId}/deliveryzones
getDeliveryZones GET /api/v1.0/stores/{storeId}/deliveryzones
removeDeliveryZone DELETE /api/v1.0/stores/{storeId}/deliveryzones/{deliveryZoneId}
updateDeliveryZone POST /api/v1.0/stores/{storeId}/deliveryzones/{deliveryZoneId}

addDeliveryZone

RestApiResultDeliveryZone addDeliveryZone(storeId, deliveryZoneBase)

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.DeliveryZoneApi();
let storeId = 56; // Number | 
let deliveryZoneBase = new Flipdish.DeliveryZoneBase(); // DeliveryZoneBase | 
apiInstance.addDeliveryZone(storeId, deliveryZoneBase, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
storeId Number
deliveryZoneBase DeliveryZoneBase

Return type

RestApiResultDeliveryZone

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, Data

getDeliveryZones

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

Parameters

Name Type Description Notes
storeId Number

Return type

RestApiArrayResultDeliveryZone

Authorization

oauth2

HTTP request headers

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

removeDeliveryZone

removeDeliveryZone(storeId, deliveryZoneId)

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.DeliveryZoneApi();
let storeId = 56; // Number | 
let deliveryZoneId = 56; // Number | 
apiInstance.removeDeliveryZone(storeId, deliveryZoneId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
storeId Number
deliveryZoneId Number

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

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

updateDeliveryZone

RestApiResultDeliveryZone updateDeliveryZone(storeId, deliveryZoneId, deliveryZone)

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.DeliveryZoneApi();
let storeId = 56; // Number | 
let deliveryZoneId = 56; // Number | 
let deliveryZone = new Flipdish.DeliveryZoneBase(); // DeliveryZoneBase | 
apiInstance.updateDeliveryZone(storeId, deliveryZoneId, deliveryZone, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
storeId Number
deliveryZoneId Number
deliveryZone DeliveryZoneBase

Return type

RestApiResultDeliveryZone

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, Data