End Point

POST /api/lastminute/booking

Create booking

{
  "BookingId": "b7fca559-9bfa-4f53-b913-ce64c250b676",

  "Date": "2018-10-09",

  "StartTime": "08:00:00",

  "EndTime": "17:00:00",

  "Fee": 100.00,

  "SmartFeesEnrolmentId": "sfdev_3791",

  "SmartFeesRoomId": "sfdev_114",

  "TransactionType": "Booking",

  "Action": "Create"
}

SessionCodeId is no longer required given the flexible nature of the bookings. We do need Date, Times, Fee instead

Create Absence

{
  "BookingId": "b7fca559-9bfa-4f53-b913-ce64c250b676",

  "Date": "2018-10-09",

  "Fee": 50.00,

  "TransactionType": "Absence",

  "Action": "Create"
}

Absence is related to a booking. Date is required but fee is optional

Cancel Absence

{
  "BookingId": "b7fca559-9bfa-4f53-b913-ce64c250b676",

  "TransactionType": "Absence",

  "Action": "Cancel"
}

Cancel Booking

{
  "BookingId": "b7fca559-9bfa-4f53-b913-ce64c250b676",

  "TransactionType": "Booking",

  "Action": "Cancel"
}

Get Service Data

GET /api/lastminute/service/[service_id]

e.g.

https://test.smartcentral.net/api/lastminute/service/sfsta_976

Sample response:

{
  "CentreName": "FLUFFY FOOTS OSHC",
  "EmailAddress": "zosh@smartcentral.net.sc",
  "StreetAddress": null,
  "Suburb": null,
  "State": null,
  "Postcode": null,
  "ServiceType": "ZOSH",
  "ApprovedPlaces": 0,
  "ServiceStartDate": null,
  "Children": [
    {
      "Id": "sfsta_18948",
      "FirstName": "Lucy",
      "LastName": "Brown",
      "Gender": "f",
      "DateOfBirth": "2015-01-20T00:00:00+00:00"
    },
  ],
  "Parents": [
    {
      "Id": "sfsta_16878",
      "FirstName": "Charlie",
      "LastName": "Brown",
      "Email": "ctattewell@hotmail.com",
      "UserIds": [
        "sfsta_400"
      ]
    },
  ],
  "Enrolments": [
    {
      "Id": "sfsta_22056",
      "ChildId": "sfsta_18948",
      "ParentId": "sfsta_16878",
      "StartDate": "2018-12-17T00:00:00+00:00",
      "EndDate": null,
      "WeeklyAttendance": [
        {
          "Mon": "Y",
          "Tue": "Y",
          "Wed": "Y",
          "Thu": "Y",
          "Fri": "Y",
          "Sat": "N",
          "Sun": "N",
          "AttendanceNotes": null,
          "BookingId": "sfsta_2122",
          "RoomId": "sfsta_750",
          "SessionCodeId": "sfsta_429",
          "StartDate": "2019-03-04T00:00:00+00:00",
          "EndDate": null
        }
      ]
    },
  ],
  "Rooms": [
    {
      "Id": "sfsta_752",
      "Name": "ASC_Panda",
      "Capacity": 10,
      "AgeGroups": []
    },
  ],
  "StaffMembers": [
    {
      "Id": "sfsta_9",
      "Type": "Admin",
      "Email": "corrie@smartfees.com.au"
    },
  ],
  "PublicSessionCodes": [
    {
      "Id": "sfsta_453",
      "Price": 50,
      "StartTime": "15:00:00",
      "EndTime": "18:00:00",
      "IsHourlyRate": false
    },
  ]
}