Placing pure XML, JSON (or your custom format) as the message body of a HTTP POST or PUT is the best method to submit large amounts of data to RESTfm.

Advantages

  • No additional data encoding or escaping required.
  • No limit to data size.
  • No clashing of name space for field names that begin with 'RFM'.
  • Support for bulk operations where multiple records may be included in the one HTTP transaction.

Optional parameters

RFMformat=<name>

Enforce submitted data format if it is not properly detected.
    OR
Allow mixed format transactions where the submitted format differs from the response format.

Examples

Layout URI - JSON - POST Message

1
2
3
4
5
6
7
8
{
    "data": [
        {
            "Pcode": "9999",
            "Locality": "A New Location"
        }
    ]
}
Example JSON format HTTP POST message.

Layout URI - JSON - POST Response

http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
    "data": [
        {
            "Pcode": "9999",
            "Locality": "A New Location",
            "State": "",
            "Comments": ""
        }
    ],
    "meta": [
        {
            "recordID": "5884344",
            "href": "\/RESTfm\/postcodes\/layout\/brief%20postcodes\/5884344.json"
        }
    ],
    "info": {
        "X-RESTfm-Version": "2.0.1\/r280",
        "X-RESTfm-Protocol": "4",
        "X-RESTfm-Status": 201,
        "X-RESTfm-Reason": "Created",
        "X-RESTfm-Method": "POST"
    }
}
Example JSON format HTTP POST response.