openapi: 3.0.3
info:
title: 'LTB Sandbox Backend API Documentation'
description: ''
version: 1.0.0
servers:
-
url: 'https://api-sandbox.ltbfinancecoop.com'
tags:
-
name: Auth
description: ''
-
name: 'Gestion des comptes bancaires'
description: ''
-
name: 'Gestion des utilisateurs'
description: ''
-
name: 'Profile Utilisateur'
description: ''
paths:
/api/auth/register:
post:
summary: 'Créer un compte utilisateur'
operationId: crerUnCompteUtilisateur
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
firstname:
type: string
description: ''
example: architecto
nullable: false
lastname:
type: string
description: ''
example: architecto
nullable: false
email:
type: string
description: 'Must be a valid email address.'
example: zbailey@example.net
nullable: false
password:
type: string
description: ''
example: '|]|{+-'
nullable: false
birthdate:
type: string
description: ''
example: architecto
nullable: true
phone:
type: string
description: ''
example: architecto
nullable: true
address:
type: string
description: ''
example: architecto
nullable: true
required:
- firstname
- lastname
- email
- password
security: []
/api/auth/register/verify:
post:
summary: 'Vérification de compte après création'
operationId: vrificationDeCompteAprsCration
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: gbailey@example.net
nullable: false
verification_code:
type: string
description: ''
example: architecto
nullable: false
required:
- email
- verification_code
security: []
/api/auth/register/kyc:
post:
summary: 'Soumission des documents KYC'
operationId: soumissionDesDocumentsKYC
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
email:
type: string
description: "L'email de l'utilisateur temporaire."
example: gbailey@example.net
nullable: false
idcard_front:
type: string
format: binary
description: "Face avant de la carte d'identité."
nullable: false
idcard_back:
type: string
format: binary
description: "Face arrière de la carte d'identité."
nullable: false
proof_of_address:
type: string
format: binary
description: "optional Preuve d'adresse (facture, etc.)."
nullable: false
selfie:
type: string
format: binary
description: "optional Selfie avec pièce d'identité."
nullable: false
required:
- email
- idcard_front
- idcard_back
security: []
/api/auth/register/activate:
post:
summary: "Activation du compte par l'administrateur"
operationId: activationDuCompteParLadministrateur
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
temp_user_id:
type: integer
description: "L'ID de l'utilisateur temporaire à activer."
example: 16
nullable: false
activate:
type: boolean
description: ''
example: false
nullable: false
required:
- temp_user_id
- activate
/api/auth/login:
post:
summary: "Connexion Étape 1 - Vérification des identifiants et envoi de l'OTP"
operationId: connexiontape1VrificationDesIdentifiantsEtEnvoiDeLOTP
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address. Must not be greater than 255 characters.'
example: gbailey@example.net
nullable: false
password:
type: string
description: 'Must be at least 6 characters.'
example: '+-0pBNvYgxwmi/#iw'
nullable: false
required:
- email
- password
security: []
/api/auth/login/verify:
post:
summary: "Connexion Étape 2 - Vérification de l'OTP pour valider la connexion au compte"
operationId: connexiontape2VrificationDeLOTPPourValiderLaConnexionAuCompte
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: gbailey@example.net
nullable: false
verification_code:
type: string
description: ''
example: architecto
nullable: false
required:
- email
- verification_code
security: []
/api/auth/password/request:
post:
summary: 'Initialiser un changement de mot de passe'
operationId: initialiserUnChangementDeMotDePasse
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: gbailey@example.net
nullable: false
required:
- email
security: []
/api/auth/password/reset:
post:
summary: 'Vérifier le code et définir un nouveau mot de passe'
operationId: vrifierLeCodeEtDfinirUnNouveauMotDePasse
description: ''
parameters: []
responses: { }
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: gbailey@example.net
nullable: false
password:
type: string
description: 'Must be at least 8 characters.'
example: '+-0pBNvYgxwmi/#iw'
nullable: false
code:
type: string
description: ''
example: architecto
nullable: false
required:
- email
- password
- code
security: []
/api/auth/logout:
post:
summary: "Déconnecter l'utilisateur authentifié"
operationId: dconnecterLutilisateurAuthentifi
description: ''
parameters: []
responses: { }
tags:
- Auth
security: []
/api/accounts:
get:
summary: 'Afficher la liste des comptes'
operationId: afficherLaListeDesComptes
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- 'Gestion des comptes bancaires'
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
filter_value:
type: string
description: ''
example: architecto
nullable: true
type:
type: string
description: ''
example: courant
nullable: true
enum:
- courant
- epargne
- dat
- credit
status:
type: string
description: ''
example: active
nullable: true
enum:
- active
- closed
- blocked
page:
type: integer
description: 'Must be at least 1.'
example: 22
nullable: true
per_page:
type: integer
description: 'Must be at least 1.'
example: 67
nullable: true
sort_by:
type: string
description: ''
example: architecto
nullable: true
sort_direction:
type: string
description: ''
example: asc
nullable: true
enum:
- asc
- desc
security: []
'/api/accounts/{account_id}':
get:
summary: "Afficher les détails d'un utilisateur"
operationId: afficherLesDtailsDunUtilisateur
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- 'Gestion des comptes bancaires'
security: []
parameters:
-
in: path
name: account_id
description: 'The ID of the account.'
example: architecto
required: true
schema:
type: string
/api/accounts/init-joint-ownership:
post:
summary: 'Initier une demande pour un compte joint'
operationId: initierUneDemandePourUnCompteJoint
description: ''
parameters: []
responses: { }
tags:
- 'Gestion des comptes bancaires'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
account_id:
type: string
description: 'The id of an existing record in the accounts table.'
example: architecto
nullable: false
client_id:
type: string
description: 'The id of an existing record in the users table.'
example: architecto
nullable: false
required:
- account_id
- client_id
security: []
/api/accounts/accept-joint-ownership:
post:
summary: 'Accepter/Rejeter une demande de compte joint'
operationId: accepterRejeterUneDemandeDeCompteJoint
description: ''
parameters: []
responses: { }
tags:
- 'Gestion des comptes bancaires'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
account_id:
type: string
description: 'The id of an existing record in the accounts table.'
example: architecto
nullable: false
decision:
type: boolean
description: ''
example: true
nullable: false
required:
- account_id
- decision
security: []
/api/accounts/close:
post:
summary: 'Clôturer un compte bancaire'
operationId: clturerUnCompteBancaire
description: ''
parameters: []
responses: { }
tags:
- 'Gestion des comptes bancaires'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
account_id:
type: string
description: 'The id of an existing record in the accounts table.'
example: architecto
nullable: false
required:
- account_id
security: []
/api/users:
get:
summary: 'Afficher les utilisateurs du système'
operationId: afficherLesUtilisateursDuSystme
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- 'Gestion des utilisateurs'
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
filter_value:
type: string
description: ''
example: architecto
nullable: true
role:
type: string
description: ''
example: caissier
nullable: true
enum:
- client
- collecteur
- caissier
- comptable
- admin
status:
type: string
description: ''
example: admin
nullable: true
enum:
- client
- collecteur
- caissier
- comptable
- admin
page:
type: integer
description: 'Must be at least 1.'
example: 22
nullable: true
per_page:
type: integer
description: 'Must be at least 1.'
example: 67
nullable: true
gender:
type: string
description: ''
example: femme
nullable: true
enum:
- homme
- femme
sort_by:
type: string
description: ''
example: architecto
nullable: true
sort_direction:
type: string
description: ''
example: asc
nullable: true
enum:
- asc
- desc
security: []
'/api/users/{user_id}':
get:
summary: "Afficher les détails d'un utilisateur"
operationId: afficherLesDtailsDunUtilisateur
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- 'Gestion des utilisateurs'
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
filter_value:
type: string
description: ''
example: architecto
nullable: true
role:
type: string
description: ''
example: client
nullable: true
enum:
- client
- collecteur
- caissier
- comptable
- admin
status:
type: string
description: ''
example: comptable
nullable: true
enum:
- client
- collecteur
- caissier
- comptable
- admin
page:
type: integer
description: 'Must be at least 1.'
example: 22
nullable: true
per_page:
type: integer
description: 'Must be at least 1.'
example: 67
nullable: true
gender:
type: string
description: ''
example: homme
nullable: true
enum:
- homme
- femme
sort_by:
type: string
description: ''
example: architecto
nullable: true
sort_direction:
type: string
description: ''
example: desc
nullable: true
enum:
- asc
- desc
security: []
put:
summary: "Mettre à jour le compte d'un utilisateur"
operationId: mettreJourLeCompteDunUtilisateur
description: ''
parameters: []
responses: { }
tags:
- 'Gestion des utilisateurs'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
firstname:
type: string
description: 'Must not be greater than 100 characters.'
example: b
nullable: false
lastname:
type: string
description: 'Must not be greater than 100 characters.'
example: 'n'
nullable: false
birthdate:
type: string
description: ''
example: architecto
nullable: true
address:
type: string
description: ''
example: architecto
nullable: true
phone:
type: string
description: ''
example: architecto
nullable: true
role:
type: string
description: ''
example: client
nullable: true
enum:
- client
- collecteur
- caissier
- comptable
- admin
status:
type: string
description: ''
example: inactif
nullable: true
enum:
- actif
- inactif
- archived
required:
- firstname
- lastname
security: []
parameters:
-
in: path
name: user_id
description: 'The ID of the user.'
example: 1
required: true
schema:
type: integer
/api/profile:
get:
summary: "Afficher les informations du compte de l'utilisateur connecté"
operationId: afficherLesInformationsDuCompteDeLutilisateurConnect
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- 'Profile Utilisateur'
security: []
put:
summary: "Mettre à jour les informations du compte de l'utilisatuer connecté"
operationId: mettreJourLesInformationsDuCompteDeLutilisatuerConnect
description: ''
parameters: []
responses: { }
tags:
- 'Profile Utilisateur'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
firstname:
type: string
description: 'Must not be greater than 100 characters.'
example: b
nullable: false
lastname:
type: string
description: 'Must not be greater than 100 characters.'
example: 'n'
nullable: false
birthdate:
type: string
description: ''
example: architecto
nullable: true
address:
type: string
description: ''
example: architecto
nullable: true
phone:
type: string
description: ''
example: architecto
nullable: true
required:
- firstname
- lastname
security: []