Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// create the association object with the final data
associations = {
"elements": elements
// create all of the associations
url: ''+process.env.CLOVER_MERCHANT_ID+'/category_items',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + _accessToken
body: JSON.stringify(associations)
}, function(error, response, body){
console.log('DEBUG[CLOVER]: Creating all associations for items in ' + categoryId + ' for ' + elements.length + ' items.');
if(error) {
console.log('ERROR[CLOVER]: Could not create all associations for category items in: '+categoryId);
} else {
console.log('DEBUG[CLOVER]: Made clover callout to create all category association successfully for: '+categoryId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.