PATCH /v1/contacts/{id}
const url = 'https://api.asap.cool/v1/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"address":"example","city":"example","company":"example","consent_source":"example","country":"example","default_discount_terms":"example","default_payment_terms":"example","email":"example","first_name":"example","last_name":"example","lead_score":1,"lead_status":"example","legal_basis":"example","marketing_consent":true,"notes":"example","phone":"example","postal_code":"example","preferred_language":"example","reminder_opt_out":true,"siret":"example","tags":["example"],"type":"example","vat_intra":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.asap.cool/v1/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "address": "example", "city": "example", "company": "example", "consent_source": "example", "country": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "first_name": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "tags": [ "example" ], "type": "example", "vat_intra": "example" }'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »Contact identifier.
Request Body required
Section intitulée « Request Body required »Body of PATCH /v1/contacts/{id}.
The three-state semantics (omitted vs null vs value) are captured
by #[serde(default, deserialize_with = ...)] on each nullable field
using a double Option: None means the key was absent,
Some(None) means it was explicitly null.
object
Address.
City.
Company.
Consent provenance (omitted / null / value).
Country (non-null).
Default early-payment discount terms (omitted / null / value); blank clears.
Default payment terms (omitted / null / value); blank clears.
Email.
First name (omitted / null / value).
Last name.
Lead score (omitted / null / value); 0..=100 when set.
Lead pipeline stage (omitted / null / value); null makes it a non-lead.
RGPD lawful basis (omitted / null / value).
Marketing-consent state, if changing.
Notes.
Phone.
Postal code.
Preferred language fr/en (omitted / null / value).
Reminder opt-out, if changing.
SIRET.
Tags (omitted / null / value); null clears to no tags.
New contact type, if changing.
Intra-EU VAT number.
Example generated
{ "address": "example", "city": "example", "company": "example", "consent_source": "example", "country": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "first_name": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "tags": [ "example" ], "type": "example", "vat_intra": "example"}Responses
Section intitulée « Responses »Updated contact.
Public projection of a [Contact] (omits unsubscribe_token).
object
Street address.
RFC3339 archival timestamp, or null when the contact is active.
City.
Company / legal name (business).
RFC3339 instant consent was last granted, or null.
Provenance of the recorded consent, or null.
ISO 3166-1 alpha-2 country code.
RFC3339 creation timestamp.
Per-contact default early-payment discount terms pre-filling a new
quote/invoice, or null to fall back to the org default.
Per-contact default payment terms pre-filling a new quote/invoice,
or null to fall back to the org default.
Contact email.
RFC3339 RGPD-erasure timestamp, or null when not erased.
Given name (individual).
Stable identifier.
RFC3339 timestamp of the last recorded interaction (chat reply,
email, …), or null when none.
Family name (individual).
Lead score in [0..=100], or null for a non-lead.
Lead pipeline stage, or null for a non-lead.
RGPD lawful basis (consent/contract/legitimate_interest/
legal_obligation), or null.
Current marketing-consent state.
Surviving contact this row was merged into (null for a live contact).
Free-form notes.
Phone number.
Postal / ZIP code.
Preferred language (fr or en) for outbound emails and documents,
or null when no explicit preference.
Whether the contact opted out of reminder emails.
French business registration number (14 digits).
Acquisition source (manual/chat/import/api).
Assigned tags (empty when none).
particulier or professionnel.
RFC3339 last-update timestamp.
Intra-EU VAT number (e.g. FR12345678901).
Example generated
{ "address": "example", "archived_at": "example", "city": "example", "company": "example", "consent_at": "example", "consent_source": "example", "country": "example", "created_at": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "erased_at": "example", "first_name": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "last_interaction_at": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "merged_into": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "source": "example", "tags": [ "example" ], "type": "example", "updated_at": "example", "vat_intra": "example"}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing contacts:write scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Not found or cross-org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Invalid contact payload.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}