zoho-integration-quickstart

node v10.24.1
version: 4.0.0
endpointsharetweet
require("axios/package.json"); // axios is a peer dependency. const OrderCloudSDK = require("ordercloud-javascript-sdk") const clientID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // your clientID const clientSecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' // your secret const scope = ['OrderReader']; OrderCloudSDK.Configuration.Set({     baseApiUrl: 'https://stagingapi.ordercloud.io' }) const auth = await OrderCloudSDK.Auth.ClientCredentials(clientSecret, clientID, scope) OrderCloudSDK.Tokens.SetAccessToken(auth.access_token) const orderList = await OrderCloudSDK.Orders.List('Incoming', { filters: {'FromUser.Email': 'tjgarre@gmail.com'}}) const firstOrder = orderList.Items[0]; console.log(JSON.stringify(firstOrder, null, 4))
Loading…

no comments

    sign in to comment