Skip to content
Browse all functions

Update or insert a row in a data table

datatables/upsertrow

Updates the rows that match the conditions; if none matches, inserts a new row. For the new row, eq conditions on columns that are not in the values are taken over (e.g. orderId eq A-17). Returns action (updated or inserted) and the rows. Parallel calls on the same table can overwrite each other (last write wins): in Make, process bundles one after another for writing functions.

Endpoint

POSThttps://api.1001fx.com/datatables/upsertrow
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json (no body)

Parameters

This function has no parameters.

Examples

Update or insert a row in a data table

Needs an API key of an account (not a test key).

Input

Expects a json body
{
  "table": "processed_orders",
  "filters": [
    {
      "column": "orderId",
      "condition": "eq",
      "value": "A-17"
    }
  ],
  "data": {
    "total": 49.9
  }
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/datatables/upsertrow' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"table":"processed_orders","filters":[{"column":"orderId","condition":"eq","value":"A-17"}],"data":{"total":49.9}}'

Try upsertrow now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.001.11.2026created