Skip to content
Get started

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.

ParametersExpand Collapse
id string
query CustomerUnmaskedParams
CorrelationID param.Field[string]optional

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

RequestID param.Field[string]optional

Optional client generated identifier to trace and debug a request.

StraddleAccountID param.Field[string]optional

For use by platforms to specify an account id and set scope of a request.

formatuuid
ReturnsExpand Collapse
type CustomerUnmaskedV1 struct{…}
Data CustomerUnmaskedV1Data
ID string

Unique identifier for the customer.

formatuuid
CreatedAt Time

Timestamp of when the customer record was created.

formatdate-time
Email string

The customer's email address.

formatemail
Name string

Full name of the individual or business name.

Phone string

The customer's phone number in E.164 format.

Status string
One of the following:
const CustomerUnmaskedV1DataStatusPending CustomerUnmaskedV1DataStatus = "pending"
const CustomerUnmaskedV1DataStatusReview CustomerUnmaskedV1DataStatus = "review"
const CustomerUnmaskedV1DataStatusVerified CustomerUnmaskedV1DataStatus = "verified"
const CustomerUnmaskedV1DataStatusInactive CustomerUnmaskedV1DataStatus = "inactive"
const CustomerUnmaskedV1DataStatusRejected CustomerUnmaskedV1DataStatus = "rejected"
Type string
One of the following:
const CustomerUnmaskedV1DataTypeIndividual CustomerUnmaskedV1DataType = "individual"
const CustomerUnmaskedV1DataTypeBusiness CustomerUnmaskedV1DataType = "business"
UpdatedAt Time

Timestamp of the most recent update to the customer record.

formatdate-time
Address CustomerAddressV1optional

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

maxLength100
City string

City, district, suburb, town, or village.

maxLength100
State string

Two-letter state code.

Zip string

Zip or postal code.

Address2 stringoptional

Secondary address line (e.g., apartment, suite, unit, or building).

maxLength100
ComplianceProfile CustomerUnmaskedV1DataComplianceProfileUnionoptional

Individual PII data required to trigger Patriot Act compliant KYC verification.

One of the following:
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.

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

Official registered business name as listed with the IRS. This value will be matched against the 'legal_business name'.

Representatives []CustomerUnmaskedV1DataComplianceProfileBusinessComplianceProfileRepresentativeoptional

A list of people related to the company. Only valid where customer type is 'business'.

Name string
Email stringoptional
Phone stringoptional
Website stringoptional

Official business website URL. Optional but recommended for enhanced KYB.

formaturi
Config CustomerUnmaskedV1DataConfigoptional
ProcessingMethod stringoptional
One of the following:
const CustomerUnmaskedV1DataConfigProcessingMethodInline CustomerUnmaskedV1DataConfigProcessingMethod = "inline"
const CustomerUnmaskedV1DataConfigProcessingMethodBackground CustomerUnmaskedV1DataConfigProcessingMethod = "background"
const CustomerUnmaskedV1DataConfigProcessingMethodSkip CustomerUnmaskedV1DataConfigProcessingMethod = "skip"
SandboxOutcome stringoptional
One of the following:
const CustomerUnmaskedV1DataConfigSandboxOutcomeStandard CustomerUnmaskedV1DataConfigSandboxOutcome = "standard"
const CustomerUnmaskedV1DataConfigSandboxOutcomeVerified CustomerUnmaskedV1DataConfigSandboxOutcome = "verified"
const CustomerUnmaskedV1DataConfigSandboxOutcomeRejected CustomerUnmaskedV1DataConfigSandboxOutcome = "rejected"
const CustomerUnmaskedV1DataConfigSandboxOutcomeReview CustomerUnmaskedV1DataConfigSandboxOutcome = "review"
Device DeviceUnmaskedV1optional
IPAddress string

The customer's IP address at the time of profile creation. Use 0.0.0.0 to represent an offline customer registration.

minLength1
formatipv4
ExternalID stringoptional

Unique identifier for the customer 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 customer in a structured format.

Metadata about the API request, including an identifier and timestamp.

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
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.
One of the following:
const CustomerUnmaskedV1ResponseTypeObject CustomerUnmaskedV1ResponseType = "object"
const CustomerUnmaskedV1ResponseTypeArray CustomerUnmaskedV1ResponseType = "array"
const CustomerUnmaskedV1ResponseTypeError CustomerUnmaskedV1ResponseType = "error"
const CustomerUnmaskedV1ResponseTypeNone CustomerUnmaskedV1ResponseType = "none"

Unmask customer data

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)
}
{
  "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"
}
Returns Examples
{
  "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"
}