Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 2.5 KB

rest-api.md

File metadata and controls

82 lines (56 loc) · 2.5 KB

Company REST API

Authentication

You can generate a token in the web dashboard of your account. Log into your account and visit the API settings page. This will act as a substitute for a username and password pair. You can revoke this token at all times in your API settings in your account.

For example Replace $TOKEN by your actual token or export it as an environment variable.

curl -X GET -H "Authorization: Bearer $TOKEN" "https://lobbipad.com/api/v1/visits/today"

API Methods

All API methods are exposed under https://lobbipad.com/api/v1/. The API is not available via unencrypted HTTP.

Get today's visits

GET /api/v1/visits/today

The API will return a JSON array of your company's visits of the current day.

Checkout all the visitors

GET /api/v1/visits/search?checkoutall=true

The API will checkout all the visitors who has checked in.

Get visits for department

GET /api/v1/visits

This endpoint returns previous visitor checkins. It support following params,

  • department - Department name
  • date_from - Visit checked in time start (eg: 01-04-2020 14:10)
  • date_until - Visit checked in time end (eg: 01-04-2020 14:10)
  • host - Host ID

It supports following pagination params,

  • limit - return limit, default 10
  • offset

Hosts Mass Sync

POST /api/v1/sync-hosts

This endpoint allows you to sync your hosts from a remote system to Lobbipad using an easy CSV format.

Input

Our API supports both:

  • sending the actual file and as form-data using file as the property for the actual file
  • sending the CSV as raw text body input

An example of the input:

lastName,email,firstName,telephone
Doe,[email protected],Jane,+32497799277
Doe,[email protected],John,+32497799288

The input is flexible, as long as the first line is there to show the order you selected, you can interchange the order of the columns to your liking.

Feedback

POST /api/v1/sync-hosts?waitForResult=true

By default you will get a fast response. If you want actual feedback on all items it's possible to opt-in to this feedback. This will take a bit longer though. Opt-in by using the waitForResult flag as shown above.


If you need any features which are missing in this API or find any issues, please email us at [email protected] or file an issue on this repository. If you are in doubt if the issue can be security related, please disclose it in private ([email protected]) first.