Skip to content

Instantly share code, notes, and snippets.

@jakeleboeuf
Last active January 4, 2016 18:48
Show Gist options
  • Save jakeleboeuf/b7b414e00b756447ac9e to your computer and use it in GitHub Desktop.
Save jakeleboeuf/b7b414e00b756447ac9e to your computer and use it in GitHub Desktop.
Wartermarks Lab REST API call
watermarkslab.create({
firstName: 'Jake',
lastName: 'LeBoeuf',
email: 'bob@example.com',
address: '123 Howle ave',
city: 'Charleson',
state: 'SC',
zip: '12345',
cust_id: '124j9jlkj12l4kj1lkjf',
websiteauth: 'iirowjfijweijwoefkjlsdkjf',
password: '1234pass',
}, function(err, account) {
// asynchronously called
if(!err) {
console.log(account.firstName);
}
});
// Error message should look like this
error = {
status: 500,
message: 'Please provide a first name'
}
// Account Object should look like this
account = {
firstName: 'Jake',
lastName: 'LeBoeuf',
email: 'bob@example.com',
address: '123 Howle ave',
city: 'Charleson',
state: 'SC',
zip: '12345',
cust_id: '124j9jlkj12l4kj1lkjf',
websiteauth: 'iirowjfijweijwoefkjlsdkjf'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment