Pitstop One API

API methods

Get API status

GET https://api.pitstop-one.com/api/

  • should return {"status":"ok"}

Example

curl https://api.pitstop-one.com/api/?apiKey=<YOUR-API-KEY>

Import a list of users

POST https://api.pitstop-one.com/api/import/oracle

  • Requires Content-type: text/csv
  • POST body: accepts a CSV file with a list of users with tokens from the hotel system
  • Creates users and attaches tokens of those users to the Teclred demo user
  • Sends pitstopId, phone, and hotel ID to Magma API (CardPlus app backend)
  • Returns a list of imported users

Example

Using the example csv

curl -vvv -H 'Content-type: text/csv' -X POST --data-binary @example.csv \
https://api.pitstop-one.com/api/import/oracle?apiKey=<YOUR-API-KEY>

Open a door

POST https://api.pitstop-one.com/api/doors/:id/open

  • Opens the door with ID :id (can be arbitrary for the POC)
  • POST body: { "id": "pitstop-user-id" }

Example

curl -d'{ "id": "eab561c0-49b3-11e9-b163-a13da04e97bc" }' https://api.pitstop-one.com/api/doors/-/open?apiKey=<YOUR-API-KEY>