Skip to content

Update Multiple Items ​

Update multiple items at once.

Endpoint: PATCH /items/{collection}

Parameters ​

Path Parameters ​

NameTypeRequiredDescription
collectionstringYesUnique identifier of the collection

Query Parameters ​

NameTypeDescription
fieldsarrayControl which fields are returned in the response
limitintegerLimit the number of objects returned
offsetintegerNumber of items to skip
sortarrayCSV of fields to sort by
filterobjectFilter items by conditions
searchstringFilter items containing the search query
metastringSpecify what metadata to return

Request Body ​

json
{
  "data": {
    "keys": [1, 2, 3],
    "status": "published",
    "updated_by": 5
  }
}

The data object must contain:

  • keys (array): Array of item IDs to update
  • Any other fields: These will be merged into each specified item

Responses ​

200 OK ​

Items updated successfully. Returns the updated items:

json
{
  "data": [
    {
      "id": 1,
      "title": "Original Title",
      "status": "published",
      "updated_by": 5,
      ...
    },
    {
      "id": 2,
      "title": "Another Title",
      "status": "published",
      "updated_by": 5,
      ...
    },
    {
      "id": 3,
      "title": "Third Title",
      "status": "published",
      "updated_by": 5,
      ...
    }
  ],
  "meta": {}
}

401 Unauthorized ​

Authentication required.

404 Not Found ​

The specified collection does not exist.

Example Request ​

http
PATCH /items/articles HTTP/1.1
Host: your-domain.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
  "data": {
    "keys": [1, 2, 3],
    "status": "published"
  }
}

Notes ​

  • The keys array is required to identify which items to update
  • All fields in the data object (except keys) will be applied to every item
  • This is a partial update - only provided fields will be modified
  • To update items based on a query filter, use the query parameter approach
  • The operation is atomic - either all items are updated or none
  • Use the fields query parameter to control which fields are returned in the response
  • Consider rate limits when updating large numbers of items
  • System fields (like date_created) may not be updatable depending on configuration