Skip to content

Retrieve a sequence enrollment

client.Sequence.GetEnrollment(ctx, enrollmentID, query) (*SequenceRetrieveEnrollmentResponse, error)
GET/v1/sequences/{id}/enrollments/{enrollmentId}

Retrieves a single enrollment by its ID: the contact’s position in the cadence and its latest activity. Test-run enrollments are not returned.

Required scope: sequences:read

Rate limit category: Read

ParametersExpand Collapse
enrollmentID string

Unique identifier of the enrollment to retrieve.

query SequenceGetEnrollmentParams
ID param.Field[string]

Unique identifier of the sequence.

ReturnsExpand Collapse
type SequenceRetrieveEnrollmentResponse struct{…}
ID string

Unique identifier of the enrollment.

CancelledAt string

When the enrollment was cancelled, or null if it was not.

CompletedAt string

When the enrollment completed, or null if it has not.

ContactID string

ID of the enrolled contact.

CurrentStepID string

ID of the step the contact is on, matching definition.steps; null when the contact has no current step the API returns.

EnrolledAt string

When the contact was enrolled.

EnrolledBy string

Member ID of whoever enrolled the contact; null when they are no longer a member or the enrollment was automatic.

LastActivityAt string

When lastActivityKind happened; null when there has been no activity.

LastActivityKind SequenceRetrieveEnrollmentResponseLastActivityKind

The latest activity on the enrollment. A reply or bounce that ended the enrollment is reported over a later open.

One of the following:
const SequenceRetrieveEnrollmentResponseLastActivityKindSent SequenceRetrieveEnrollmentResponseLastActivityKind = "SENT"
const SequenceRetrieveEnrollmentResponseLastActivityKindOpened SequenceRetrieveEnrollmentResponseLastActivityKind = "OPENED"
const SequenceRetrieveEnrollmentResponseLastActivityKindReplied SequenceRetrieveEnrollmentResponseLastActivityKind = "REPLIED"
const SequenceRetrieveEnrollmentResponseLastActivityKindBounced SequenceRetrieveEnrollmentResponseLastActivityKind = "BOUNCED"
const SequenceRetrieveEnrollmentResponseLastActivityKindInvited SequenceRetrieveEnrollmentResponseLastActivityKind = "INVITED"
const SequenceRetrieveEnrollmentResponseLastActivityKindConnected SequenceRetrieveEnrollmentResponseLastActivityKind = "CONNECTED"
const SequenceRetrieveEnrollmentResponseLastActivityKindSeen SequenceRetrieveEnrollmentResponseLastActivityKind = "SEEN"
NextSendAt string

Estimated time of the next send, from the cadence, send window, pacing and sender; queue order and random gaps can push it later. Null while a message awaits review or is sending, while paused, or when it cannot be estimated.

RemainingSends int64

Email and LinkedIn steps not yet sent, connection requests included.

minimum-9007199254740991
maximum9007199254740991
RepliedAt string

When the contact first replied, on email or LinkedIn; null if they have not.

Status SequenceRetrieveEnrollmentResponseStatus

ACTIVE is progressing; AWAITING_REVIEW has a message waiting for approval; NEEDS_ATTENTION is held by a failed step, a held draft or an unavailable sender; PAUSED is stopped because the sequence is deactivated or it was paused in Lightfield. REPLIED, COMPLETED, CANCELLED and FAILED are final.

One of the following:
const SequenceRetrieveEnrollmentResponseStatusActive SequenceRetrieveEnrollmentResponseStatus = "ACTIVE"
const SequenceRetrieveEnrollmentResponseStatusAwaitingReview SequenceRetrieveEnrollmentResponseStatus = "AWAITING_REVIEW"
const SequenceRetrieveEnrollmentResponseStatusNeedsAttention SequenceRetrieveEnrollmentResponseStatus = "NEEDS_ATTENTION"
const SequenceRetrieveEnrollmentResponseStatusReplied SequenceRetrieveEnrollmentResponseStatus = "REPLIED"
const SequenceRetrieveEnrollmentResponseStatusCompleted SequenceRetrieveEnrollmentResponseStatus = "COMPLETED"
const SequenceRetrieveEnrollmentResponseStatusPaused SequenceRetrieveEnrollmentResponseStatus = "PAUSED"
const SequenceRetrieveEnrollmentResponseStatusCancelled SequenceRetrieveEnrollmentResponseStatus = "CANCELLED"
const SequenceRetrieveEnrollmentResponseStatusFailed SequenceRetrieveEnrollmentResponseStatus = "FAILED"

Retrieve a sequence enrollment

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"),
  )
  sequenceRetrieveEnrollmentResponse, err := client.Sequence.GetEnrollment(
    context.TODO(),
    "enrollmentId",
    githubcomlightfldlightfieldgo.SequenceGetEnrollmentParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveEnrollmentResponse.ID)
}
{
  "id": "id",
  "cancelledAt": "cancelledAt",
  "completedAt": "completedAt",
  "contactId": "contactId",
  "currentStepId": "currentStepId",
  "enrolledAt": "enrolledAt",
  "enrolledBy": "enrolledBy",
  "lastActivityAt": "lastActivityAt",
  "lastActivityKind": "SENT",
  "nextSendAt": "nextSendAt",
  "remainingSends": -9007199254740991,
  "repliedAt": "repliedAt",
  "status": "ACTIVE"
}
Returns Examples
{
  "id": "id",
  "cancelledAt": "cancelledAt",
  "completedAt": "completedAt",
  "contactId": "contactId",
  "currentStepId": "currentStepId",
  "enrolledAt": "enrolledAt",
  "enrolledBy": "enrolledBy",
  "lastActivityAt": "lastActivityAt",
  "lastActivityKind": "SENT",
  "nextSendAt": "nextSendAt",
  "remainingSends": -9007199254740991,
  "repliedAt": "repliedAt",
  "status": "ACTIVE"
}