Pure data (POST, PUT)

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

{
    "data": [
        {
            "Pcode": "9999",
            "Locality": "A New Location"
        }
    ]
}
Example JSON format HTTP POST message.

http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.json

{
    "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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us