Update records

Add, update, or delete one or more records.

The request can include up to 10 changes that are applied together.

When adding or updating records, fields objects should contain the new field values, with the field's id or code as the property name.

Request

POST https://www.activityinfo.org/resources/update

Request body

application/json

object
changes array[object] required

Response

Status Code Error Code Description
401 AUTHENTICATION_REQUIRED The request must be authenticated

Example

curl -X POST https://www.activityinfo.org/resources/update \
  -u anything:APITOKEN \
  -H 'Content-type: application/json' \
  --data-binary @- << EOF
{
  "changes": [
    {
      "formId": "ck8oyloog8",
      "recordId": "ck34ujs6v8",
      "parentRecordId": null,
      "deleted": true,
      "fields": null
    },
    {
      "formId": "cdznrnclh1x8y8s7",
      "recordId": "ci8l8aqlh1x8y8s8",
      "parentRecordId": null,
      "deleted": false,
      "fields": {
        "c2cs0e2lh1x8y8s9": "Simple text value",
        "cd0rp6jlh1x8y8sa": {
          "prefix": "AA",
          "number": 3423
        },
        "ccfwl4mlh1x8y8sb": 42.5,
        "clgbgivlh1x8y8sc": [
          "cvzu2o9lh1x8y8td",
          "cl9bepplh1x8y8te"
        ],
        "ce0x7gwlh1x8y8xf": {
          "latitude": 52.0705,
          "longitude": -4.3007
        },
        "csiiat3lh1x8y8yg": "ck8oyloog8:ck34ujs6v8",
        "cxpdo82lh1x8y8yh": "2019-12-31",
        "c896oiplh1x8y8yi": [
          {
            "mimeType": "application/pdf",
            "width": 0,
            "height": 0,
            "filename": "annual_report.pdf",
            "blobId": "xqp44flh1x8y8zj"
          }
        ]
      }
    }
  ]
}
EOF
Next item
Update report