Obtenir les transactions de revenus
curl --request GET \
--url http://localhost:3091/v1/api/transactions/income \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3091/v1/api/transactions/income"
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/transactions/income', 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/transactions/income",
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/transactions/income"
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/transactions/income")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/transactions/income")
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[
{
"id": 123,
"typeLabel": "<string>",
"amount": 123,
"currency": "<string>",
"formattedAmount": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"formattedDate": "<string>",
"routeFrom": "<string>",
"routeTo": "<string>",
"formattedRoute": "<string>",
"travelDate": "2023-11-07T05:31:56Z",
"formattedTravelDate": "<string>",
"otherPartyName": "<string>",
"reservationNumber": "<string>",
"statusLabel": "<string>",
"year": 123,
"monthYear": "<string>"
}
]{
"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": {}
}
]
}Transactions
Récupérer les transactions de revenus
Retourne les transactions INCOMING et WALLET_CREDIT, optionnellement filtrées par plage de dates.
GET
/
v1
/
api
/
transactions
/
income
Obtenir les transactions de revenus
curl --request GET \
--url http://localhost:3091/v1/api/transactions/income \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3091/v1/api/transactions/income"
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/transactions/income', 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/transactions/income",
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/transactions/income"
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/transactions/income")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/transactions/income")
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[
{
"id": 123,
"typeLabel": "<string>",
"amount": 123,
"currency": "<string>",
"formattedAmount": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"formattedDate": "<string>",
"routeFrom": "<string>",
"routeTo": "<string>",
"formattedRoute": "<string>",
"travelDate": "2023-11-07T05:31:56Z",
"formattedTravelDate": "<string>",
"otherPartyName": "<string>",
"reservationNumber": "<string>",
"statusLabel": "<string>",
"year": 123,
"monthYear": "<string>"
}
]{
"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
Response
Income transactions retrieved successfully
Available options:
INCOMING, OUTGOING, COMMISSION, REFUND, WALLET_CREDIT, WALLET_DEBIT, FEES_STRIPE Available options:
PENDING, COMPLETED, CANCELED, REFUNDED, FAILED ⌘I