Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this is an example of the Uber API
- # as a demonstration of an API spec in YAML
- swagger: '2.0'
- info:
- title: Schedular API
- description: Use Schedular APIs to book rooms and people
- version: "1.0.0"
- # the domain of the service
- host: api.schedular.eu
- # array of all schemes that your API supports
- schemes:
- - https
- # will be prefixed to all paths
- basePath: /api/v1
- produces:
- - application/json
- paths:
- /projectinternus/companies:
- get:
- summary: Get all companies
- description: Get all project internus companies
- tags:
- - Project Internus
- responses:
- 200:
- description: Array with companies info
- /projectinternus/isRoomAvailable:
- get:
- summary: Is a room available?
- description: Is a chosen room available at a certain datetime
- parameters:
- - name: room_id
- in: formData
- description: room ID of the room you want to check
- type: string
- - name: start
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of rooms with info and availability
- examples:
- application/json:
- room_id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- schema:
- type: array
- items:
- type: array
- properties:
- room_id:
- type: integer
- format: int64
- name:
- type: string
- people_capacity:
- type: integer
- format: int64
- image_url:
- type: string
- description:
- type: string
- /projectinternus/AvailableRooms:
- get:
- summary: Get available rooms
- description: Get available rooms with specific parameters sent
- parameters:
- - name: start
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of rooms with info and availability
- examples:
- application/json:
- room_id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- schema:
- type: array
- items:
- type: array
- properties:
- room_id:
- type: integer
- format: int64
- name:
- type: string
- people_capacity:
- type: integer
- format: int64
- image_url:
- type: string
- description:
- type: string
- /projectinternus/confirmAppointment:
- post:
- summary: Confirm an Appointment
- description: |
- This function is used to save the appointment
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: appointment_startdate
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- - name: title
- in: formData
- description: Title of appointment
- required: false
- type: string
- - name: description
- in: formData
- description: Description of appointment (and/or notes)
- required: false
- type: string
- - name: members
- in: formData
- description: Everyone in the ´CC´ field
- required: true
- type: array
- items:
- type: string
- minLength: 5
- - name: room_id
- in: formData
- description: Room ID
- required: true
- type: integer
- format: int64
- default: 1
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- success: true
- /projectinternus/RoomInfo:
- get:
- summary: Get information about a room
- description: Get information about one specific room, no authentication needed at this point
- parameters:
- - name: room_id
- in: formData
- description: Room ID as specified in other responses
- required: true
- type: integer
- format: int64
- default: 1
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- /projectinternus/retrieveAppointments:
- get:
- summary: Get all user appointments
- description: A way to get all the appointments from a single user
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- id: 1
- company_id: 1
- user_id: 9223372036854775807
- room_id: 1
- book_datetime: "2017-01-18 08:10:00"
- start_datetime: "2017-01-18 08:10:00"
- end_datetime: "2017-01-18 08:20:00"
- title: Title of the appointment if present
- description: Description or notes if present
- /projectinternus/allRooms:
- get:
- summary: Get all rooms
- description: A way to retrieve all the rooms within one company
- parameters:
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of success, same as RoomInfo, but for all rooms
- /projectinternus/cancelAppointment:
- delete:
- summary: Cancel an appointment
- description: Change the status from an appointment to cancelled
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: appointment_id
- in: formData
- description: Appointment ID
- required: true
- type: integer
- format: int64
- default: 1
- tags:
- - Project Internus
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- success: true
- /projectinternus/saveContacts:
- get:
- summary: Save multiple contacts
- description: Function to save multiple contacts, for example to upload the address book from an user to our server
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: contacts_name[]
- in: formData
- description: Array of contacts names
- required: true
- type: array
- items:
- type: string
- minLength: 3
- default: Calvin Uijlen
- - name: contacts_email[]
- in: formData
- description: Array of contacts mails
- required: true
- type: array
- items:
- type: string
- minLength: 5
- default: [email protected]
- tags:
- - Project Internus
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- /businessbookingdialog/companies:
- get:
- summary: Get all companies
- description: Get all Schedular for Business booking popup companies
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: Array with companies info
- /businessbookingdialog/isRoomAvailable:
- get:
- summary: Is a room available?
- description: Is a chosen room available at a certain datetime
- parameters:
- - name: room_id
- in: formData
- description: room ID of the room you want to check
- type: string
- - name: start
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of rooms with info and availability
- examples:
- application/json:
- room_id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- schema:
- type: array
- items:
- type: array
- properties:
- room_id:
- type: integer
- format: int64
- name:
- type: string
- people_capacity:
- type: integer
- format: int64
- image_url:
- type: string
- description:
- type: string
- /businessbookingdialog/AvailableRooms:
- get:
- summary: Get available rooms
- description: Get available rooms with specific parameters sent
- parameters:
- - name: start
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of rooms with info and availability
- examples:
- application/json:
- room_id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- schema:
- type: array
- items:
- type: array
- properties:
- room_id:
- type: integer
- format: int64
- name:
- type: string
- people_capacity:
- type: integer
- format: int64
- image_url:
- type: string
- description:
- type: string
- pricing:
- type: string
- currency:
- type: string
- rate:
- type: string
- /businessbookingdialog/confirmAppointment:
- post:
- summary: Confirm an Appointment
- description: |
- This function is used to save the appointment
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: appointment_startdate
- in: formData
- description: UNIX_TIMESTAMP of start datetime appointment
- required: true
- type: integer
- format: int64
- default: 1485526345
- - name: duration
- in: formData
- description: Duration in minutes
- required: true
- type: integer
- format: int64
- default: 60
- - name: people
- in: formData
- description: Amount of people
- required: true
- type: integer
- format: int64
- default: 5
- - name: title
- in: formData
- description: Title of appointment
- required: false
- type: string
- - name: description
- in: formData
- description: Description of appointment (and/or notes)
- required: false
- type: string
- - name: members
- in: formData
- description: Everyone in the ´CC´ field
- required: true
- type: array
- items:
- type: string
- minLength: 5
- - name: room_id
- in: formData
- description: Room ID
- required: true
- type: integer
- format: int64
- default: 1
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- success: true
- /businessbookingdialog/RoomInfo:
- get:
- summary: Get information about a room
- description: Get information about one specific room, no authentication needed at this point
- parameters:
- - name: room_id
- in: formData
- description: Room ID as specified in other responses
- required: true
- type: integer
- format: int64
- default: 1
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- id: 1
- company_id: 1
- name: The Kid Room
- people_capacity: 10
- image_url: https://yolodetolo.com/image.jpg
- description: Stupid children making noise
- /businessbookingdialog/retrieveAppointments:
- get:
- summary: Get all user appointments
- description: A way to get all the appointments from a single user
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- id: 1
- company_id: 1
- user_id: 9223372036854775807
- room_id: 1
- book_datetime: "2017-01-18 08:10:00"
- start_datetime: "2017-01-18 08:10:00"
- end_datetime: "2017-01-18 08:20:00"
- title: Title of the appointment if present
- description: Description or notes if present
- /businessbookingdialog/allRooms:
- get:
- summary: Get all rooms
- description: A way to retrieve all the rooms within one company
- parameters:
- - name: chash
- in: header
- description: Hash to authorize actions with a certain company
- required: true
- type: string
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of success, same as RoomInfo, but for all rooms
- /businessbookingdialog/cancelAppointment:
- delete:
- summary: Cancel an appointment
- description: Change the status from an appointment to cancelled
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: appointment_id
- in: formData
- description: Appointment ID
- required: true
- type: integer
- format: int64
- default: 1
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: JSON response of success
- examples:
- application/json:
- success: true
- /businessbookingdialog/saveContacts:
- get:
- summary: Save multiple contacts
- description: Function to save multiple contacts, for example to upload the address book from an user to our server
- parameters:
- - name: auth
- in: header
- description: Auth0 JWT
- required: true
- type: integer
- format: int64
- default: AUTH0_ID_TOKEN_HERE
- - name: contacts_name[]
- in: formData
- description: Array of contacts names
- required: true
- type: array
- items:
- type: string
- minLength: 3
- default: Calvin Uijlen
- - name: contacts_email[]
- in: formData
- description: Array of contacts mails
- required: true
- type: array
- items:
- type: string
- minLength: 5
- default: [email protected]
- tags:
- - Schedular for Business booking popup
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- /link/roomqr/{roomcode}:
- get:
- summary: Get room info from QR string
- description: Get all the room information belonging to a certain string saved in a QR code
- parameters:
- - name: roomcode
- in: path
- description: Roomcode (string)
- required: true
- type: string
- tags:
- - Link
- responses:
- 200:
- description: Room information
- /backend/login:
- post:
- summary: Log in to the admin panel
- description: dat dus
- parameters:
- - name: username
- in: formData
- description: Emailaddress
- required: true
- type: string
- - name: password
- in: formData
- description: Password
- required: true
- type: string
- - name: company_id
- in: formData
- description: Company ID
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Admin
- /backend/appointment:
- post:
- summary: Save a new appointment
- description: Admin panel API to save a new appointment
- parameters:
- - name: userid
- in: header
- description: UserID of admin user
- required: true
- type: integer
- format: int64
- default: userid
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: start
- in: formData
- description: UNIX timestamp of start_datetime
- required: true
- type: string
- - name: end
- in: formData
- description: UNIX timestamp of end_datetime
- required: true
- type: string
- - name: room_id
- in: formData
- description: room-rooms that are going to be booked, single room_id or multiple room_id, separate with comma
- required: false
- type: string
- - name: duration
- in: formData
- description: duration in minutes
- required: true
- type: integer
- format: int64
- - name: title
- in: formData
- description: title of appointment
- required: false
- type: string
- - name: description
- in: formData
- description: description of appointment
- required: false
- type: string
- tags:
- - Admin
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- put:
- summary: Update an appointment
- description: Admin panel API to update an appointment
- parameters:
- - name: userid
- in: header
- description: UserID of admin user
- required: true
- type: integer
- format: int64
- default: userid
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: appointment_id
- in: formData
- description: ID of appointment
- required: true
- type: integer
- format: int64
- - name: start
- in: formData
- description: UNIX timestamp of start_datetime
- required: true
- type: string
- - name: end
- in: formData
- description: UNIX timestamp of end_datetime
- required: true
- type: string
- - name: room_id
- in: formData
- description: room-rooms that are going to be booked, single room_id or multiple room_id, separate with comma
- required: false
- type: string
- - name: duration
- in: formData
- description: duration in minutes
- required: true
- type: integer
- format: int64
- - name: title
- in: formData
- description: title of appointment
- required: false
- type: string
- - name: description
- in: formData
- description: description of appointment
- required: false
- type: string
- tags:
- - Admin
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- delete:
- summary: Delete an appointment
- description: Admin panel API to delete an appointment
- parameters:
- - name: userid
- in: header
- description: UserID of admin user
- required: true
- type: integer
- format: int64
- default: userid
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: appointment_id
- in: formData
- description: ID of appointment
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- /backend/appointment/{appointment_id}:
- get:
- summary: Get an appointment
- description: Admin panel API to get an appointment
- parameters:
- - name: userid
- in: header
- description: UserID of admin user
- required: true
- type: integer
- format: int64
- default: userid
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: appointment_id
- in: path
- description: appointment_id
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Per contact posted, the API returns a 1 or 0, 1 means the contact was inserted, 0 means it was not inserted
- /backend/getappointmentscalendar:
- get:
- summary: Get an appointment
- description: Admin panel API to get calendar appointments
- parameters:
- - name: userid
- in: header
- description: UserID of admin user
- required: true
- type: integer
- format: int64
- default: userid
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: view
- in: formData
- description: day or threeday or week or month
- required: true
- type: string
- - name: room_id
- in: formData
- description: Room ID
- required: false
- type: integer
- format: int64
- - name: staff_id
- in: formData
- description: Staff ID
- required: false
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Get all the appointments my friend
- /backend/room/{room_id}:
- get:
- summary: Get a room
- description: Admin panel API to get a room
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: room_id
- in: path
- description: room ID
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Get a certain room
- delete:
- summary: Delete a room
- description: Admin panel API to delete a room
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: room_id
- in: path
- description: room ID
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Delete the room mate
- /backend/userlist:
- get:
- summary: List users
- description: Get all connected users to a certain company
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- tags:
- - Admin
- responses:
- 200:
- description: Get all the appointments my friend
- /backend/inviteuser/{user_email}:
- get:
- summary: Invite User
- description: Intended for invite button in backend
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: user_email
- in: path
- description: Email address of the user you are trying to invite
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Success true or false
- /backend/staff/{staff_id}:
- get:
- summary: Get information about staff
- description: Get one staff account
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- - name: staff_id
- in: path
- description: Staff ID
- required: true
- type: integer
- format: int64
- tags:
- - Admin
- responses:
- 200:
- description: Staff info
- /backend/staff:
- get:
- summary: Get information about staff
- description: Get multiple staff account
- parameters:
- - name: apikey
- in: header
- description: API key received by server when logging on
- required: true
- type: integer
- format: int64
- default: api key
- tags:
- - Admin
- responses:
- 200:
- description: Multiple staff info
- definitions:
- Product:
- type: object
- properties:
- product_id:
- type: string
- description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles.
- description:
- type: string
- description: Description of product.
- display_name:
- type: string
- description: Display name of product.
- capacity:
- type: string
- description: Capacity of product. For example, 4 people.
- image:
- type: string
- description: Image URL representing the product.
- PriceEstimate:
- type: object
- properties:
- product_id:
- type: string
- description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles
- currency_code:
- type: string
- description: "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code."
- display_name:
- type: string
- description: Display name of product.
- estimate:
- type: string
- description: Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or "Metered" for TAXI.
- low_estimate:
- type: number
- description: Lower bound of the estimated price.
- high_estimate:
- type: number
- description: Upper bound of the estimated price.
- surge_multiplier:
- type: number
- description: Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier.
- Profile:
- type: object
- properties:
- first_name:
- type: string
- description: First name of the Uber user.
- last_name:
- type: string
- description: Last name of the Uber user.
- email:
- type: string
- description: Email address of the Uber user
- picture:
- type: string
- description: Image URL of the Uber user.
- promo_code:
- type: string
- description: Promo code of the Uber user.
- Activity:
- type: object
- properties:
- uuid:
- type: string
- description: Unique identifier for the activity
- Activities:
- type: object
- properties:
- offset:
- type: integer
- format: int32
- description: Position in pagination.
- limit:
- type: integer
- format: int32
- description: Number of items to retrieve (100 max).
- count:
- type: integer
- format: int32
- description: Total number of items available.
- history:
- type: array
- items:
- $ref: '#/definitions/Activity'
- Error:
- type: object
- properties:
- code:
- type: integer
- format: int32
- message:
- type: string
- fields:
- type: string
Advertisement
Add Comment
Please, Sign In to add comment