API DOCUMENTATION
addBooking (POST)
Adds the given booking and returns the id.
Body params:
- reference (string, optional): The booking reference.
- id_property (string, optional): The property’s id that is being booked.
- id_status (integer, optional): The status id of the booking. You can get the statuses in the section BookingStatus.
- id_manager (string, optional): The manager id. The managers can be found using the call getUsers.
- id_intermediary (string, optional): The intermediary id. The intermediaries can be found using the call getBookingIntermediaries.
- checkin_date (date, optional): The check-in date of the booking.
- checkout_date (date, optional): The check-out date of the booking.
- booking_date (date, optional): The date of the booking.
- contract_start_date (date, optional): The start date of the booking’s contract.
- contract_end_date (date, optional): The end date of the booking’s contract.
- tenant_entry_date (date, optional): The tenant’s entry date of the booking.
- tenant_exit_date (date, optional): The tenant’s exit date of the booking.
- comments (string, optional): The booking’s comments.
- id_creator (string, optional): The booking’s creator id. The creators can be found using the call getUsers.
- id_booking_type (string, optional): The booking’s type id. The types can be found using the call getBookingTypes.
- id_payment_method (string, optional): The booking’s payment method id. The payment methods can be found using the call getBookingPaymentMethods.
- description (string, optional): The booking’s description.
- account_payer (string, optional): The booking’s payer account.
- payer_bic (string, optional): The booking’s payer bic.
- apply_vat (boolean, optional): The boolean to determine if the booking has the VAT applied.
- vat_percentage (integer, optional): The VAT’s percentage.
- apply_irpf (boolean, optional): The boolean to determine if the booking has the IRPF applied.
- irpf_percentage (integer, optional): The IRPF’s percentage.
- number_of_occupants (integer, optional): The booking’s number of occupants.
- id_original_booking (string, optional): The original booking id.
- itp_payment (boolean, optional): Boolean that determines if the booking has ITP payment.
- incasol_deposit_income (boolean, optional): Boolean to determine if the booking has Incasol deposit income.
- itp_payment_date (date, optional): The ITP’s payment date.
- incasol_deadline_date (date, optional): The Incasol deadline date.
- monthly_rent (decimal, optional): The monthly rate.
- total_rent (decimal, optional): The total rent.
- monthly_utilities (decimal, optional): The monthly cost of the utilities.
- total_utilities (decimal, optional): The total cost of the utilities.
- fees (decimal, optional): The booking’s fees.
- fees_pvp (decimal, optional): The booking’s fees pvp.
- deposit (decimal, optional): The booking’s deposit.
- deposit_months (integer, optional): The number of months of deposit.
- itp (decimal, optional): The ITP value.
- periodic_cleaning_fee (decimal, optional): The periodic cleaning fee.
- additional_guarantees (decimal, optional): The additional guarantees.
- final_cleaning_hours (string, optional): The final cleaning hours.
- deposit_date (date, optional): The deposit date.
- deposit_end_date (date, optional): The deposit end date.
- deposit_paid (boolean, optional): Boolean that indicates if the deposit is paid.
- id_deposit_management (integer, optional): The deposit management id. You can get the deposit managements in the section DepositManagements.
- id_booking_reason (string, optional): The booking reason id. The booking reasons can be found using the call getBookingReasons.
- id_source (string, optional): The source id. The sources can be found using the call getBookingSources.
- renewal_count (integer, optional): The count of renewals of the booking.
- pending_payment_amount (decimal, optional): The pending amount of the payment.
- paid_amount (decimal, optional): The paid amount.
- extra_cleaning_amount (decimal, optional): The extra cleaning amount.
- extra_cleaning_amount_pvp (decimal, optional): The extra cleaning amount pvp.
- other_amounts (decimal, optional): Other amounts.
- other_utilities_amount (decimal, optional): The other utilities amount.
- check_in_amount (decimal, optional): The check-in amount.
- check_in_amount_pvp (decimal, optional): The check-in amount pvp.
- other_description (string, optional): Another description for the booking.
- other_utilities_description (string, optional): Description for the other utilities.
- extra_damage_amount (decimal, optional): The extra damage amount.
- damage_description (string, optional): The damage description.
- stay_reason_description (string, optional): The stay reason description.
- stay_reason_english (string, optional): The stay reason in english.
- source_reason_description (string, optional): The source reason description.
- schools_description (string, optional): The schools description.
- companies_description (string, optional): The companies description.
- commercial_manager (integer, optional): The booking’s commercial manager id.
- administrator (string, optional): The booking’s administrator.
- subletting (boolean, optional): Boolean that indicates if the booking is a subletting.
- with_management (boolean, optional): Boolean that shows if the booking has management.
- housing_status_changed (boolean, optional): Boolean that shows if the property status is changed.
- signing_tenant_info: Only one is needed and it will be added to the tenants automatically, so there’s no need to insert the tenant information two times. The following fields are the ones to be sent:
- name (string, required): The name of the signing tenant.
- surnames (string, optional): The surnames of the signing tenant.
- nif_cif (string, optional): The NIF/CIF of the signing tenant.
- phone_number (string, optional): The phone number of the signing tenant.
- whatsapp (boolean, optional): Boolean that shows if the signing tenant has whatsapp.
- language (string, optional): The language of the signing tenant.
- email (string, optional): The email of the signing tenant.
- tenants_info:
- name (string, required): The name of the tenant.
- surnames (string, optional): The surnames of the tenant.
- nif_cif (string, optional): The NIF/CIF of the tenant.
- phone_number (string, optional): The phone number of the tenant.
- whatsapp (boolean, optional): Boolean that shows if the tenant has whatsapp.
- language (string, optional): The language of the tenant.
Request example
CURL:
curl --location 'https://movin.cloud/api/real-estate/add-booking' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer SECRETOKEN'
REQUEST EXAMPLE:
{
"reference": "REF-1-TEST-POSTMAN",
"id_property": “MGjf%yh934$”,
"id_status": 1,
"id_manager": “MGf3/34$”,
"id_intermediary": “Mfew3k934$”,
"id_tenant": null,
"block": 0,
"checkin_date": "2024-07-01",
"checkout_date": "2024-07-12",
"booking_date": "2024-06-01",
"contract_start_date": "2024-07-01",
"contract_end_date": "2024-07-12",
"tenant_entry_date": "2024-07-01",
"tenant_exit_date": "2024-07-12",
"comments": "Test reserva postman",
"id_creator": “M3esfk934$”,
"id_booking_type": “MGj65k934$”,
"id_payment_method": “MG5657k934$”,
"description": "Descripcio test postman",
"account_payer": "ES43905990",
"payer_bic": "r932r0943",
"apply_vat": 1,
"vat_percentage": 21,
"apply_irpf": 1,
"irpf_percentage": 11,
"number_of_occupants": 2,
"id_original_booking": “MGjfg5e934$”,
"itp_payment": 1,
"incasol_deposit_income": 1,
"itp_payment_date": "2024-07-12",
"incasol_deadline_date": "2024-07-12",
"monthly_rent": 123.12,
"total_rent": 11111.11,
"monthly_utilities": 111.11,
"total_utilities": 11111.11,
"fees": 123.12,
"fees_pvp": 123.11,
"deposit": 123.12,
"deposit_months": 1,
"itp": 123.12,
"periodic_cleaning_fee": 123.12,
"additional_guarantees": 123.12,
"final_cleaning_hours": 123.12,
"deposit_date": "2024-07-12",
"deposit_end_date": "2024-07-12",
"deposit_paid": 1,
"id_deposit_management": 1,
"id_booking_reason": 6,
"id_source": “Mgrt4k934$”,
"renewal_count": 0,
"pending_payment_amount": 0.00,
"paid_amount": 123.12,
"extra_cleaning_amount": 12.12,
"extra_cleaning_amount_pvp": 12.12,
"other_amounts": 12.12,
"other_utilities_amount": 12.12,
"check_in_amount": 1.11,
"check_in_amount_pvp": 1.11,
"other_description": "Altra descripcio test postman",
"other_utilities_description": "Blablablaablabalbalblablablablabla",
"extra_damage_amount": 12.12,
"damage_description": "Blablablablablablablablablablablablabla",
"stay_reason_description": "Blablablablablablablablablablablablabla",
"stay_reason_english": "blblabalablablablablabla",
"source_reason_description": "blabalblablablablablablablabla",
"schools_description": "blablablablalblablablablabla",
"companies_description": "blablablablablabllbalablalbalblablabla",
"commercial_manager": 6653,
"administrator": "blablabla",
"subletting": 0,
"with_management": 0,
"housing_status_changed": 0,
"signing_tenant_info": {
"name": "Test",
"surnames": "Postman 1",
"nif_cif": "87473278F",
"phone_number": "123499912",
"whatsapp": 1,
"language": "ca",
"email": "qwertyas12312@sdsd1.sd"
},
"tenants_info" : [
{
"name": "Test",
"surnames": "Postman 2",
"nif_cif": "874732781F",
"phone_number": "78945611412",
"whatsapp": 1,
"language": "ca"
},
{
"name": "Test",
"surnames": "Postman 3",
"nif_cif": "874732782F",
"phone_number": "45612389912",
"whatsapp": 1,
"language": "ca"
}
]
}
Response Example
{
“data”: [
“id”: “MG43k934$”
]
}