Skip to content
Get started

Get summaries for a document

client.Documents.GetSummaries(ctx, id) (*DocumentGetSummariesResponse, error)
get/documents/{id}/document-summaries

Retrieve all summaries associated with a specific document

ParametersExpand Collapse
id string
ReturnsExpand Collapse
type DocumentGetSummariesResponse 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"
Get summaries for a document
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"),
  )
  response, err := client.Documents.GetSummaries(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Data)
}
{
  "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"
    }
  ]
}
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"
    }
  ]
}