Skip to content
Get started

Get a document summary by ID

client.DocumentSummaries.Get(ctx, id) (*DocumentSummary, error)
get/document-summaries/{id}

Retrieve a specific document summary

ParametersExpand Collapse
id string
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"
Get a document summary by ID
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"),
  )
  documentSummary, err := client.DocumentSummaries.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", documentSummary.ID)
}
{
  "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
{
  "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"
}