Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

davidplappert/bnbhostapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bnbhostapi

I, David Plappert, am an Airbnb Superhost. I, also, want to be able to build tools to support my business, the way I want. Currently, I pay about $40 per month for tools that only do some of what I want. SmartBnb, Properly, QuickBooks, and others are a good start. However, I want more control, customization and automation.

This wrapper exposes API end points that allow you to:

  • login to Airbnb and get an oauth token (this has to be frist before you do anything else)
  • Get listings
  • Get listing details
  • Get messages
  • Get message details
  • Send messages
  • Get calendar for a listing
  • Update calendar for a listing (change prices, availbility, notes)
  • get Payouts (used to get a list of reservations, past and future - also gives you exact $ for accounting)
  • get reservation details
  • get user details (info about your guests)

To set this API up, follow these steps:

I assume you have node installed (nvm maybe?) and that you have a listing on AirBnb.

  1. npm install bnbhostapi (or git clone [email protected]:davidplappert/bnbhostapi.git && npm install)
  2. export bnbhostapi_username='xxxxxxx' (replace with your email)
  3. export bnbhostapi_password='xxxxxxx' (replace with your password)
  4. node examples/login.js (this generates a oauth token we need for the rest of the api calls)
  5. export bnbhostapi_oauthtoken = xxxxxx (output from the above script)
  6. node examples/getPayouts.js (to make sure your setup is correct).

This following sippet will return all your payout info along with all the reservation info.

var bnbhostapi = require('bnbhostapi');
bnbhostapi.getPayouts(true).
each(function(payout){
  bnbhostapi.getReservation(payout['reservation']['confirmation_code'])
  .then(function(reservation){
    console.log(reservation);
  });
});

Forward looking features:

  • leave reviews
  • charge for extra services
  • stats and more details for reporting

Credits:

Releases

No releases published

Packages

No packages published