MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Auth

Création de compte

Créer un compte utilisateur

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firstname\": \"architecto\",
    \"lastname\": \"architecto\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"|]|{+-\",
    \"birthdate\": \"architecto\",
    \"phone\": \"architecto\",
    \"address\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "firstname": "architecto",
    "lastname": "architecto",
    "email": "zbailey@example.net",
    "password": "|]|{+-",
    "birthdate": "architecto",
    "phone": "architecto",
    "address": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

firstname   string   

Example: architecto

lastname   string   

Example: architecto

email   string   

Must be a valid email address. Example: zbailey@example.net

password   string   

Example: |]|{+-

birthdate   string  optional  

Example: architecto

phone   string  optional  

Example: architecto

address   string  optional  

Example: architecto

Vérification de compte après création

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"verification_code\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "verification_code": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register/verify

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: gbailey@example.net

verification_code   string   

Example: architecto

Soumission des documents KYC

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/kyc" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "email=gbailey@example.net"\
    --form "idcard_front=@/tmp/phpab2hn10of0uh4N2v0JV" \
    --form "idcard_back=@/tmp/phpsm6p5am8pod487KJdUU" \
    --form "proof_of_address=@/tmp/php4ui6ikshkvb6dApPMng" \
    --form "selfie=@/tmp/phpqkvthfkp9k6i8vSzxIP" 
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/kyc"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('email', 'gbailey@example.net');
body.append('idcard_front', document.querySelector('input[name="idcard_front"]').files[0]);
body.append('idcard_back', document.querySelector('input[name="idcard_back"]').files[0]);
body.append('proof_of_address', document.querySelector('input[name="proof_of_address"]').files[0]);
body.append('selfie', document.querySelector('input[name="selfie"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/auth/register/kyc

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

email   string   

L'email de l'utilisateur temporaire. Example: gbailey@example.net

idcard_front   file   

Face avant de la carte d'identité. Example: /tmp/phpab2hn10of0uh4N2v0JV

idcard_back   file   

Face arrière de la carte d'identité. Example: /tmp/phpsm6p5am8pod487KJdUU

proof_of_address   file  optional  

optional Preuve d'adresse (facture, etc.). Example: /tmp/php4ui6ikshkvb6dApPMng

selfie   file  optional  

optional Selfie avec pièce d'identité. Example: /tmp/phpqkvthfkp9k6i8vSzxIP

Activation du compte par l'administrateur

requires authentication

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/activate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_user_id\": 16,
    \"activate\": false
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/register/activate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_user_id": 16,
    "activate": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register/activate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_user_id   integer   

L'ID de l'utilisateur temporaire à activer. Example: 16

activate   boolean   

Example: false

Connexion

Connexion Étape 1 - Vérification des identifiants et envoi de l'OTP

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"+-0pBNvYgxwmi\\/#iw\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "+-0pBNvYgxwmi\/#iw"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: gbailey@example.net

password   string   

Must be at least 6 characters. Example: +-0pBNvYgxwmi/#iw

Connexion Étape 2 - Vérification de l'OTP pour valider la connexion au compte

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/login/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"verification_code\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/login/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "verification_code": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/login/verify

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: gbailey@example.net

verification_code   string   

Example: architecto

Déconnecter l'utilisateur authentifié

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Reset Password

Initialiser un changement de mot de passe

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/password/request" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/password/request"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/password/request

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: gbailey@example.net

Vérifier le code et définir un nouveau mot de passe

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/auth/password/reset" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"+-0pBNvYgxwmi\\/#iw\",
    \"code\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/auth/password/reset"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "+-0pBNvYgxwmi\/#iw",
    "code": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/password/reset

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: gbailey@example.net

password   string   

Must be at least 8 characters. Example: +-0pBNvYgxwmi/#iw

code   string   

Example: architecto

Gestion des comptes bancaires

Afficher la liste des comptes

Example request:
curl --request GET \
    --get "https://api-sandbox.ltbfinancecoop.com/api/accounts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter_value\": \"architecto\",
    \"type\": \"courant\",
    \"status\": \"active\",
    \"page\": 22,
    \"per_page\": 67,
    \"sort_by\": \"architecto\",
    \"sort_direction\": \"asc\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/accounts"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter_value": "architecto",
    "type": "courant",
    "status": "active",
    "page": 22,
    "per_page": 67,
    "sort_by": "architecto",
    "sort_direction": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/accounts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

filter_value   string  optional  

Example: architecto

type   string  optional  

Example: courant

Must be one of:
  • courant
  • epargne
  • dat
  • credit
status   string  optional  

Example: active

Must be one of:
  • active
  • closed
  • blocked
page   integer  optional  

Must be at least 1. Example: 22

per_page   integer  optional  

Must be at least 1. Example: 67

sort_by   string  optional  

Example: architecto

sort_direction   string  optional  

Example: asc

Must be one of:
  • asc
  • desc

Afficher les détails d'un utilisateur

Example request:
curl --request GET \
    --get "https://api-sandbox.ltbfinancecoop.com/api/accounts/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/accounts/{account_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

account_id   string   

The ID of the account. Example: architecto

Initier une demande pour un compte joint

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/init-joint-ownership" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"architecto\",
    \"client_id\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/init-joint-ownership"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "account_id": "architecto",
    "client_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/accounts/init-joint-ownership

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

account_id   string   

The id of an existing record in the accounts table. Example: architecto

client_id   string   

The id of an existing record in the users table. Example: architecto

Accepter/Rejeter une demande de compte joint

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/accept-joint-ownership" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"architecto\",
    \"decision\": true
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/accept-joint-ownership"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "account_id": "architecto",
    "decision": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/accounts/accept-joint-ownership

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

account_id   string   

The id of an existing record in the accounts table. Example: architecto

decision   boolean   

Example: true

Clôturer un compte bancaire

Example request:
curl --request POST \
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/close" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/accounts/close"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "account_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/accounts/close

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

account_id   string   

The id of an existing record in the accounts table. Example: architecto

Gestion des utilisateurs

Afficher les utilisateurs du système

Example request:
curl --request GET \
    --get "https://api-sandbox.ltbfinancecoop.com/api/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter_value\": \"architecto\",
    \"role\": \"caissier\",
    \"status\": \"admin\",
    \"page\": 22,
    \"per_page\": 67,
    \"gender\": \"femme\",
    \"sort_by\": \"architecto\",
    \"sort_direction\": \"asc\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter_value": "architecto",
    "role": "caissier",
    "status": "admin",
    "page": 22,
    "per_page": 67,
    "gender": "femme",
    "sort_by": "architecto",
    "sort_direction": "asc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

filter_value   string  optional  

Example: architecto

role   string  optional  

Example: caissier

Must be one of:
  • client
  • collecteur
  • caissier
  • comptable
  • admin
status   string  optional  

Example: admin

Must be one of:
  • client
  • collecteur
  • caissier
  • comptable
  • admin
page   integer  optional  

Must be at least 1. Example: 22

per_page   integer  optional  

Must be at least 1. Example: 67

gender   string  optional  

Example: femme

Must be one of:
  • homme
  • femme
sort_by   string  optional  

Example: architecto

sort_direction   string  optional  

Example: asc

Must be one of:
  • asc
  • desc

Afficher les détails d'un utilisateur

Example request:
curl --request GET \
    --get "https://api-sandbox.ltbfinancecoop.com/api/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter_value\": \"architecto\",
    \"role\": \"client\",
    \"status\": \"comptable\",
    \"page\": 22,
    \"per_page\": 67,
    \"gender\": \"homme\",
    \"sort_by\": \"architecto\",
    \"sort_direction\": \"desc\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/users/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter_value": "architecto",
    "role": "client",
    "status": "comptable",
    "page": 22,
    "per_page": 67,
    "gender": "homme",
    "sort_by": "architecto",
    "sort_direction": "desc"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/users/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 1

Body Parameters

filter_value   string  optional  

Example: architecto

role   string  optional  

Example: client

Must be one of:
  • client
  • collecteur
  • caissier
  • comptable
  • admin
status   string  optional  

Example: comptable

Must be one of:
  • client
  • collecteur
  • caissier
  • comptable
  • admin
page   integer  optional  

Must be at least 1. Example: 22

per_page   integer  optional  

Must be at least 1. Example: 67

gender   string  optional  

Example: homme

Must be one of:
  • homme
  • femme
sort_by   string  optional  

Example: architecto

sort_direction   string  optional  

Example: desc

Must be one of:
  • asc
  • desc

Mettre à jour le compte d'un utilisateur

Example request:
curl --request PUT \
    "https://api-sandbox.ltbfinancecoop.com/api/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firstname\": \"b\",
    \"lastname\": \"n\",
    \"birthdate\": \"architecto\",
    \"address\": \"architecto\",
    \"phone\": \"architecto\",
    \"role\": \"client\",
    \"status\": \"inactif\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/users/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "firstname": "b",
    "lastname": "n",
    "birthdate": "architecto",
    "address": "architecto",
    "phone": "architecto",
    "role": "client",
    "status": "inactif"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/users/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 1

Body Parameters

firstname   string   

Must not be greater than 100 characters. Example: b

lastname   string   

Must not be greater than 100 characters. Example: n

birthdate   string  optional  

Example: architecto

address   string  optional  

Example: architecto

phone   string  optional  

Example: architecto

role   string  optional  

Example: client

Must be one of:
  • client
  • collecteur
  • caissier
  • comptable
  • admin
status   string  optional  

Example: inactif

Must be one of:
  • actif
  • inactif
  • archived

Profile Utilisateur

Afficher les informations du compte de l'utilisateur connecté

Example request:
curl --request GET \
    --get "https://api-sandbox.ltbfinancecoop.com/api/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Mettre à jour les informations du compte de l'utilisatuer connecté

Example request:
curl --request PUT \
    "https://api-sandbox.ltbfinancecoop.com/api/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firstname\": \"b\",
    \"lastname\": \"n\",
    \"birthdate\": \"architecto\",
    \"address\": \"architecto\",
    \"phone\": \"architecto\"
}"
const url = new URL(
    "https://api-sandbox.ltbfinancecoop.com/api/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "firstname": "b",
    "lastname": "n",
    "birthdate": "architecto",
    "address": "architecto",
    "phone": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

firstname   string   

Must not be greater than 100 characters. Example: b

lastname   string   

Must not be greater than 100 characters. Example: n

birthdate   string  optional  

Example: architecto

address   string  optional  

Example: architecto

phone   string  optional  

Example: architecto