Skip to content
Get started

List representatives

client.Embed.Representatives.List(ctx, params) (*PageNumberSchema[RepresentativePagedData], error)
GET/v1/representatives

Returns a list of representatives associated with a specific account or organization. The representatives are returned sorted by creation date, with the most recently created representatives appearing first. This endpoint supports advanced sorting and filtering options.

ParametersExpand Collapse
params EmbedRepresentativeListParams
AccountID param.Field[string]optional

Query param: The unique identifier of the account to list representatives for.

formatuuid
Level param.Field[EmbedRepresentativeListParamsLevel]optional

Query param

const EmbedRepresentativeListParamsLevelAccount EmbedRepresentativeListParamsLevel = "account"
const EmbedRepresentativeListParamsLevelPlatform EmbedRepresentativeListParamsLevel = "platform"
OrganizationID param.Field[string]optional

Query param

formatuuid
PageNumber param.Field[int64]optional

Query param: Results page number. Starts at page 1.

formatint32
PageSize param.Field[int64]optional

Query param: Page size. Max value: 1000

formatint32
PlatformID param.Field[string]optional

Query param

formatuuid
SortBy param.Field[string]optional

Query param: Sort By.

SortOrder param.Field[EmbedRepresentativeListParamsSortOrder]optional

Query param: Sort Order.

const EmbedRepresentativeListParamsSortOrderAsc EmbedRepresentativeListParamsSortOrder = "asc"
const EmbedRepresentativeListParamsSortOrderDesc EmbedRepresentativeListParamsSortOrder = "desc"
CorrelationID param.Field[string]optional

Header param: Optional client generated identifier to trace and debug a series of requests.

RequestID param.Field[string]optional

Header param: Optional client generated identifier to trace and debug a request.

ReturnsExpand Collapse
type RepresentativePagedData struct{…}
ID string

Unique identifier for the representative.

formatuuid
AccountID string

The unique identifier of the account this representative is associated with.

formatuuid
CreatedAt Time

Timestamp of when the representative was created.

formatdate-time
Dob Time

The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD).

formatdate
Email string

The email address of the representative.

formatemail
FirstName string

The first name of the representative.

LastName string

The last name of the representative.

MobileNumber string

The mobile phone number of the representative.

Name string
Relationship RepresentativePagedDataRelationship
Control bool

Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity.

Owner bool

Whether the representative owns any percentage of of the equity interests of the legal entity.

Primary bool

Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement.

There can be only one primary representative for an account at a time.

PercentOwnership float64optional

The percentage of ownership the representative has. Required if 'Owner' is true.

formatdouble
Title stringoptional

The job title of the representative.

SsnLast4 string

The last 4 digits of the representative's Social Security Number.

Status string

The current status of the representative.

One of the following:
const RepresentativePagedDataStatusCreated RepresentativePagedDataStatus = "created"
const RepresentativePagedDataStatusOnboarding RepresentativePagedDataStatus = "onboarding"
const RepresentativePagedDataStatusActive RepresentativePagedDataStatus = "active"
const RepresentativePagedDataStatusRejected RepresentativePagedDataStatus = "rejected"
const RepresentativePagedDataStatusInactive RepresentativePagedDataStatus = "inactive"
StatusDetail RepresentativePagedDataStatusDetail
Code string

A machine-readable code for the specific status, useful for programmatic handling.

Message string

A human-readable message describing the current status.

Reason string

A machine-readable identifier for the specific status, useful for programmatic handling.

One of the following:
const RepresentativePagedDataStatusDetailReasonUnverified RepresentativePagedDataStatusDetailReason = "unverified"
const RepresentativePagedDataStatusDetailReasonInReview RepresentativePagedDataStatusDetailReason = "in_review"
const RepresentativePagedDataStatusDetailReasonPending RepresentativePagedDataStatusDetailReason = "pending"
const RepresentativePagedDataStatusDetailReasonStuck RepresentativePagedDataStatusDetailReason = "stuck"
const RepresentativePagedDataStatusDetailReasonVerified RepresentativePagedDataStatusDetailReason = "verified"
const RepresentativePagedDataStatusDetailReasonFailedVerification RepresentativePagedDataStatusDetailReason = "failed_verification"
const RepresentativePagedDataStatusDetailReasonDisabled RepresentativePagedDataStatusDetailReason = "disabled"
const RepresentativePagedDataStatusDetailReasonNew RepresentativePagedDataStatusDetailReason = "new"
Source string

Identifies the origin of the status change (e.g., watchtower). This helps in tracking the cause of status updates.

UpdatedAt Time

Timestamp of the most recent update to the representative.

formatdate-time
ExternalID stringoptional

Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems.

Metadata map[string, string]optional

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format.

Phone stringoptional
UserID stringoptional

The unique identifier of the user account associated with this representative, if applicable.

formatuuid

List representatives

package main

import (
  "context"
  "fmt"

  "github.com/straddleio/straddle-go"
  "github.com/straddleio/straddle-go/option"
)

func main() {
  client := straddle.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Embed.Representatives.List(context.TODO(), straddle.EmbedRepresentativeListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "dob": "1980-01-01",
      "email": "ron.swanson@pawnee.com",
      "first_name": "Ron",
      "last_name": "Swanson",
      "mobile_number": "+12128675309",
      "name": "name",
      "relationship": {
        "control": true,
        "owner": true,
        "primary": true,
        "percent_ownership": 0,
        "title": "title"
      },
      "ssn_last4": "1234",
      "status": "created",
      "status_detail": {
        "code": "code",
        "message": "message",
        "reason": "unverified",
        "source": "watchtower"
      },
      "updated_at": "2019-12-27T18:11:19.117Z",
      "external_id": "external_id",
      "metadata": {
        "foo": "string"
      },
      "phone": "phone",
      "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    }
  ],
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z",
    "max_page_size": 0,
    "page_number": 0,
    "page_size": 0,
    "sort_by": "sort_by",
    "sort_order": "asc",
    "total_items": 0,
    "total_pages": 0
  },
  "response_type": "object"
}
Returns Examples
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "dob": "1980-01-01",
      "email": "ron.swanson@pawnee.com",
      "first_name": "Ron",
      "last_name": "Swanson",
      "mobile_number": "+12128675309",
      "name": "name",
      "relationship": {
        "control": true,
        "owner": true,
        "primary": true,
        "percent_ownership": 0,
        "title": "title"
      },
      "ssn_last4": "1234",
      "status": "created",
      "status_detail": {
        "code": "code",
        "message": "message",
        "reason": "unverified",
        "source": "watchtower"
      },
      "updated_at": "2019-12-27T18:11:19.117Z",
      "external_id": "external_id",
      "metadata": {
        "foo": "string"
      },
      "phone": "phone",
      "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    }
  ],
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z",
    "max_page_size": 0,
    "page_number": 0,
    "page_size": 0,
    "sort_by": "sort_by",
    "sort_order": "asc",
    "total_items": 0,
    "total_pages": 0
  },
  "response_type": "object"
}