Skip to content

Instantly share code, notes, and snippets.

@tapanpandita
Last active May 18, 2016 09:33
Show Gist options
  • Save tapanpandita/ad21cbcd3d931e58227486c41f2b2647 to your computer and use it in GitHub Desktop.
Save tapanpandita/ad21cbcd3d931e58227486c41f2b2647 to your computer and use it in GitHub Desktop.
var hypertrack = require('hypertrack')('<SECRET_KEY>');
// Create a new customer and then a new destination for that customer:
hypertrack.customers.create({
name: 'Tapan Pandita',
email: 'support@hypertrack.io'
}).then(function(customer) {
return hypertrack.destination.create({
customer_id: customer.id,
address: '270 Linden Street',
city: 'San Francisco',
country: 'US'
});
}).then(function(destination) {
console.log(destination);
}).catch(function(err) {
// Deal with an error
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment