Updating Data

Updating Data

Updates records that match key/value pairs provided

GET https://example.mydomain.com/api/update-records-by-matching-values

Request Body

Name
Type
Description

blocId*

integer

The ID of the bloc you want to update data in. This is the last number in the URL of the bloc, in this example it is 1234: https://example.mydomain.com/module/module-name/bloc/1234

fieldsToUpdate

object

searchItems

object

{
    "updated_record_ids": [
        1223259
    ]
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://example.mydomain.com/api/update-records-by-matching-values',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "blocId": "1234",
    "fieldsToUpdate" : {
        "employee_name" : "Jane Doe",
        "more_infor" : "More Info"
    },
    "searchItems": {
        "employee_id": "12345"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer [AUTHTOKEN]',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Last updated