Skip to content
Get started

List all document summaries

client.DocumentSummaries.List(ctx, query) (*CursorPagination[DocumentSummary], error)
get/document-summaries

Retrieve a paginated list of document summaries using cursor-based pagination

ParametersExpand Collapse
query DocumentSummaryListParams
After param.Field[string]optional

Cursor for forward pagination. Returns items after this cursor.

Before param.Field[string]optional

Cursor for backward pagination. Returns items before this cursor.

DocumentID param.Field[string]optional

Filter summaries by document ID

HouseholdID param.Field[string]optional

Filter summaries by household ID

Limit param.Field[int64]optional

Maximum number of items to return

maximum1000
minimum1
ReturnsExpand Collapse
type DocumentSummary struct{…}
ID string

Unique identifier for the document summary

CreatedAt Time

Timestamp when the summary was created

formatdate-time
DisplayName string

Display name for the summary

DocumentID string

ID of the document this summary belongs to

HouseholdID string

ID of the household this summary belongs to

Summary string

The summary text content

UpdatedAt Time

Timestamp when the summary was last updated

formatdate-time
EntryMode DocumentSummaryEntryModeoptional

Indicates if the summary was AI-generated or user-entered

Accepts one of the following:
const DocumentSummaryEntryModeAIAuto DocumentSummaryEntryMode = "AI_AUTO"
const DocumentSummaryEntryModeUser DocumentSummaryEntryMode = "USER"
SummaryFormat DocumentSummaryFormatoptional

Format of the summary content

Accepts one of the following:
const DocumentSummaryFormatMarkdown DocumentSummaryFormat = "MARKDOWN"
const DocumentSummaryFormatPlainText DocumentSummaryFormat = "PLAIN_TEXT"
List all document summaries
package main

import (
  "context"
  "fmt"

  "github.com/withluminary/go-sdk"
  "github.com/withluminary/go-sdk/option"
)

func main() {
  client := withluminary.NewClient(
    option.WithClientID("My Client ID"),
    option.WithClientSecret("My Client Secret"),
  )
  page, err := client.DocumentSummaries.List(context.TODO(), withluminary.DocumentSummaryListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "data": [
    {
      "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "created_at": "2019-12-27T18:11:19.117Z",
      "display_name": "Default summary",
      "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "summary": "summary",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "entry_mode": "AI_AUTO",
      "summary_format": "MARKDOWN"
    }
  ],
  "page_info": {
    "has_next_page": true,
    "has_previous_page": false,
    "end_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9",
    "start_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9"
  },
  "total_count": 100
}
Returns Examples
{
  "data": [
    {
      "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "created_at": "2019-12-27T18:11:19.117Z",
      "display_name": "Default summary",
      "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "summary": "summary",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "entry_mode": "AI_AUTO",
      "summary_format": "MARKDOWN"
    }
  ],
  "page_info": {
    "has_next_page": true,
    "has_previous_page": false,
    "end_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9",
    "start_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9"
  },
  "total_count": 100
}