## Update a customer `customers.update(strid, CustomerUpdateParams**kwargs) -> CustomerV1` **put** `/v1/customers/{id}` Updates an existing customer's information. This endpoint allows you to modify the customer's contact details, PII, and metadata. ### Parameters - `id: str` - `device: DeviceUnmaskedV1Param` - `ip_address: str` The customer's IP address at the time of profile creation. Use `0.0.0.0` to represent an offline customer registration. - `email: str` The customer's email address. - `name: str` The customer's full name or business name. - `phone: str` The customer's phone number in E.164 format. - `status: Literal["pending", "review", "verified", 2 more]` - `"pending"` - `"review"` - `"verified"` - `"inactive"` - `"rejected"` - `address: Optional[CustomerAddressV1Param]` An object containing the customer's address. This is optional, but if provided, all required fields must be present. - `address1: str` Primary address line (e.g., street, PO Box). - `city: str` City, district, suburb, town, or village. - `state: str` Two-letter state code. - `zip: str` Zip or postal code. - `address2: Optional[str]` Secondary address line (e.g., apartment, suite, unit, or building). - `compliance_profile: Optional[ComplianceProfile]` Individual PII data required to trigger Patriot Act compliant KYC verification. - `class ComplianceProfileIndividualComplianceProfile: …` Individual PII data required to trigger Patriot Act compliant KYC verification. - `dob: Union[null, null, null]` Date of birth (YYYY-MM-DD). Required for Patriot Act-compliant KYC verification. - `ssn: Optional[str]` Social Security Number (format XXX-XX-XXXX). Required for Patriot Act-compliant KYC verification. - `class ComplianceProfileBusinessComplianceProfile: …` Business registration data required to trigger Patriot Act compliant KYB verification. - `ein: Optional[str]` Employer Identification Number (format XX-XXXXXXX). Required for Patriot Act-compliant KYB verification. - `legal_business_name: Optional[str]` Official registered business name as listed with the IRS. This value will be matched against the 'legal_business name'. - `representatives: Optional[Iterable[ComplianceProfileBusinessComplianceProfileRepresentative]]` A list of people related to the company. Only valid where customer type is 'business'. - `name: str` - `email: Optional[str]` - `phone: Optional[str]` - `website: Optional[str]` Official business website URL. Optional but recommended for enhanced KYB. - `external_id: Optional[str]` Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems. - `metadata: Optional[Dict[str, str]]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the customer in a structured format. - `correlation_id: Optional[str]` - `idempotency_key: Optional[str]` - `request_id: Optional[str]` - `straddle_account_id: Optional[str]` ### Returns - `class CustomerV1: …` - `data: Data` - `id: str` Unique identifier for the customer. - `created_at: datetime` Timestamp of when the customer record was created. - `email: str` The customer's email address. - `name: str` Full name of the individual or business name. - `phone: str` The customer's phone number in E.164 format. - `status: Literal["pending", "review", "verified", 2 more]` - `"pending"` - `"review"` - `"verified"` - `"inactive"` - `"rejected"` - `type: Literal["individual", "business"]` - `"individual"` - `"business"` - `updated_at: datetime` Timestamp of the most recent update to the customer record. - `address: Optional[CustomerAddressV1]` An object containing the customer's address. This is optional, but if provided, all required fields must be present. - `address1: str` Primary address line (e.g., street, PO Box). - `city: str` City, district, suburb, town, or village. - `state: str` Two-letter state code. - `zip: str` Zip or postal code. - `address2: Optional[str]` Secondary address line (e.g., apartment, suite, unit, or building). - `compliance_profile: Optional[DataComplianceProfile]` PII required to trigger Patriot Act compliant KYC verification. - `class DataComplianceProfileIndividualComplianceProfile: …` PII required to trigger Patriot Act compliant KYC verification. - `dob: Optional[date]` Masked date of birth in ****-**-** format. - `ssn: Optional[str]` Masked Social Security Number in the format ***-**-*\***. - `class DataComplianceProfileBusinessComplianceProfile: …` Business registration data required to trigger Patriot Act compliant KYB verification. - `ein: Optional[str]` Masked Employer Identification Number in the format **-**\***** - `legal_business_name: Optional[str]` The official registered name of the business. This name should be correlated with the `ein` value. - `representatives: Optional[List[DataComplianceProfileBusinessComplianceProfileRepresentative]]` A list of people related to the company. Only valid where customer type is 'business'. - `name: str` - `email: Optional[str]` - `phone: Optional[str]` - `website: Optional[str]` Official business website URL. Optional but recommended for enhanced KYB. - `config: Optional[DataConfig]` - `processing_method: Optional[Literal["inline", "background", "skip"]]` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome: Optional[Literal["standard", "verified", "rejected", "review"]]` - `"standard"` - `"verified"` - `"rejected"` - `"review"` - `device: Optional[DataDevice]` - `ip_address: str` The customer's IP address at the time of profile creation. Use `0.0.0.0` to represent an offline customer registration. - `external_id: Optional[str]` Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems. - `metadata: Optional[Dict[str, str]]` 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. - `api_request_id: str` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: datetime` Timestamp for this API request, useful for troubleshooting. - `response_type: Literal["object", "array", "error", "none"]` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```python import os from straddle import Straddle client = Straddle( api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted ) customer_v1 = client.customers.update( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", device={ "ip_address": "192.168.1.1" }, email="dev@stainless.com", name="name", phone="+46991022", status="pending", ) print(customer_v1.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": "2019-12-27", "ssn": "***-**-****" }, "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" } ```