Skip to content
Andrew Jones edited this page Nov 11, 2020 · 24 revisions

Request:

  • Url /apis/booking

  • Method POST

  • Content-Type application/json

  • Payload

Booking Migration & Import

This API endpoint is used to migrate booking data from one system to another, it should not be used for real time bookings from a website

  1. Specify "BookingId" in request payload to update existing booking.
  2. Remove "BookingId" field or specify null value for creating new booking.
  3. Use "RepContactId" for linking to a existing user. Specify the user email on "RepContact" for linking via user's email. "RepContactId" is prior when both "RepContactId" and "RepContact" have value.
  4. Use "ContactId" for linking to a existing customer. Specify the customer details on "Contact" for creating new. "ContactId" is prior when both "ContactId" and "Contact" have value.
  5. Remove "SecurityDeposit" field or specify null value for default to the value from relevant property.
  6. Remove "RenterExtras" field or specify null value for calculating it from extra details.
  7. Remove "OwnerExtras" field or specify null value for calculating it from extra details.
{
  "BookingId": null,
  "ExternalId": "968751",
  "TransactionId": "40e47410-2733-4194-b194-c7b1c44c00ff",
  "BrandId": null,
  "BookingStatusId": 3,
  "OrderTime": "2020-01-15 18:30",
  "ModifiedTime": "2020-01-17 09:01",
  "Currency": "",
  "BookingFee": 25.00,
  "BookingFeeVAT": 0,
  "Compensation": 0,
  "CompensationOwnerShare": 0,
  "HolidayNotes": "",
  "InternalNotes": "",
  "ArrivalNotes": "",
  "DepartureNotes": "",
  "Source": "Website",
  "RepContactId": null,
  "RepContact": {
    "Email": "tommy.ludford@ipro-software.com"
  },
  "ContactId": null,
  "Contact": {
    "ExternalId": "abc123d",
    "Title": "Mr",
    "FirstName": "Arthur",
    "LastName": "Arquibel",
    "Email": "arthur.arquibel@fake.co.uk",
    "Email1": "",
    "Email2": "",
    "Mobile": "07907800010",
    "AltPhone": "",
    "Telephone": "02037119448",
    "Address": "Oulds",
    "Address1": "14 Woodcote Hall",
    "Postcode": "SM10 0QT",
    "County": "",
    "City": "Wallington Surrey",
    "Country": "United Kingdom",
    "CompanyName": "",
    "Signature": "",
    "Source": "",
    "Comments": "",
    "ByPost": false,
    "ByEmail": false,
    "ByTelephone": false,
    "BySms": false,
    "AddedToBlacklist": false,
    "OnEmailList": false,
    "IsArchived": false
  },
  "Tags": [
    "Contractor",
    "Complaint Raised"
  ],
  "Properties": [
    {
      "PropertyId": 8849,
      "CheckInDate": "2020-01-17",
      "CheckOutDate": "2020-01-24",
      "CheckInTime": "18:12",
      "CheckOutTime": "11:30",
      "Adults": 1,
      "Children": 0,
      "Infants": 0,
      "Notes": "guest notes",
      "HouseKeeperNotes": "house keeper notes",
      "Discount": 62.4,
      "Commission": 65.89,
      "CommissionVAT": 20.00,
      "SecurityDeposit": 100.00,
      "SecurityInsurance": null,
      "RenterAmount": 285.60,
      "RenterExtras": null,
      "RenterTotal": 285.60,
      "RenterBalance": 149.60,
      "OwnerAmount": 183.71,
      "OwnerExtras": null,
      "OwnerTotal": 183.71,
      "OwnerBalance": 183.71,
      "BalanceDueDate": "2020-05-08",
      "Guests": [
        {
          "Name": "Arthur Arquibel",
          "Age": "20",
          "Passport": "",
          "Email": "arthur.arquibel@fake.co.uk",
          "Mobile": "07906900010"
        }
      ],
      "Extras": [
        {
          "Name": "Travel Cot",
          "Description": "Travel Cot (including bedding)",
          "Quantity": 1,
          "Price": 36.00,
          "NetPrice": 0,
          "PayableToOwner": false
        },
        {
          "Name": "Pets",
          "Description": "Pets",
          "Quantity": 2,
          "Price": 10.00,
          "NetPrice": 0,
          "PayableToOwner": false
        }
      ]
    }
  ],
  "Payments": [
    {
      "Amount": 136.00,
      "PaymentMethod": "Visa",
      "PaymentDate": "2020-01-17 09:02:05",
      "PaymentCategory": 0,
      "PaymentType": 0,
      "Comments": "{00F993E3-F9E3-A10A-54FF-10D1903445EC}"
    }
  ],
  "PaymentSchedules": [
    {
      "Name": "Deposit",
      "Amount": 16.29,
      "Balance": 0,
      "DueDate": "2020-01-15",
      "PaidTime": "2020-01-15",
      "PayTo": 0,
      "Status": 2,
      "PaymentCategory": 1,
      "PaymentType": 2
    },
    {
      "Name": "Balance",
      "Amount": 183.71,
      "Balance": 183.71,
      "DueDate": "2020-06-22",
      "PaidTime": null,
      "PayTo": 0,
      "Status": 0,
      "PaymentCategory": 2,
      "PaymentType": 2
    }
  ]
}
  • "PaymentCategory" optional
    0 - None
    1 - Deposit
    2 - BalancePaid
    3 - Refunded
    4 - PartPayment
    5 - DamagesPayment
    6 - DeferredPayment
    7 - CashOnArrival
    8 - CompensationAwarded
    9 - CancellationFee
    10 - TransferSecurityDeposit
    11 - BookingFee
    12 - HolidayExtra

  • "PaymentType" optional
    0 - None
    1 - PaymentToOwner
    2 - ReceiptFromRenter
    3 - BreakagesDeposit
    4 - PaymentToSupplier
    5 - PaymentToGuest
    6 - TransferSecurityDeposit
    7 - BreakagesInsurance

  • "PayTo" required
    0 - Client
    1 - Supplier
    2 - Commission

  • "ScheduleStatus" required
    0 - Pending
    1 - Overdue
    2 - Paid
    3 - Overpaid
    4 - Underpaid

Response:

  • Content-Type application/json

  • Payload

{
  "BookingId": 5917,
  "Success": true,
  "Logs": [
    "..."
  ]
}

Error Response:

  • Content-Type application/json

  • Payload

{
  "Success": false,
  "Message": "..."
}
Clone this wiki locally