POST
/
api
/
v1
/
documents
/
list
curl --request POST \
  --url https://api.fieldwise.ai/api/v1/documents/list \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "latest_only": true,
  "limit": 10,
  "metadata_filter": {
    "$and": [
      {
        "category": "finance"
      },
      {
        "tags": {
          "$contains": [
            "important"
          ]
        }
      },
      {
        "$or": [
          {
            "priority": {
              "$gt": 2
            }
          },
          {
            "status": "active"
          }
        ]
      }
    ]
  },
  "offset": 0,
  "sort_field": "last_created_at",
  "sort_order": "desc"
}'
{
  "success": true,
  "data": {
    "documents": [
      {
        "id": 123,
        "external_id": "<string>",
        "file_path": "<string>",
        "document_metadata": {},
        "created_at": "2023-11-07T05:31:56Z",
        "preview": "<string>"
      }
    ],
    "total": 123,
    "offset": 123,
    "limit": 123
  },
  "error": {
    "error_code": "RESOURCE_NOT_FOUND",
    "message": "Resource not found"
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "version": "1.0"
  }
}

Authorizations

X-API-Key
string
header
required

Headers

X-API-Key
string | null

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.