Skip to content

Instantly share code, notes, and snippets.

@skalingclouds
Created November 5, 2024 01:25
Show Gist options
  • Select an option

  • Save skalingclouds/0456c10f99c755b6e1006503ac89b59e to your computer and use it in GitHub Desktop.

Select an option

Save skalingclouds/0456c10f99c755b6e1006503ac89b59e to your computer and use it in GitHub Desktop.
openapi: 3.1.0
info:
title: Atlas Danckuts API
version: '1.0.0'
description: API documentation for Atlas Danckuts services
servers:
- url: https://atlas.danckuts.com
description: Atlas Danckuts API server
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
apiKeyAuth:
type: apiKey
in: header
name: AUTHORIZATION
schemas:
SuccessResponse:
type: object
required:
- success
- payload
properties:
success:
type: boolean
payload:
type: object
ErrorResponse:
type: object
required:
- success
- message
properties:
success:
type: boolean
message:
type: string
AppointmentBase:
type: object
required:
- id
- location
- date
- type
- checkedin
- dependent
- rating
properties:
id:
type: integer
location:
type: string
date:
type: string
type:
type: string
checkedin:
type: boolean
dependent:
type: [integer, 'null']
rating:
type: ['null']
paths:
/api/appointments/cancel:
post:
summary: Cancel an appointment
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- appointmentId
properties:
appointmentId:
type: integer
responses:
'200':
description: Appointment cancelled successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- message
properties:
message:
type: string
/api/appointments/recent:
get:
summary: Get recent appointments
security:
- bearerAuth: []
- apiKeyAuth: []
responses:
'200':
description: Recent appointments retrieved successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- future
- past
properties:
future:
type: array
items:
$ref: '#/components/schemas/AppointmentBase'
past:
type: array
items:
$ref: '#/components/schemas/AppointmentBase'
/api/appointments/reschedule:
post:
summary: Reschedule an appointment
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- appointmentId
- location
- time
properties:
appointmentId:
type: string
location:
type: string
time:
type: string
responses:
'200':
description: Appointment rescheduled successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- message
properties:
message:
type: string
/api/appointments/schedule:
post:
summary: Schedule a new appointment
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- location
- time
properties:
location:
type: string
time:
type: string
responses:
'200':
description: Appointment scheduled successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- message
properties:
message:
type: string
/api/auth/check-text-code:
post:
summary: Verify text verification code
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- phoneNumber
- code
properties:
phoneNumber:
type: string
code:
type: string
responses:
'200':
description: Code verified successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- token
properties:
token:
type: string
/api/auth/me:
get:
summary: Get current user information
security:
- bearerAuth: []
- apiKeyAuth: []
responses:
'200':
description: User information retrieved successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- user
properties:
user:
type: object
required:
- id
- name
- phoneNumber
- profileImage
- recentCuts
- totalCuts
- years
- email
- emailVerified
- joinDate
- recentShops
- pronouns
- birthday
- primaryCardId
- rate
- dependents
- notificationSettings
- cards
- restrictionLevel
properties:
id:
type: integer
name:
type: string
phoneNumber:
type: string
profileImage:
type: string
recentCuts:
type: array
items:
type: integer
totalCuts:
type: integer
years:
type: integer
email:
type: string
emailVerified:
type: boolean
joinDate:
type: string
recentShops:
type: array
items:
type: string
pronouns:
type: ['null', string]
birthday:
type: ['null', string]
primaryCardId:
type: ['null', string]
rate:
type: integer
dependents:
type: array
items:
type: object
required:
- id
- first_name
- last_name
- location
properties:
id:
type: integer
first_name:
type: string
last_name:
type: string
location:
type: ['null', string]
notificationSettings:
type: object
required:
- push
- text
- email
properties:
push:
type: boolean
text:
type: boolean
email:
type: boolean
cards:
type: array
items:
type: object
restrictionLevel:
type: ['null', string]
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/auth/phone-number-has-user:
post:
summary: Check if phone number is associated with a user
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- phoneNumber
properties:
phoneNumber:
type: string
responses:
'200':
description: Phone number check completed
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- message
properties:
message:
type: string
/api/auth/send-text-code:
post:
summary: Send verification code via text
security:
- bearerAuth: []
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- phoneNumber
properties:
phoneNumber:
type: string
responses:
'200':
description: Verification code sent successfully
content:
application/json:
schema:
type: object
required:
- status
- payload
properties:
status:
type: boolean
payload:
type: object
required:
- message
properties:
message:
type: string
/api/locations/hidden:
get:
summary: Get hidden locations
security:
- bearerAuth: []
- apiKeyAuth: []
responses:
'200':
description: Hidden locations retrieved successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- locations
properties:
locations:
type: array
items:
type: object
required:
- location
- address
- phone
- hours
- latitude
- longitude
- hidden
properties:
location:
type: string
address:
type: string
phone:
type: string
hours:
type: string
latitude:
type: number
longitude:
type: number
hidden:
type: integer
/api/time/availability:
get:
summary: Get time slot availability
security:
- bearerAuth: []
- apiKeyAuth: []
parameters:
- name: dates[]
in: query
required: true
schema:
type: array
items:
type: string
- name: location
in: query
required: true
schema:
type: string
responses:
'200':
description: Availability retrieved successfully
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
payload:
type: object
required:
- dates
properties:
dates:
type: object
additionalProperties:
type: array
items:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment