Update Records

 

Updates details of multiple records in an App, by specifying their record numbers, or their unique keys.
Method PUT
URL https://{subdomain}.kintone.com/k/v1/records.json
URL(guest space) https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/records.json
Authentication API Token Authentication , Password Authentication
Content-Type application/json

Permissions

  • Permission to update records into the App is needed.
  • Permission to update fields that are included in the request parameters are needed.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer or String Yes The App ID.
records Array of Objects Yes Holds an array of objects that include id/updateKey, revision and record objects.
records[].id Integer or String Conditionally Required The Record ID of the record to be updated. Required, if updateKey will not be specified.
records[].updateKey Object Conditionally Required The unique key of the record to be updated. Required, if id will not be specified. To specify this field, the field must have the "Prohibit duplicate values" option turned on.
records[].updateKey.field String Conditionally Required The field code of the unique key. Required, if updateKey will be specified.
records[].updateKey.value Integer or String Conditionally Required The value of the unique key. Required, if updateKey will be specified.
records[].revision Integer or String Optional The expected revision number. If the value does not match, an error will occur and all records will not be updated. If the value is not specified or is -1, the revision number will not be checked.
records[].record Object Optional Field codes and values are specified in this object. If ignored, the record will not be updated. For field type specs, check the Field Types page.

Sample Request (id)

JavaScript (using Kintone REST API Request)

curl Sample

Sample Request (updateKey)

JavaScript (using Kintone REST API Request)

curl Sample

Response Parameters

Parameter Type Description
ids Array of String The Record IDs of the created Record.
revisions Array of String The revision numbers of the Record.

Sample Response

Attachment fields and Tables

Updating and deleting files on attachment fields

If you want to add new file to an attachment field that already has several files attached to it, you will need to specify the fileKeys of those files in the request. You cannot update a specific attachment file.
If a fileKey is not specified in the request, the files will be deleted.

Updating tables

If data of the tables are not included in the request, the table data will stay as it is.
If table data is included in the request, take note of the following:

  • All fields inside the table that are not included in the request will be deleted.
  • To keep specific data of fields in the table, the value of that field must be included in the request.
  • By specifying the ID of a table row (the ID can be retrieved by using the Get Record API), specific rows and fields can be updated.
  • If a table row ID that does not exist is specified, the row will be added as a new row. In this case, rows that exist in the table but were not specified in the API, will be deleted.

Limitations

  • The maximum number of records that can be update is 100.
  • If there are fields with the "Required field" option turned on and those fields hold no values (which could occur in cases where the App form was updated after some records were added to the App), those fields must be included in the request.
  • If the Update Records API fails, all updates will be canceled and no records will be updated.
  • The following fields cannot be updated:
    • The Field Mappings targets of the Lookup field
    • Status
    • Categories
    • Calculated
    • Assignee
    • Record number
    • Created by
    • Created datetime
    • Updated by
    • Updated datetime
  • If fields that do not exists inside the App are specified in the requests, these fields will be ignored.
  • If Calculated fields are specified values in the request, these values will be ignored.
  • If Text fields with the "Calculate automatically" option are specified values in the request, these values will be ignored.
  • Fields specified as the updateKey cannot be updated.
  • For other limitations, please check the Limitations on this page.
Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!