Skip to content

Update a customer
Customers

Request

Partially updates a customer. Only provided fields are modified. Requires SITE_CUSTOMER:WRITE permission and RS:CUSTOMER_UPDATE right.

Security
bearerAuth
Path
customerIdintegerrequired

Unique identifier of the customer to update.

Example:789
Bodyapplication/jsonrequired
genderstring or null

Customer gender code. Use GET /users/genders for available values.

Example:"m"
first_namestring or null
Example:"Jean"
last_namestring or null
Example:"Dupont"
business_namestring or null

Company name (for professional customers).

emailstring or null, (email)

Customer email address.

Example:"new.email@example.com"
phonesArray of objects or null(CustomerPhoneBody)

Phone numbers, one entry per slot (1-4). slot is required and identifies the position; number, type_id, and stop_sms are optional.

origin_idinteger or null

Customer origin ID. Use GET /customers/origins.

Example:12
assigned_user_idinteger or null

Assigned negotiator (agent) ID.

Example:123456
agency_idinteger or null

Agency ID (within the authenticated site's scope) to reassign the customer to.

Example:123456
next_contact_atstring or null, (date-time)
referencestring or null

Internal reference of the customer.

commentsstring or null

Internal notes

current_situation_idinteger or null

Current situation list value ID (liste 5).

groupinteger or null

Customer group ID. Use GET /customers/groups.

Example:2
groupsArray of integers or null

Array of customer group IDs. Takes precedence over group.

Example:
[ 2, 4 ]
addressobject(CustomerAddressBody)

Customer address block.

newsletterboolean or null

Whether or not the customer agrees to receive communications by email.

subscriptionsArray of objects or null(CustomerSubscriptionsField)

Customer alert subscriptions. Each item controls a specific subscription channel.

Example:
[ { "id": "proposition_bien", "active": true }, { "id": "abonne_newsletter", "active": false } ]
color_idinteger or null

Customer color ID.

notary_idinteger or null

Notary customer ID.

Example:123456789
phonestring or nulldeprecated

Deprecated. Use the phones array (slot 1).

Example:"+33201020304"
mobile_phonestring or nulldeprecated

Deprecated. Use the phones array (slot 3).

Example:"+33601020304"
firstnamestring or nulldeprecated

Deprecated. Use first_name.

lastnamestring or nulldeprecated

Deprecated. Use last_name.

user_idinteger or nulldeprecated

Deprecated. Use assigned_user_id.

type_idinteger or nulldeprecated

Deprecated. Use current_situation_id.

product_idinteger or nulldeprecated

Deprecated. Product to associate via a follow-up.

Example:123456789
curl -i -X PATCH \
  https://api-doc.immo-facile.com/_mock/openapi/customers/789 \
  -H 'Authorization: Bearer <YOUR_opaque_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "gender": "m",
    "first_name": "Jean",
    "last_name": "Dupont",
    "business_name": "string",
    "email": "new.email@example.com",
    "phones": [
      {
        "slot": 1,
        "number": "+33201010101",
        "type_id": 0,
        "stop_sms": false
      }
    ],
    "phone": "+33201020304",
    "mobile_phone": "+33601020304",
    "origin_id": 12,
    "assigned_user_id": 123456,
    "agency_id": 123456,
    "next_contact_at": "2019-08-24T14:15:22Z",
    "reference": "string",
    "comments": "string",
    "current_situation_id": 0,
    "group": 2,
    "groups": [
      2,
      4
    ],
    "address": {
      "street": "105 Rue Charles Nungesser",
      "complement": "string",
      "postcode": "29490",
      "city": "Guipavas",
      "country": "FR",
      "residence": "string",
      "latitude": "48.44145",
      "longitude": "-4.415114"
    },
    "newsletter": true,
    "subscriptions": [
      {
        "id": "proposition_bien",
        "active": true
      },
      {
        "id": "abonne_newsletter",
        "active": false
      }
    ],
    "rgpd_consent": true,
    "color_id": 0,
    "notary_id": 123456789,
    "firstname": "string",
    "lastname": "string",
    "user_id": 0,
    "type_id": 0,
    "product_id": 123456789
  }'

Responses

Updated successfully

Response
No content