Skip to content

Get enrichment run status

client.EnrichmentRun.GetEnrichmentRun(ctx, runID) (*EnrichmentRunGetEnrichmentRunResponse, error)
GET/v1/enrichmentRun/{runId}

Returns the status of an enrichment run by its ID.

Required scopes: contacts:read for a contact run, accounts:read for an account run

Rate limit category: Read

ParametersExpand Collapse
runID string

The enrichment run ID.

ReturnsExpand Collapse
type EnrichmentRunGetEnrichmentRunResponse struct{…}
ID string

The enrichment run ID.

CompletedAt string

When the run finished, or null while it is still open.

CreatedAt string
EntityID string

The ID of the record being enriched.

EntityType EnrichmentRunGetEnrichmentRunResponseEntityType

The type of record being enriched.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseEntityTypeContact EnrichmentRunGetEnrichmentRunResponseEntityType = "contact"
const EnrichmentRunGetEnrichmentRunResponseEntityTypeAccount EnrichmentRunGetEnrichmentRunResponseEntityType = "account"
StartedAt string

When the run began executing, or null while it is queued.

Status EnrichmentRunGetEnrichmentRunResponseStatus

Where the run is: queued and running are in flight; completed, failed and timed_out are final.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseStatusQueued EnrichmentRunGetEnrichmentRunResponseStatus = "queued"
const EnrichmentRunGetEnrichmentRunResponseStatusRunning EnrichmentRunGetEnrichmentRunResponseStatus = "running"
const EnrichmentRunGetEnrichmentRunResponseStatusCompleted EnrichmentRunGetEnrichmentRunResponseStatus = "completed"
const EnrichmentRunGetEnrichmentRunResponseStatusFailed EnrichmentRunGetEnrichmentRunResponseStatus = "failed"
const EnrichmentRunGetEnrichmentRunResponseStatusTimedOut EnrichmentRunGetEnrichmentRunResponseStatus = "timed_out"
TargetFields []string

The fields this run set out to fill.

Trigger EnrichmentRunGetEnrichmentRunResponseTrigger

What started the run: creation when the record was created, manual when requested through the API.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseTriggerCreation EnrichmentRunGetEnrichmentRunResponseTrigger = "creation"
const EnrichmentRunGetEnrichmentRunResponseTriggerManual EnrichmentRunGetEnrichmentRunResponseTrigger = "manual"
UpdatedAt string

Get enrichment run status

package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  enrichmentRunGetEnrichmentRunResponse, err := client.EnrichmentRun.GetEnrichmentRun(context.TODO(), "runId")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", enrichmentRunGetEnrichmentRunResponse.ID)
}
{
  "id": "id",
  "completedAt": "completedAt",
  "createdAt": "createdAt",
  "entityId": "entityId",
  "entityType": "contact",
  "startedAt": "startedAt",
  "status": "queued",
  "targetFields": [
    "string"
  ],
  "trigger": "creation",
  "updatedAt": "updatedAt"
}
Returns Examples
{
  "id": "id",
  "completedAt": "completedAt",
  "createdAt": "createdAt",
  "entityId": "entityId",
  "entityType": "contact",
  "startedAt": "startedAt",
  "status": "queued",
  "targetFields": [
    "string"
  ],
  "trigger": "creation",
  "updatedAt": "updatedAt"
}