Lister toutes les réservations avec filtres
curl --request GET \
--url http://localhost:3091/v1/api/superadmin/reservations \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3091/v1/api/superadmin/reservations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3091/v1/api/superadmin/reservations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3091",
CURLOPT_URL => "http://localhost:3091/v1/api/superadmin/reservations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3091/v1/api/superadmin/reservations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3091/v1/api/superadmin/reservations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/superadmin/reservations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"totalPages": 123,
"totalElements": 123,
"first": true,
"last": true,
"size": 123,
"content": [
{
"id": 123,
"reservationNumber": "<string>",
"idCreateur": 123,
"idExpediteur": 123,
"statut": "<string>",
"annonceId": 123,
"poidsReserve": 123,
"expediteur": {
"id": 123,
"firstName": "<string>",
"lastName": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"nationality": "<string>",
"birthDate": "<string>",
"email": "<string>",
"stripeConnectedAccountId": "<string>",
"enabled": true,
"walletBalance": 123,
"pendingWithdrawalAmount": 123,
"totalEarned": 123,
"totalWithdrawn": 123
},
"createurProfil": {
"id": 123,
"firstName": "<string>",
"lastName": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"nationality": "<string>",
"birthDate": "<string>",
"email": "<string>",
"stripeConnectedAccountId": "<string>",
"enabled": true,
"walletBalance": 123,
"pendingWithdrawalAmount": 123,
"totalEarned": 123,
"totalWithdrawn": 123
},
"createur": "<string>",
"lieuArrivee": "<string>",
"lieuDepart": "<string>",
"dateDepart": "2023-12-25",
"dateArrivee": "2023-12-25",
"annonce": "<string>",
"codeDepot": "<string>",
"createurEmail": "<string>",
"infosContenu": "<string>",
"codeLivraison": "<string>",
"pointRdv": "<string>",
"pointLivraison": "<string>",
"paymentId": "<string>",
"authorizationId": "<string>",
"captureId": "<string>",
"refundId": "<string>",
"paymentStatus": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"paymentApprovalUrl": "<string>",
"reservationDate": "2023-11-07T05:31:56Z",
"items": [
{
"categorieId": 123,
"nom": "<string>",
"quantiteReserve": 123,
"code": "<string>"
}
],
"invoiceId": "<string>",
"invoiceUrl": "<string>",
"invoiceStatus": "<string>"
}
],
"number": 123,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"pageable": {
"offset": 123,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"paged": true,
"pageNumber": 123,
"pageSize": 123,
"unpaged": true
},
"numberOfElements": 123,
"empty": true
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}Réservations
Lister toutes les réservations
GET
/
v1
/
api
/
superadmin
/
reservations
Lister toutes les réservations avec filtres
curl --request GET \
--url http://localhost:3091/v1/api/superadmin/reservations \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3091/v1/api/superadmin/reservations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3091/v1/api/superadmin/reservations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3091",
CURLOPT_URL => "http://localhost:3091/v1/api/superadmin/reservations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3091/v1/api/superadmin/reservations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3091/v1/api/superadmin/reservations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/superadmin/reservations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"totalPages": 123,
"totalElements": 123,
"first": true,
"last": true,
"size": 123,
"content": [
{
"id": 123,
"reservationNumber": "<string>",
"idCreateur": 123,
"idExpediteur": 123,
"statut": "<string>",
"annonceId": 123,
"poidsReserve": 123,
"expediteur": {
"id": 123,
"firstName": "<string>",
"lastName": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"nationality": "<string>",
"birthDate": "<string>",
"email": "<string>",
"stripeConnectedAccountId": "<string>",
"enabled": true,
"walletBalance": 123,
"pendingWithdrawalAmount": 123,
"totalEarned": 123,
"totalWithdrawn": 123
},
"createurProfil": {
"id": 123,
"firstName": "<string>",
"lastName": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"nationality": "<string>",
"birthDate": "<string>",
"email": "<string>",
"stripeConnectedAccountId": "<string>",
"enabled": true,
"walletBalance": 123,
"pendingWithdrawalAmount": 123,
"totalEarned": 123,
"totalWithdrawn": 123
},
"createur": "<string>",
"lieuArrivee": "<string>",
"lieuDepart": "<string>",
"dateDepart": "2023-12-25",
"dateArrivee": "2023-12-25",
"annonce": "<string>",
"codeDepot": "<string>",
"createurEmail": "<string>",
"infosContenu": "<string>",
"codeLivraison": "<string>",
"pointRdv": "<string>",
"pointLivraison": "<string>",
"paymentId": "<string>",
"authorizationId": "<string>",
"captureId": "<string>",
"refundId": "<string>",
"paymentStatus": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"paymentApprovalUrl": "<string>",
"reservationDate": "2023-11-07T05:31:56Z",
"items": [
{
"categorieId": 123,
"nom": "<string>",
"quantiteReserve": 123,
"code": "<string>"
}
],
"invoiceId": "<string>",
"invoiceUrl": "<string>",
"invoiceStatus": "<string>"
}
],
"number": 123,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"pageable": {
"offset": 123,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"paged": true,
"pageNumber": 123,
"pageSize": 123,
"unpaged": true
},
"numberOfElements": 123,
"empty": true
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}Authorizations
JWT access token from POST /v1/api/auth/login
Query Parameters
⌘I