Update collection

A quick guide on how to update collection by ID, using the Alphamoon API

To update collection via API, get the collection_id of the processed file from:

  • Upload a file endpoint (Base64 or Binary)

  • Get collections endpoint

  • URL e.g. https://workspace.alphamoon.ai/supervision/223742cc9bca43fd81b2d41b0018e4c7

Use the following endpoint to update the collection:

Update collection by ID

PATCH /api/v0.3/collections/{collection_id}

Path parameters

NameTypeDescription

collection-id*

String

The ID of the collection

{
  "id": "c0da3bd0798e4549a1eb673887258dd3",
  "name": "Invoices_2023.pdf",
  "files": [
    {
      "id": "c4f70139d07e4b7abbd7162ecc34860c",
      "collectionId": "c0da3bd0798e4549a1eb673887258dd3",
      "name": "Invoices_2023.pdf",
      "status": "Needs Review",
      "progress": 100,
      "numberOfPages": 4,
      "createdAt": "2024-01-09T10:20:31Z",
      "updatedAt": "2024-01-09T10:21:32Z",
      "metadata": {}
    }
  ],
  "priority": false,
  "split": false,
  "status": "Needs Review",
  "progress": 100,
  "numberOfPages": 4,
  "processId": "93580f176efb48cda64f25cba74d8ca4",
  "createdAt": "2024-01-09T10:20:31Z",
  "updatedAt": "2024-04-03T15:35:05Z",
  "metadata": {},
  "availableForTraining": true,
  "duplicates": []
}

See the example:

curl -X 'PATCH' \
  'https://workspace.alphamoon.ai/api/v0.3/collections/c0da3bd0798e4549a1eb673887258dd3' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED' \
  -H 'Content-Type: application/json' \
  -d '{
  "metadata": {}
}'

See next:

Last updated

#26: Update: API scopes & Google Sheets Export

Change request updated