Skip to content

Latest commit

 

History

History
210 lines (138 loc) · 5.57 KB

CustomersApi.md

File metadata and controls

210 lines (138 loc) · 5.57 KB

Flipdish.CustomersApi

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

Method HTTP request Description
createCustomer POST /api/v1.0/{appId}/customers
getCustomerById GET /api/v1.0/{appId}/customers/{customerId}
getCustomers GET /api/v1.0/{appId}/customers
updateCustomerById POST /api/v1.0/{appId}/customers/{customerId}

createCustomer

RestApiResultCustomer createCustomer(appId, customerCreateModel)

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.CustomersApi();
let appId = "appId_example"; // String | 
let customerCreateModel = new Flipdish.CustomerCreateModel(); // CustomerCreateModel | 
apiInstance.createCustomer(appId, customerCreateModel, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String
customerCreateModel CustomerCreateModel

Return type

RestApiResultCustomer

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

getCustomerById

RestApiResultCustomer getCustomerById(appId, customerId)

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

Parameters

Name Type Description Notes
appId String
customerId Number

Return type

RestApiResultCustomer

Authorization

oauth2

HTTP request headers

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

getCustomers

RestApiResultCustomers getCustomers(appId, phoneNumber)

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

Parameters

Name Type Description Notes
appId String
phoneNumber String

Return type

RestApiResultCustomers

Authorization

oauth2

HTTP request headers

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

updateCustomerById

RestApiResultCustomer updateCustomerById(appId, customerId, updateCustomer)

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

Parameters

Name Type Description Notes
appId String
customerId Number
updateCustomer CustomerUpdateModel

Return type

RestApiResultCustomer

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, Message, ErrorCode, StackTrace