From ba706b3a9fe66e07049312eb1edc3c8b20e48646 Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Tue, 29 May 2012 16:28:35 +1000 Subject: [PATCH] update api docs --- APIFolder/api.htm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/APIFolder/api.htm b/APIFolder/api.htm index bdfa1a5c7..ec79219f2 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -275,8 +275,10 @@ var jqxhr = $.ajax({

Updating Dates and Numbers

Dates

-

When updating dates you need to provide the "dateFormat". This can be any date pattern supported by Joda-Time. - This helps when saving data in your client application as you shouldn't need to do any date format conversion.

+

Dates are returned in GET requests as an array e.g. [ 2007, 4, 11]. However, they are sent as strings in POST and PUT requests. + If there are any dates in your POST or PUT requests, you need to provide the "dateFormat". + This can be any date pattern supported by Joda-Time. + This capability can help you when saving data in your client application as you shouldn't need to do any date format conversion prior to issuing your POST or PUT request.

JSON examples: { @@ -289,17 +291,19 @@ JSON examples: }

Numbers

-

When updating dates you need to provide the "dateFormat". This can be any date pattern supported by Joda-Time. - This helps when saving data in your client application as you shouldn't need to do any date format conversion.

+

Similar to dates above, if you format numbers based on a "locale" in your User Interface you need to provide the "locale" when updating.. JSON examples: { - "dateFormat": "dd MMMM yyyy", - "openingDate": "01 July 2007" +"locale": "en-us", +"principal": "240 400.88" } { - "dateFormat": "yyyy-MM-dd", - "openingDate": "2007-03-21" +"locale": "fr-CH", +"principal": "240 400.88" +} +{ +"principal": "240400.88" }