How to create a Guest api

// create guest

// POST http://apiv2.clickmeter.com/account/guests/

var model = {

   userName: "newtestguest@clickmeter.com",

   password: "biz1xo",

   key: "",

   email: "newtestguest@clickmeter.com",

   name: "newtestguest",

   notes: "",

   dateFormat: "dd/MM/yyyy",

   timeFormat: "1",

   decimalSeparator: ".",

   language: "en-US",

   timeZone: 0,

   timeframeMinDate: "",

   extendedGrants: {

       allowGroupCreation: false,

       allowAllGrants: false

   },

   groupGrants: 0,

   tlGrants: 0,

   tpGrants: 0,

   conversionOptions: {

       percentValue: "",

       percentCommission: "",

       hideCount: false,

       hideValue: false,

       hideComCost: false,

       hideCost: false,

       hideParams: false

   },

   hitOptions: {

       hideReferrer: false

   }

};

$.ajax({

   type: "POST",

   url: 'http://apiv2.clickmeter.com/account/guests/',

   dataType: 'json',

   data: JSON.stringify(model),

   headers: { "X-Clickmeter-AuthKey": 'API-KEY', "Content-type": "application/json" }

})

.successs(function (data) {

   // data: { id: 123, uri: '/account/guests/123' }

})

.error(function (jqXhr, textStatus, errorThrown) {

   //jqXhr.responseText - { errors: {errorMessage: 'some message', errorValue: 'property name'}}

});

Have more questions? Submit a request

0 Comments

Article is closed for comments.