Contacts
Update Contact
Updates a contact. Optionally merges another contact into the target when `mergeWith` is set.
AuthorizationRequiredBearer <token>
API key as Bearer token
In: header
application/jsonRequired
contactRequiredobject
New contact field values
mergeWithstring
Id of a second contact to absorb into the target during this update.
Set when an email change collides with another existing contact.
resolutionstring
Required when mergeWith is set; chooses how field-level
conflicts resolve.
Value in: "safe-merge" | "overwrite-merge"
idRequiredstring
Contact id, discoverable via list_contacts
PATCH/v1/contacts/{id}curl -X PATCH "https://api.3common.com/v1/contacts/string" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"firstName": "string",
"lastName": "string",
"email": "user@example.com",
"phone": "string",
"status": "deleted"
},
"mergeWith": "string",
"resolution": "safe-merge"
}'
Default ResponseResponse
{
"data": {
"_id": "string",
"email": "string",
"vendorId": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"phone": "string",
"status": "deleted",
"grossSum": 0,
"orderSum": 0,
"leastRecentOrder": "2019-08-24T14:15:22Z",
"mostRecentOrder": "2019-08-24T14:15:22Z",
"events_attended": [
"string"
],
"items_purchased": [
"string"
],
"products_purchased": [
"string"
],
"properties": [
{
"property_id": "string",
"value": "string"
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}
TypeScript
export interface Response {
data: {
_id: string;
email: string;
vendorId: string;
firstName: string;
lastName: string;
fullName: string;
phone?: string | null;
/**
* Contact lifecycle status.
* - opted-in / unsubscribed: explicit consent state
* - unknown: never recorded a choice
* - imported / deleted: lifecycle states from list imports / soft-deletes
*/
status: "deleted" | "imported" | "unsubscribed" | "opted-in" | "unknown";
grossSum: number;
orderSum: number;
leastRecentOrder?: string;
mostRecentOrder?: string;
events_attended: string[];
items_purchased: string[];
products_purchased: string[];
properties?: {
property_id: string;
value: string | string[] | boolean;
}[];
createdAt?: string;
updatedAt?: string;
};
}