Page 1 of 1

setRoomDates - putInventories

Posted: Sun Feb 12, 2017 7:30 pm
by giokaz
Hi,

setRoomDates JSON and putInventories XML send more or less the same data. Is any advantage of which one to use. I noticed that XML takes dates range, so it will reduce the data size. Any other advantage?

Also although instructions say that the XML to send via putInventories must have the same format as the getInventories, I noticed that date format in put must be in format YYYYMMDD while in get is in YYYY-MM-DD otherwise it returns an error message. Is it so?

Regards

Re: setRoomDates - putInventories

Posted: Tue Mar 14, 2017 9:45 am
by markkinchin
giokaz wrote:I noticed that date format in put must be in format YYYYMMDD while in get is in YYYY-MM-DD otherwise it returns an error message. Is it so?
YYYY-MM-DD is the correct format although YYYYMMDD should also work. Your error must be related to something else.

The XML functions use the account Username/Password for authentication

The JSON uses an APIKEY and PROPKEY, this has the advantage of not being dependant on a password which may change.

Otherwise the choice of JSON or XML is up to you, there are small differences between the way they return data so choose the one which suits your needs best.