API DOCUMENTATION
AddCustomer (pOST)
Adds the given customer and returns the id.
Body params:
- name(string, required): The name of the customer.
- surnames(string, optional): The customer’s surnames.
- nif_cif(string, optional): The NIF or CIF of the customer.
- phone_number(string, optional): The customer’s phone number.
- whatsapp(boolean, required): Boolean indicating if the customer wants to be contacted via WhatsApp. The default value is 0.
- language(date, required): The language to communicate with the customer. The default value is ‘es’.
- email(integer, required): The email address of the customer. The default value is null.
- company(boolean, required): Boolean indicating if the customer added is a company or not. The default values is 0, which means that it’s not a company.
- registration_date(date, optional): The customer’s registration date.
- customer_rating(integer, optional): The customer’s rating that goes from 0 to 5.
- vip(boolean, optional): Boolean indicating if the customer added is vip or not. The default value is 0, which means it isn’t.
- active(boolean, optional): Boolean indicating if the customer added is active or not. The default value is 1, which means it is.
- other_phone_number(integer, optional): The customer’s other phone number.
- usual_address(decimal, optional): The customer’s usual address.
- geo_fullname(integer, optional): The customer’s location.
- zip_code(integer, optional): The customer’s zip code.
- pending_rental(boolean, optional): Boolean indicating if the customer has any pending rental.
- pending_rental_amounts(decimal, optional): The customer’s pending rental amounts.
- pending_rental_description(string, optional): The customer’s pending rental description.
- id_payment_method(integer, optional): The customer’s payment method id. This id can be found in the section Customer payment methods.
- id_status(string, optional): The customer’s status id. This id can be found with the call getCustomerStatuses.
- notes(string, optional): The customer’s notes.
- contact_source(string, optional): The customer’s contact source. This id can be found with the call getCustomerContactSources.
- id_portal(integer, optional): The customer’s portal id. This id can be found in the section Portals.
- contact_method(string, optional): The customer’s contact method. This id can be found with the call getCustomerContactMethods.
- id_assigned_salesperson(string, optional): The customer’s assigned salesperson. This id can be found with the call getUsers.
- id_assigned_salesperson_2(string, optional): The customer’s second assigned salesperson. This id can be found with the call getUsers.
- potential_agency(boolean, optional): Boolean indicating that a customer is a potential agency.
- evolution(string, optional): The customer’s evolution.
- id_greeting(integer, optional): The customer’s greeting id. This id can be found in the section Customer greetings.
- no_resident(boolean, optional): Boolean indicating that a customer is or not a resident.
- id_nif_type(string, optional): The customer’s NIF type id. This id can be found in the section Customer NIF types.
- birth_date(string, optional): The customer’s birth date.
- id_marital_status(string, optional): The customer’s marital status id. This id can be found in the section Customer marital status.
- id_cancellation_reason(string, optional): The customer’s cancellation reason id. This id can be found with the call getCustomerCancellationReason.
- cancellation_date(string, optional): The customer’s cancellation date.
- cancellation_observations(string, optional): The customer’s cancellation observations.
- lead_or_customer(integer, optional): Indicates if a customer is a lead (0) or a customer (1). The default value is 1.
- profiles(array, optional): Array of profile ids. These ids can be obtained with the call getCustomerProfiles.
- types(array, optional): Array that contains arrays with the following fields:
- id_customer_type (integer,optional): The customer type id. The types can be found in the section Customer types.
- id_buyer_category (integer,optional): The buyer category id.
- id_tenant_category (integer,optional): The tenant category id.
- id_owner_category (integer,optional): The owner category id.
- id_industrial_category (integer,optional): The industrial category id.
- id_buyer_status (string,optional): The buyer status id.
- id_tenant_status (string,optional): The buyer status id.
- id_owner_status (string,optional): The owner status id.
- The categories can be found in the section Customer categories. The statuses can be found with the call getCustomerStatuses.
- companies(array, optional): Array that contains arrays of the companies the new customer is a contact of. The field company previously seen has to be null or 0.
- id_customer (string, optional): Id of a customer that is a company.
- id_job_title (string, optional): Id of the job title the new customer has in the company.
- company_name (string, optional): The name of the company.
- description (string, optional): The description of the company.
- contact_address (string, optional): The contact’s address.
- contact_phone_number (string, optional): The contact’s phone number.
- contact_email (string, optional): The contact’s email.
- contacts(array, optional): Array that contains arrays of the contacts of the customer, which has to be a company (the field company previously seen has to be 1).
- id_contact_customer (string, optional): The id of a customer that is a contact of the new company.
- id_job_title (string, optional): Id of the job title this customer has in the new company.
- company_name (string, optional): The name of the company.
- description (string, optional): The description of the company.
- contact_address (string, optional): The contact’s address.
- contact_phone_number (string, optional): The contact’s phone number.
- contact_email (string, optional): The contact’s email.
Request examples
CURL:
curl --location 'https://movin.cloud/api/real-estate/add-customer' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer SECRETOKEN'
Body example:
{
"name":"Test" ,
"surnames":"Postman 3" ,
"nif_cif":"87473278F" ,
"phone_number":"112222222222333" ,
"whatsapp": "1",
"language":"ca" ,
"email":"1bcvb22222334@sdsd.sd" ,
"company": "0",
"registration_date":"2024-07-18",
"customer_rating":4,
"vip":"0",
"active":"1",
"other_phone_number": "674867864673",
"usual_address":"sdsdfsdfsdf",
"geo_fullname":"sdfgdfgdfgf",
"zip_code":12334,
"pending_rental":null,
"pending_rental_amounts":null,
"pending_rental_description":null,
"id_payment_method":null,
"id_status": "MjQkMzQ1Njg=",
"notes":null,
"contact_source":null,
"id_portal": 1,
"contact_method": "MjQkNDM4Nzg=",
"id_assigned_salesperson": null,
"id_assigned_salesperson_2":null,
"potential_agency":null,
"evolution":null,
"id_greeting":null,
"no_resident":null,
"id_nif_type":null,
"birth_date":null,
"id_civil_status":null,
"id_cancellation_reason":null,
"cancellation_date":null,
"cancellation_observations":null,
"lead_or_customer": "0",
"profiles": ["MjQkMzQ2NDU=", "MjQkMzQ2NDc="],
"types": [
{
"id_customer_type": 3,
"id_buyer_category": 1
}
],
"companies": [
{
"id_customer": "MjQkMzYxMDM=",
"id_job_title": "MjQkMzQ1Njg=",
"company_name": "Test postman hehe",
"description": "Blablablablablablablabla",
"contact_address": "Testtttt",
"contact_phone_number": "109439309",
"contact_email": "psdo@sdofi.es"
}
]
}
Response Example
{
"data": [
"id_customer": “Mkd%24w8=”
]
}