Skip to main content

A Python wrapper for the CheckMate REST API.

Project description


A Python wrapper for the CheckMate REST API



pip install checkmate-api


easy_install checkmate-api


import checkmate
client = checkmate.CheckMate(api_key='YOUR_KEY_HERE')

Note:: You can also pass in a different API url if needed using the api_base keyword argument.

client = checkmate.CheckMate(api_key='YOUR_KEY_HERE', api_base='API_URL_HERE')

Refer to the documentation for the final word on what’s required/optional for each call.

Search for a property

You can query the API for a property. All of the fields referenced in the query are required.{
    'name': 'Hotel Kabuki',
    'phone': '14159223200',
    'address': {
        'street': '1625 Post St',
        'city': 'San Francisco',
        'region': 'CA',
        'postal_code': '94115',
        'country_code': 'US'

List reservations

You can query the API for all your reservations or the reservations for a specific property.

# paginated list of all reservations

# fetching a different page of reservations
client.reservations.list({'page': 2})

# reservations with a specific confirmation number
client.reservations.list({'confirmation_num': '12349asdf'})

# reservations for property with id 13434543
client.reservations.list({'property_id': 13434543})

# exclude property data from the response
client.reservations.list({'exclude_properties': 'true'})

Show reservation

You can request a specific reservation from the Checkmate API.

# reservation with id 123452

Create reservation

You can create a reservation in Checkmate using either an existing property id, or by creating a new property within the request.

# reservation under property 93
    'external_id': 'someid123',
    'confirmation_number': 'sdlfkjweo324',
    'first_name': 'Jane',
    'last_name': 'Smith',
    'email': '',
    'start_on': '2016-12-20',
    'end_on': '2016-12-24',
    'property_id': 93

# creating a new property
    'external_id': 'someid123',
    'confirmation_number': 'sdlfkjweo324',
    'first_name': 'Jane',
    'last_name': 'Smith',
    'email': '',
    'start_on': '2016-12-20',
    'end_on': '2016-12-24',
    'property': {
        'name': 'New Hotel',
        'address': {
            'street': '123 Leaf Lane',
            'city': 'Brooklyn',
            'region': 'NY',
            'postal_code': '11201',
            'country_code': 'US'

Update reservation

You can update an existing reservation in Checkmate using a reservation_id.

# reservation id 12345
client.reservations.update(12345, {'loyalty_number': 'abs2332'})

Delete reservation

You can delete an existing reservation in Checkmate using a reservation_id.

# reservation id 12345

Bulk create reservations

Each reservation follows the same format as a single reservation (an optional webhook can be added at the end).

    'external_id': 'fdoo',
    'confirmation_number': '',
    'first_name': 'Frank',
    'last_name': 'Smith',
    'email': '',
    'start_on': '2015-12-20',
    'end_on': '2015-12-24',
    'property_id': 123
}, {
    'external_id': 'hfg34',
    'confirmation_number': 'gjhhffgh456',
    'first_name': 'John',
    'last_name': 'Doe',
    'email': '',
    'start_on': '2015-11-20',
    'end_on': '2015-11-24',
    'property_id': 123
}], '')


Install nose testing framework:

pip install nose

Install the mock mocking and testing library:

pip install mock

You can run tests by running the following command:



Install flake8:

pip install flake8

You can run the linter by running

flake8 checkmate

in the root directory.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for checkmate-api, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size checkmate-api-1.0.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page