Discussions

Ask a Question
Back to All

Availability Post Issue

I'm having an issue with a availability post request. Every time I run the request below, I get a 409 error saying "RepeatType" has no value". I can't figure out what might be wrong. Any ideas? I'm using JavaScript for the program, specifically in Google Apps.

ximbleparameters = {
'startAt':'2021-05-29T00:00:00',
'endAt':'2021-05-29T16:00:00',
'employeeId':'27656900-553f-4641-afab-19858652913d',
'isCustom':false,
'repeat':{
'repeatType':2,
'repeatEndNever':true,
'monday':false,
'tuesday':false,
'wednesday':false,
'thursday':true,
'friday':false,
'saturday':false,
'sunday':false
},
'isRepeated':true
};

    ximbleoptions = {
      'method':'POST',
      'headers':ximbleheaders,
      'muteHttpExceptions':true,
      'payload':ximbleparameters
    };

    ximbleresponse = UrlFetchApp.fetch('https://api.ximble.com/availability',ximbleoptions);

    ximbledata = JSON.parse(ximbleresponse.getContentText());