Conexio vitrine du développeur

API Avantage — feuilles de temps

Lire et créer les feuilles de temps de Avantage depuis votre application, par une simple requête HTTP : pas de SDK, pas d’ODBC. Conexio relaie l’appel vers Avantage et vous répond en JSON — entité Timesheet.

✓ Lire (GET)✓ Créer (POST)✗ Modifier (PUT)

Lire les feuilles de temps

Une requête GET sur /api/Entity/Timesheet, avec les modificateurs $select, $filter et $top. L’en-tête ALLOW_PAGINATION renvoie { Data, ResultsCount, TotalCount }.

HTTP
GET https://gateway.conexio.dev/api/Entity/Timesheet?$select=EmployeeNumber,PeriodStartDate,PeriodEndDate,IssueDate,PayPeriodNumber&$filter=PeriodStartDate ge '2026-01-01'&$top=10
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
ALLOW_PAGINATION: true
curl
curl 'https://gateway.conexio.dev/api/Entity/Timesheet?$select=EmployeeNumber,PeriodStartDate,PeriodEndDate,IssueDate,PayPeriodNumber&$filter=PeriodStartDate%20ge%20'2026-01-01'&$top=10' \
  -u "$CONEXIO_LICENCE:$CONEXIO_API_KEY" \
  -H 'COMPANY_CODE: VOTRE_COMPAGNIE' \
  -H 'ALLOW_PAGINATION: true'
JavaScript (fetch)
const response = await fetch("https://gateway.conexio.dev/api/Entity/Timesheet?$select=EmployeeNumber,PeriodStartDate,PeriodEndDate,IssueDate,PayPeriodNumber&$filter=PeriodStartDate%20ge%20'2026-01-01'&$top=10", {
  headers: {
    Authorization: "Basic " + btoa(`${CODE_LICENCE}:${CLE_API}`),
    COMPANY_CODE: "VOTRE_COMPAGNIE",
    ALLOW_PAGINATION: "true",
  },
})
const { Data, TotalCount } = await response.json()
C# et Python
C# (HttpClient)
var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://gateway.conexio.dev/api/Entity/Timesheet?$select=EmployeeNumber,PeriodStartDate,PeriodEndDate,IssueDate,PayPeriodNumber&$filter=PeriodStartDate%20ge%20'2026-01-01'&$top=10");
request.Headers.Authorization = new AuthenticationHeaderValue("Basic",
    Convert.ToBase64String(Encoding.UTF8.GetBytes($"{codeLicence}:{cleApi}")));
request.Headers.Add("COMPANY_CODE", "VOTRE_COMPAGNIE");
request.Headers.Add("ALLOW_PAGINATION", "true");
var json = await (await http.SendAsync(request)).Content.ReadAsStringAsync();
Python (requests)
import requests

response = requests.get(
    "https://gateway.conexio.dev/api/Entity/Timesheet?$select=EmployeeNumber,PeriodStartDate,PeriodEndDate,IssueDate,PayPeriodNumber&$filter=PeriodStartDate%20ge%20'2026-01-01'&$top=10",
    auth=(CODE_LICENCE, CLE_API),
    headers={"COMPANY_CODE": "VOTRE_COMPAGNIE", "ALLOW_PAGINATION": "true"},
)
data = response.json()["Data"]

Filtrer

Les champs filtrables de Timesheet sur Avantage, et leurs opérateurs $filter :

ChampOpérateurs
EmployeeNumbereq ne contains in
PeriodStartDateeq ne gt ge lt le
PeriodEndDateeq ne gt ge lt le
IssueDateeq ne gt ge lt le
PayPeriodNumbereq ne gt ge lt le
WeekNumbereq ne gt ge lt le
EmployeeStatuseq ne contains in
Provinceeq ne in
IsBilledeq ne
IsLastPayPeriodeq ne
Descriptioneq ne contains in
ErpInternalIdeq ne contains in

Créer des feuilles de temps

Un POST sur la même adresse, avec l’élément en JSON :

HTTP
POST https://gateway.conexio.dev/api/Entity/Timesheet
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
Content-Type: application/json

{
  "EmployeeNumber": "VALEUR",
  "PeriodEndDate": "2026-01-01"
}

Les champs

ChampLireCréerModifier
EmployeeNumber✓✓—
PeriodStartDate✓——
PeriodEndDate✓✓—
IssueDate✓——
PayPeriodNumber✓——
WeekNumber✓——
EmployeeStatus✓——
Province✓——
IsBilled✓——
IsLastPayPeriod✓——
Description✓——
ErpInternalId✓——
Lines[].ProjectNumber✓——
Lines[].JobCode✓——
Lines[].ClassCode✓——
Lines[].Region✓——
Lines[].ActivityCode✓——
Lines[].WorkType✓——
Lines[].SalaryType✓——
Lines[].HourlyRate✓——
Lines[].RegularHours✓——
Lines[].OvertimeHours✓——
Lines[].DoubleOvertimeHours✓——
Lines[].BilledAmount✓——
Lines[].BilledHours✓——
Lines[].ProfileCode✓——
Lines[].WorkSiteType✓——
Lines[].ProductNumber✓——
Lines[].Bonuses—✓—

Pour aller plus loin