Fitness examples

BatchAvailabilityLookup (slot click)

Request

{
   "merchant_id" : "1234",
   "slot_time" : [
      {
         "availability_tag" : "5042328",
         "duration_sec" : "4500",
         "resource_ids" : {
            "staff_id" : "276191"
         },
         "service_id" : "5678",
         "start_sec" : "1606359600"
      }
   ]
}

Response

{
   "slot_time_availability" : [
      {
         "available" : true,
         "slot_time" : {
            "availability_tag" : "5042328",
            "confirmation_mode" : "CONFIRMATION_MODE_SYNCHRONOUS",
            "duration_sec" : "4500",
            "resource_ids" : {
               "staff_id" : "276191"
            },
            "service_id" : "5678",
            "start_sec" : "1606359600"
         }
      }
   ]
}

CreateBooking

Request

{
   "idempotency_token" : "13490670332760737439",
   "payment_information" : {
      "prepayment_status" : "PREPAYMENT_NOT_PROVIDED"
   },
   "slot" : {
      "availability_tag" : "5042328",
      "confirmation_mode" : "CONFIRMATION_MODE_SYNCHRONOUS",
      "duration_sec" : "4500",
      "merchant_id" : "1234",
      "resources" : {
         "staff_id" : "276191"
      },
      "service_id" : "5678",
      "start_sec" : "1606359600"
   },
   "user_information" : {
      "email" : "john.smith@gmail.com",
      "family_name" : "Smith",
      "given_name" : "John",
      "telephone" : "+12091111111",
      "user_id" : "1111111111111111111"
   }
}

Response

{
   "booking" : {
      "booking_id" : "890",
      "payment_information" : {
         "prepayment_status" : "PREPAYMENT_NOT_PROVIDED"
      },
      "slot" : {
         "availability_tag" : "5042328",
         "confirmation_mode" : "CONFIRMATION_MODE_SYNCHRONOUS",
         "duration_sec" : "4500",
         "merchant_id" : "1234",
         "resources" : {
            "staff_id" : "276191"
         },
         "service_id" : "5678",
         "start_sec" : "1606359600"
      },
      "status" : "CONFIRMED",
      "user_information" : {
         "email" : "john.smith@gmail.com",
         "family_name" : "Smith",
         "given_name" : "John",
         "telephone" : "+12091111111",
         "user_id" : "1111111111111111111"
      }
   }
}

UpdateBooking

Request

{
   "booking" : {
      "booking_id" : "890",
      "status" : "CANCELED"
   }
}

Response

{
   "booking" : {
      "booking_id" : "890",
      "status" : "CANCELED"
   }
}