Booking status in API

I'm using the PHP library to create new bookings from Wordpress/WooCommerce, and it's working great except they all come in as Reserved (instead of Pending, or some other preliminary state).  I don't see in the docs how to specify what status to use on the new booking?

Comments

  • edited February 2016
    Hi weetravel, thanks for reaching out on the Checkfront forums!

    The booking status will be whatever the default status is set on your account at Manage > Setup > Configuration. However, immediately after creating the booking (using the API) you can send a request to "booking/ID/update" to change the status. The code could look something like this:

        public function changeStatusToReserved($id) {
    
    	$data   = [
    	    'status_id' => 'HOLD'
    	];
    
    	$status = $this->checkfront->post( 'booking/' . $id . '/update', $data );
    
    	return $status;
        }
  • Hi
    i am looking developer for integrate API booking system for my website airport parking

  • Hi airportparking4u,

    Thanks for your comment.   I would recommend posting your own discussion thread to discuss what you need the API to do to ensure that your request is being seen.  

    Thanks,

    Aaron B.
Sign In or Register to comment.