node-bookeo
Node API for Bookeo REST API, based on mappersmith.
Works on the server AND the browser :)
Adds some helpers
Usage
const bookeo = secretKey apiKey ; bookeoclientbookingsall
REST mapping
bookeo.client
gives you access to mappersmith instances from src/api.js.
Custom methods
method | description |
---|---|
bookeo.bookings(params) | GET /bookings |
bookeo.booking(id, options) | GET /bookings/{bookingId} |
bookeo.slots(params) | GET /availability/slots |
bookeo.products(params) | GET /settings/products |
bookeo.subaccounts(params) | GET /subaccounts |
- bookeo.booking options : expand(false) : expand booking customer + payments
Utilities
method | description |
---|---|
bookeo.setApikey(apikey) | change API key for next requests |
bookeo.getAllSlots(params) | return all available slots grouped by products |
Permissions
To get ApiKey with correct permission, send this link to user : https://signin.bookeo.com/?authappid=xxxxxx&permissions=bookings_r_all,availability_r,blocks_r_all
. see the scopes docs.
Tests
Bookeo General ✓ add credentials headers to request ✓ return data key Bookings ✓ add default startTime as 'startOfToday' ✓ add default endTime when not given ✓ return data key ✓ pass parameters Subaccounts ✓ pass parameters ✓ return data key Products ✓ pass parameters ✓ return data key Slots ✓ pass parameters ✓ return data key getAllSlots ✓ should return all slots grouped by product booking ✓ should request bookeo api ✓ expand=false should have no customer, payments ✓ expand=true should have customer + payments payments ✓ should request bookeo api 18 passing (94ms)
See also
- bookeo-proxy : you need this to use node-bookeo in the browser
- react-bookeo