Update a representative
embed.representatives.update(strrepresentative_id, RepresentativeUpdateParams**kwargs) -> Representative
/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
representative_id: str
correlation_id: Optional[str]
idempotency_key: Optional[str]
request_id: Optional[str]
Returns
Update a representative
from datetime import date
from straddle import Straddle
client = Straddle(
api_key="My API Key",
)
representative = client.embed.representatives.update(
representative_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
dob=date.fromisoformat("1980-01-01"),
email="ron.swanson@pawnee.com",
first_name="Ron",
last_name="Swanson",
mobile_number="+12128675309",
relationship={
"control": True,
"owner": True,
"primary": True,
},
ssn_last4="1234",
)
print(representative.data)
{
"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"
}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"
},
"response_type": "object"
}