## Unmask customer data `client.Customers.Unmasked(ctx, id, query) (*CustomerUnmaskedV1, error)` **get** `/v1/customers/{id}/unmasked` Retrieves the unmasked details, including PII, of an existing customer. Supply the unique customer ID that was returned from your 'create customer' request, and Straddle will return the corresponding customer information. This endpoint needs to be enabled by Straddle and should only be used when absolutely necessary. ### Parameters - `id string` - `query CustomerUnmaskedParams` - `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. - `StraddleAccountID param.Field[string]` For use by platforms to specify an account id and set scope of a request. ### Returns - `type CustomerUnmaskedV1 struct{…}` - `Data CustomerUnmaskedV1Data` - `ID string` Unique identifier for the customer. - `CreatedAt Time` Timestamp of when the customer record was created. - `Email string` The customer's email address. - `Name string` Full name of the individual or business name. - `Phone string` The customer's phone number in E.164 format. - `Status string` - `const CustomerUnmaskedV1DataStatusPending CustomerUnmaskedV1DataStatus = "pending"` - `const CustomerUnmaskedV1DataStatusReview CustomerUnmaskedV1DataStatus = "review"` - `const CustomerUnmaskedV1DataStatusVerified CustomerUnmaskedV1DataStatus = "verified"` - `const CustomerUnmaskedV1DataStatusInactive CustomerUnmaskedV1DataStatus = "inactive"` - `const CustomerUnmaskedV1DataStatusRejected CustomerUnmaskedV1DataStatus = "rejected"` - `Type string` - `const CustomerUnmaskedV1DataTypeIndividual CustomerUnmaskedV1DataType = "individual"` - `const CustomerUnmaskedV1DataTypeBusiness CustomerUnmaskedV1DataType = "business"` - `UpdatedAt Time` Timestamp of the most recent update to the customer record. - `Address CustomerAddressV1` An object containing the customer's address. This is optional, but if provided, all required fields must be present. - `Address1 string` Primary address line (e.g., street, PO Box). - `City string` City, district, suburb, town, or village. - `State string` Two-letter state code. - `Zip string` Zip or postal code. - `Address2 string` Secondary address line (e.g., apartment, suite, unit, or building). - `ComplianceProfile CustomerUnmaskedV1DataComplianceProfileUnion` Individual PII data required to trigger Patriot Act compliant KYC verification. - `type CustomerUnmaskedV1DataComplianceProfileIndividualComplianceProfile struct{…}` Individual PII data required to trigger Patriot Act compliant KYC verification. - `Dob Time` Date of birth (YYYY-MM-DD). Required for Patriot Act-compliant KYC verification. - `Ssn string` Social Security Number (format XXX-XX-XXXX). Required for Patriot Act-compliant KYC verification. - `type CustomerUnmaskedV1DataComplianceProfileBusinessComplianceProfile struct{…}` Business registration data required to trigger Patriot Act compliant KYB verification. - `Ein string` Employer Identification Number (format XX-XXXXXXX). Required for Patriot Act-compliant KYB verification. - `LegalBusinessName string` Official registered business name as listed with the IRS. This value will be matched against the 'legal_business name'. - `Representatives []CustomerUnmaskedV1DataComplianceProfileBusinessComplianceProfileRepresentative` A list of people related to the company. Only valid where customer type is 'business'. - `Name string` - `Email string` - `Phone string` - `Website string` Official business website URL. Optional but recommended for enhanced KYB. - `Config CustomerUnmaskedV1DataConfig` - `ProcessingMethod string` - `const CustomerUnmaskedV1DataConfigProcessingMethodInline CustomerUnmaskedV1DataConfigProcessingMethod = "inline"` - `const CustomerUnmaskedV1DataConfigProcessingMethodBackground CustomerUnmaskedV1DataConfigProcessingMethod = "background"` - `const CustomerUnmaskedV1DataConfigProcessingMethodSkip CustomerUnmaskedV1DataConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const CustomerUnmaskedV1DataConfigSandboxOutcomeStandard CustomerUnmaskedV1DataConfigSandboxOutcome = "standard"` - `const CustomerUnmaskedV1DataConfigSandboxOutcomeVerified CustomerUnmaskedV1DataConfigSandboxOutcome = "verified"` - `const CustomerUnmaskedV1DataConfigSandboxOutcomeRejected CustomerUnmaskedV1DataConfigSandboxOutcome = "rejected"` - `const CustomerUnmaskedV1DataConfigSandboxOutcomeReview CustomerUnmaskedV1DataConfigSandboxOutcome = "review"` - `Device DeviceUnmaskedV1` - `IPAddress string` The customer's IP address at the time of profile creation. Use `0.0.0.0` to represent an offline customer registration. - `ExternalID string` Unique identifier for the customer 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 customer in a structured format. - `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 CustomerUnmaskedV1ResponseType` 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 CustomerUnmaskedV1ResponseTypeObject CustomerUnmaskedV1ResponseType = "object"` - `const CustomerUnmaskedV1ResponseTypeArray CustomerUnmaskedV1ResponseType = "array"` - `const CustomerUnmaskedV1ResponseTypeError CustomerUnmaskedV1ResponseType = "error"` - `const CustomerUnmaskedV1ResponseTypeNone CustomerUnmaskedV1ResponseType = "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"), ) customerUnmaskedV1, err := client.Customers.Unmasked( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.CustomerUnmaskedParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", customerUnmaskedV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "email": "ron.swanson@pawnee.com", "name": "Ron Swanson", "phone": "+12128675309", "status": "pending", "type": "individual", "updated_at": "2019-12-27T18:11:19.117Z", "address": { "address1": "123 Main St", "city": "Anytown", "state": "CA", "zip": "12345", "address2": "Apt 1" }, "compliance_profile": { "dob": "1969-04-20", "ssn": "123-45-6789" }, "config": { "processing_method": "inline", "sandbox_outcome": "standard" }, "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "metadata": { "foo": "string" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ```