## 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](/using-the-api/scopes/):** `contacts:read` for a contact run, `accounts:read` for an account run

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Parameters

- `runID string`

  The enrichment run ID.

### Returns

- `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.

    - `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.

    - `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.

    - `const EnrichmentRunGetEnrichmentRunResponseTriggerCreation EnrichmentRunGetEnrichmentRunResponseTrigger = "creation"`

    - `const EnrichmentRunGetEnrichmentRunResponseTriggerManual EnrichmentRunGetEnrichmentRunResponseTrigger = "manual"`

  - `UpdatedAt string`

### Example

```go
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)
}
```

#### Response

```json
{
  "id": "id",
  "completedAt": "completedAt",
  "createdAt": "createdAt",
  "entityId": "entityId",
  "entityType": "contact",
  "startedAt": "startedAt",
  "status": "queued",
  "targetFields": [
    "string"
  ],
  "trigger": "creation",
  "updatedAt": "updatedAt"
}
```
