List company expenses
curl --request GET \
--url https://api-{region}.sesametime.com/expense-management/v1/expenses \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-{region}.sesametime.com/expense-management/v1/expenses"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-{region}.sesametime.com/expense-management/v1/expenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{region}.sesametime.com/expense-management/v1/expenses",
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 := "https://api-{region}.sesametime.com/expense-management/v1/expenses"
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("https://api-{region}.sesametime.com/expense-management/v1/expenses")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/expense-management/v1/expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"expenses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "Nombre de empleado",
"lastName": "Apellidos de empleado",
"imageProfileURL": "https://www.sesamehr.com/wp-content/uploads/2024/01/sesamehr-logo.svg"
},
"companyName": "Razón social",
"cif": "B9368795",
"address": {
"address": "Calle principal 1-10",
"zip": "46001",
"city": "Valencia"
},
"serialNumber": "123456",
"date": "2024-12-10T18:05:59+00:00",
"category": {
"id": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"name": "accommodation"
},
"paymentMethod": {
"id": "6a22d5db-e720-4e93-acf5-f358dce5479b",
"name": "card"
},
"type": "ticket",
"description": "Descripción del gasto",
"totalImport": 1025.33,
"currency": "EUR",
"expenseTaxes": [
{
"id": "2b0de902-8dad-4486-a5b2-c53bd444bc58",
"percentage": 21,
"taxBase": 300.25,
"taxId": "da75fbf7-a85a-47bd-afbc-0e903777212f",
"taxType": "IVA General",
"categoryId": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"category": "accommodation"
}
],
"state": "inbox",
"status": "accepted",
"paymentStatus": "booked",
"refundResolvedBy": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "Nombre de empleado",
"lastName": "Apellidos de empleado",
"imageProfileURL": "https://www.sesamehr.com/wp-content/uploads/2024/01/sesamehr-logo.svg"
},
"rejectedReason": "concepto no válido",
"comment": "Se debe reflejar correctamente los conceptos en el documento",
"ticketLost": false,
"parentId": "edea08b4-c710-4bee-a701-6d479b93492c",
"children": [
{
"id": "edea08b4-c710-4bee-a701-6d479b93492c",
"concept": "Concepto del gasto",
"category": {
"id": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"name": "accommodation"
},
"date": "2024-12-10T18:05:59+00:00",
"amountValue": 125.5,
"amountCurrency": "EUR"
}
],
"mileage": 12560,
"routes": [
{
"id": "fb91e77e-bd64-4fc0-b09c-6a63b2cf8f0a",
"address": "Calle Principal 10-22 46960 - Valencia España",
"lat": 39.4699,
"lng": -0.3763,
"position": 1
}
]
}
]
}Expense Management
List company expenses
GET
/
expense-management
/
v1
/
expenses
List company expenses
curl --request GET \
--url https://api-{region}.sesametime.com/expense-management/v1/expenses \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-{region}.sesametime.com/expense-management/v1/expenses"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-{region}.sesametime.com/expense-management/v1/expenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{region}.sesametime.com/expense-management/v1/expenses",
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 := "https://api-{region}.sesametime.com/expense-management/v1/expenses"
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("https://api-{region}.sesametime.com/expense-management/v1/expenses")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/expense-management/v1/expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"expenses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "Nombre de empleado",
"lastName": "Apellidos de empleado",
"imageProfileURL": "https://www.sesamehr.com/wp-content/uploads/2024/01/sesamehr-logo.svg"
},
"companyName": "Razón social",
"cif": "B9368795",
"address": {
"address": "Calle principal 1-10",
"zip": "46001",
"city": "Valencia"
},
"serialNumber": "123456",
"date": "2024-12-10T18:05:59+00:00",
"category": {
"id": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"name": "accommodation"
},
"paymentMethod": {
"id": "6a22d5db-e720-4e93-acf5-f358dce5479b",
"name": "card"
},
"type": "ticket",
"description": "Descripción del gasto",
"totalImport": 1025.33,
"currency": "EUR",
"expenseTaxes": [
{
"id": "2b0de902-8dad-4486-a5b2-c53bd444bc58",
"percentage": 21,
"taxBase": 300.25,
"taxId": "da75fbf7-a85a-47bd-afbc-0e903777212f",
"taxType": "IVA General",
"categoryId": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"category": "accommodation"
}
],
"state": "inbox",
"status": "accepted",
"paymentStatus": "booked",
"refundResolvedBy": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "Nombre de empleado",
"lastName": "Apellidos de empleado",
"imageProfileURL": "https://www.sesamehr.com/wp-content/uploads/2024/01/sesamehr-logo.svg"
},
"rejectedReason": "concepto no válido",
"comment": "Se debe reflejar correctamente los conceptos en el documento",
"ticketLost": false,
"parentId": "edea08b4-c710-4bee-a701-6d479b93492c",
"children": [
{
"id": "edea08b4-c710-4bee-a701-6d479b93492c",
"concept": "Concepto del gasto",
"category": {
"id": "cfce9e78-bd0b-45ef-8dc3-8e2b1057896d",
"name": "accommodation"
},
"date": "2024-12-10T18:05:59+00:00",
"amountValue": 125.5,
"amountCurrency": "EUR"
}
],
"mileage": 12560,
"routes": [
{
"id": "fb91e77e-bd64-4fc0-b09c-6a63b2cf8f0a",
"address": "Calle Principal 10-22 46960 - Valencia España",
"lat": 39.4699,
"lng": -0.3763,
"position": 1
}
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter expenses by employee id
From date
To date
Payment method
Expense status
Available options:
pending, accepted, rejected, pending_info, personal Limit work entries
Request a specific page
Response
200 - application/json
Expenses
Show child attributes
Show child attributes
Was this page helpful?
⌘I