Skip to content
Get started

Update a document summary

client.DocumentSummaries.Update(ctx, id, body) (*DocumentSummary, error)
put/document-summaries/{id}

Update an existing document summary

ParametersExpand Collapse
id string
body DocumentSummaryUpdateParams
DisplayName param.Field[string]optional

Display name for the summary

minLength1
EntryMode param.Field[DocumentSummaryEntryMode]optional

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

Summary param.Field[string]optional

The summary text content

SummaryFormat param.Field[DocumentSummaryFormat]optional

Format of the summary content

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"
Update a document summary
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.Update(
    context.TODO(),
    "id",
    withluminary.DocumentSummaryUpdateParams{

    },
  )
  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"
}