# Representatives ## Create a representative `client.Embed.Representatives.New(ctx, params) (*Representative, error)` **post** `/v1/representatives` Creates a new representative associated with an account. Representatives are individuals who have legal authority or significant responsibility within the business. ### Parameters - `params EmbedRepresentativeNewParams` - `AccountID param.Field[string]` Body param: The unique identifier of the account this representative is associated with. - `Dob param.Field[Time]` Body param: Date of birth for the representative in ISO 8601 format (YYYY-MM-DD). - `Email param.Field[string]` Body param: The company email address of the representative. - `FirstName param.Field[string]` Body param: The first name of the representative. - `LastName param.Field[string]` Body param: The last name of the representative. - `MobileNumber param.Field[string]` Body param: The mobile phone number of the representative. - `Relationship param.Field[EmbedRepresentativeNewParamsRelationship]` Body param - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 param.Field[string]` Body param: The last 4 digits of the representative's Social Security Number. - `ExternalID param.Field[string]` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 RepresentativeDataRelationship` - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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. - `const RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType RepresentativeResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) representative, err := client.Embed.Representatives.New(context.TODO(), straddle.EmbedRepresentativeNewParams{ AccountID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", Dob: time.Now(), Email: "ron.swanson@pawnee.com", FirstName: "first_name", LastName: "last_name", MobileNumber: "+12128675309", Relationship: straddle.EmbedRepresentativeNewParamsRelationship{ Control: true, Owner: true, Primary: true, }, SsnLast4: "1234", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "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" }, "response_type": "object" } ``` ## 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. ### Parameters - `params EmbedRepresentativeListParams` - `AccountID param.Field[string]` Query param: The unique identifier of the account to list representatives for. - `Level param.Field[EmbedRepresentativeListParamsLevel]` Query param - `const EmbedRepresentativeListParamsLevelAccount EmbedRepresentativeListParamsLevel = "account"` - `const EmbedRepresentativeListParamsLevelPlatform EmbedRepresentativeListParamsLevel = "platform"` - `OrganizationID param.Field[string]` Query param - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. - `PageSize param.Field[int64]` Query param: Page size. Max value: 1000 - `PlatformID param.Field[string]` Query param - `SortBy param.Field[string]` Query param: Sort By. - `SortOrder param.Field[EmbedRepresentativeListParamsSortOrder]` Query param: Sort Order. - `const EmbedRepresentativeListParamsSortOrderAsc EmbedRepresentativeListParamsSortOrder = "asc"` - `const EmbedRepresentativeListParamsSortOrderDesc EmbedRepresentativeListParamsSortOrder = "desc"` - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type RepresentativePagedData struct{…}` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `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. - `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. - `const RepresentativePagedDataStatusDetailSourceWatchtower RepresentativePagedDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. ### Example ```go 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) } ``` #### Response ```json { "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" } ``` ## Update a representative `client.Embed.Representatives.Update(ctx, representativeID, params) (*Representative, error)` **put** `/v1/representatives/{representative_id}` Updates an existing representative's information. This can be used to update personal details, contact information, or the relationship to the account or organization. ### Parameters - `representativeID string` - `params EmbedRepresentativeUpdateParams` - `Dob param.Field[Time]` Body param: The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email param.Field[string]` Body param: The email address of the representative. - `FirstName param.Field[string]` Body param: The first name of the representative. - `LastName param.Field[string]` Body param: The last name of the representative. - `MobileNumber param.Field[string]` Body param: The mobile phone number of the representative. - `Relationship param.Field[EmbedRepresentativeUpdateParamsRelationship]` Body param - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 param.Field[string]` Body param: The last 4 digits of the representative's Social Security Number. - `ExternalID param.Field[string]` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 RepresentativeDataRelationship` - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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. - `const RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType RepresentativeResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) representative, err := client.Embed.Representatives.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeUpdateParams{ Dob: time.Now(), Email: "ron.swanson@pawnee.com", FirstName: "Ron", LastName: "Swanson", MobileNumber: "+12128675309", Relationship: straddle.EmbedRepresentativeUpdateParamsRelationship{ Control: true, Owner: true, Primary: true, }, SsnLast4: "1234", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "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" }, "response_type": "object" } ``` ## Lookup a representative `client.Embed.Representatives.Get(ctx, representativeID, query) (*Representative, error)` **get** `/v1/representatives/{representative_id}` Retrieves the details of an existing representative. Supply the unique representative ID, and Straddle will return the corresponding representative information. ### Parameters - `representativeID string` - `query EmbedRepresentativeGetParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. ### Returns - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 RepresentativeDataRelationship` - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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. - `const RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType RepresentativeResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go 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"), ) representative, err := client.Embed.Representatives.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "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" }, "response_type": "object" } ``` ## Retrieve unmasked representative details `client.Embed.Representatives.Unmask(ctx, representativeID, query) (*Representative, error)` **get** `/v1/representatives/{representative_id}/unmask` Retrieves the unmasked details of a representative that has previously been created. Supply the unique representative ID, and Straddle will return the corresponding representative information, including sensitive details. This endpoint requires additional authentication and should be used with caution. ### Parameters - `representativeID string` - `query EmbedRepresentativeUnmaskParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. ### Returns - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 RepresentativeDataRelationship` - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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. - `const RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType RepresentativeResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go 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"), ) representative, err := client.Embed.Representatives.Unmask( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeUnmaskParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "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" }, "response_type": "object" } ``` ## Domain Types ### Representative - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 RepresentativeDataRelationship` - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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. - `const RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType RepresentativeResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Representative Paged - `type RepresentativePaged struct{…}` - `Data []RepresentativePagedData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `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 float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` 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. - `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. - `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. - `const RepresentativePagedDataStatusDetailSourceWatchtower RepresentativePagedDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `Meta PagedResponseMetadata` Metadata about the API request, including an identifier, timestamp, and pagination details. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `MaxPageSize int64` Maximum allowed page size for this endpoint. - `PageNumber int64` Page number for paginated results. - `PageSize int64` Number of items per page in this response. - `SortBy string` The field that the results were sorted by. - `SortOrder PagedResponseMetadataSortOrder` - `const PagedResponseMetadataSortOrderAsc PagedResponseMetadataSortOrder = "asc"` - `const PagedResponseMetadataSortOrderDesc PagedResponseMetadataSortOrder = "desc"` - `TotalItems int64` Total number of items returned in this response. - `TotalPages int64` The number of pages available. - `ResponseType RepresentativePagedResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const RepresentativePagedResponseTypeObject RepresentativePagedResponseType = "object"` - `const RepresentativePagedResponseTypeArray RepresentativePagedResponseType = "array"` - `const RepresentativePagedResponseTypeError RepresentativePagedResponseType = "error"` - `const RepresentativePagedResponseTypeNone RepresentativePagedResponseType = "none"`