Documentation
  • 👋Welcome to Documentation
  • 📖Glossary
  • ❓FAQs
  • General
    • Getting set up
      • Single-user organization
      • Multi-user organization
    • Supported Document Types
  • Platform Walkthrough
    • Dashboard
    • Queue
    • Configuration
    • Supervision
  • User guide How Tos
    • User Management
      • How to invite a new user to the platform?
      • How can I manage existing users?
    • Processes
      • How to create a supervised process or use the template?
      • How to create a custom process?
    • Supervision
      • How to add, assign, and remove annotations?
      • How to edit the value of the extraction?
      • How to open and edit a table mask?
      • How to open, edit, or remove the extracted table?
      • How to export your data via Supervision?
      • How to copy values and tables?
    • Upload
    • Converters
    • Data points definition
    • Data Export
    • Table Data Extraction
    • Enrichment
    • Generating new API key
  • Integrations
    • Zapier Integration
      • Quickstart
      • Alphamoon as a Trigger
      • Alphamoon as an Action
    • Google Sheets - Export
  • Features
    • Continuous Learning (Beta)
    • Document Splitting
  • API
    • Introduction
    • Quickstart
    • Organization API keys (Beta)
    • Process API keys (Beta)
    • Authenticating
    • Versioning
    • Get results
    • Get OCR results
    • Get processes
    • Get process types
    • Get collections
    • Metadata
      • Setting metadata value
    • Upload File
    • Export
    • Download original files
    • Delete collection
    • Reset process configuration
  • Resources
    • 💻Alphamoon Website
Powered by GitBook
On this page
  1. API

Get collections

A quick guide on how to get collections via API

PreviousGet process typesNextMetadata

Last updated 1 year ago

To get collections via API, a user needs to get the process_id from one of the following sources:

  • endpoint

  • Create process endpoint

  • URL e.g. https://workspace.alphamoon.ai/queue/2080d36bf94c4147b2e543104342fc2f

The following endpoint returns the list of collections along with collection_ids:

Get collections

GET /api/v0.3/processes/{process_id}/collections

Path Parameters

Name
Type
Description

process_ID*

String

Query Parameters

Name
Type
Description

limit

String

order

String

query

String

date_from

String

date_to

String

priority

String

status

String

metadata

JSON

{
  "collections": [
    {
      "id": "5c8c5791635c44c4b74e08fd5e79163c",
      "name": "Invoice example.pdf",
      "files": [
        {
          "id": "b59ef112be5641cdadf9f9e81a13f0d6",
          "collectionId": "5c8c5791635c44c4b74e08fd5e79163c",
          "name": "Invoice example.pdf",
          "status": "Needs Review",
          "progress": 100,
          "numberOfPages": 1,
          "createdAt": "2023-07-13T12:16:33Z",
          "updatedAt": "2023-07-13T12:16:48Z",
          "metadata": {}
        }
      ],
      "priority": false,
      "split": false,
      "status": "Needs Review",
      "progress": 100,
      "numberOfPages": 1,
      "processId": "93580f176efb48cda64f25cba74d8ca4",
      "createdAt": "2023-07-13T12:16:33Z",
      "updatedAt": "2023-07-13T12:16:48Z",
      "metadata": {}
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 100,
    "total": 1
  }
} 
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/processes/93580f176efb48cda64f25cba74d8ca4/collections?offset=0&limit=100&order=created_date%3Adesc' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'
{
  "collections": [
    {
      "id": "5c8c5791635c44c4b74e08fd5e79163c",
      "name": "Invoice example.pdf",
      "files": [
        {
          "id": "b59ef112be5641cdadf9f9e81a13f0d6",
          "collectionId": "5c8c5791635c44c4b74e08fd5e79163c",
          "name": "Invoice example.pdf",
          "status": "Needs Review",
          "progress": 100,
          "numberOfPages": 1,
          "createdAt": "2023-07-13T12:16:33Z",
          "updatedAt": "2023-07-13T12:16:48Z",
          "metadata": {}
        }
      ],
      "priority": false,
      "split": false,
      "status": "Needs Review",
      "progress": 100,
      "numberOfPages": 1,
      "processId": "93580f176efb48cda64f25cba74d8ca4",
      "createdAt": "2023-07-13T12:16:33Z",
      "updatedAt": "2023-07-13T12:16:48Z",
      "metadata": {}
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 100,
    "total": 1
  }
}

See next:

Get process
es