Conexio vitrine du développeur

API Autotask — contrats de service

Lire les contrats de service de Autotask depuis votre application, par une simple requête HTTP : pas de SDK, pas d’ODBC. Conexio relaie l’appel vers Autotask et vous répond en JSON — entité CustomerServiceContract.

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

Lire les contrats de service

Une requête GET sur /api/Entity/CustomerServiceContract, 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/CustomerServiceContract?$select=ServiceContractId,ServiceContractCode,ServiceContractName,SourceSystem,LastModifiedDate&$filter=LastModifiedDate 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/CustomerServiceContract?$select=ServiceContractId,ServiceContractCode,ServiceContractName,SourceSystem,LastModifiedDate&$filter=LastModifiedDate%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/CustomerServiceContract?$select=ServiceContractId,ServiceContractCode,ServiceContractName,SourceSystem,LastModifiedDate&$filter=LastModifiedDate%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/CustomerServiceContract?$select=ServiceContractId,ServiceContractCode,ServiceContractName,SourceSystem,LastModifiedDate&$filter=LastModifiedDate%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/CustomerServiceContract?$select=ServiceContractId,ServiceContractCode,ServiceContractName,SourceSystem,LastModifiedDate&$filter=LastModifiedDate%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 CustomerServiceContract sur Autotask, et leurs opérateurs $filter :

ChampOpérateurs
ServiceContractIdeq ne in gt ge lt le
ServiceContractCodeeq ne in contains
ServiceContractNameeq ne in contains
SourceSystemeq ne in contains
LastModifiedDateeq ne in gt ge lt le
Descriptioneq ne in contains
InternalShortNoteeq ne in contains
ContractStartDateeq ne in gt ge lt le
ContractEndDateeq ne in gt ge lt le
DurationInMonthseq ne in gt ge lt le
IsHistoricaleq ne
CustomerIdeq ne in
CustomerCodeeq ne in contains
CustomerExternalIdeq ne in
CustomerNameeq ne in contains
CustomerContactNameeq ne in contains
InvoicingCustomerIdeq ne in
InvoicingCustomerCodeeq ne in contains
InvoicingCustomerNameeq ne in contains
InvoicingContactNameeq ne in contains
StatusNameeq ne in contains
IsActiveeq ne
ContractTypeNameeq ne in contains
ContractCategoryNameeq ne in contains
ContractPeriodTypeNameeq ne in contains
BillingPreferenceNameeq ne in contains
LineOfBusinessNameeq ne in contains
ServiceLevelAgreementNameeq ne in contains
PurchaseOrderNumbereq ne in contains
SetupFeeeq ne in gt ge lt le
SetupFeeBillingCodeNameeq ne in contains
OverageBillingRateeq ne in gt ge lt le
EstimatedRevenueeq ne in gt ge lt le
EstimatedCosteq ne in gt ge lt le
EstimatedHourseq ne in gt ge lt le
IsDefaultContracteq ne
IsComplianteq ne
RenewedContractIdeq ne in
ExclusionContractIdeq ne in
LineCounteq ne in gt ge lt le
RecurringMonthlyValueeq ne in gt ge lt le
RecurringAnnualValueeq ne in gt ge lt le
RecurringValuePerPeriodeq ne in gt ge lt le

Les champs

ChampLireCréerModifier
ServiceContractId✓——
ServiceContractCode✓——
ServiceContractName✓——
SourceSystem✓——
LastModifiedDate✓——
ServiceContractVersionId———
Description✓——
InternalShortNote✓——
ContractStartDate✓——
ContractEndDate✓——
DurationInMonths✓——
IsHistorical✓——
CustomerId✓——
CustomerCode✓——
CustomerExternalId✓——
CustomerName✓——
CustomerContactName✓——
InvoicingCustomerId✓——
InvoicingCustomerCode✓——
InvoicingCustomerExternalId———
InvoicingCustomerName✓——
InvoicingContactName✓——
StatusName✓——
IsActive✓——
ContractTypeName✓——
ContractCategoryName✓——
ContractPeriodTypeName✓——
BillingPreferenceName✓——
LineOfBusinessName✓——
ServiceLevelAgreementName✓——
PurchaseOrderNumber✓——
SetupFee✓——
SetupFeeBillingCodeName✓——
OverageBillingRate✓——
EstimatedRevenue✓——
EstimatedCost✓——
EstimatedHours✓——
IsDefaultContract✓——
IsCompliant✓——
RenewedContractId✓——
ExclusionContractId✓——
LineCount✓——
RecurringMonthlyValue✓——
RecurringAnnualValue✓——
RecurringValuePerPeriod✓——
SCContractType———
SCInvoicingMode———
SCPeriodIntervalBetweenInvoices———
SCPeriodicity———
SCProductGroupAttached———
PayePar———
IsTravellingFeeIncluded———
IsHourlyFeesIncluded———
PeriodTotalAmt———
ExtendedProperties✓——
Lines[].ServiceContractLineId✓——
Lines[].ServiceContractId✓——
Lines[].LineType✓——
Lines[].ServiceId✓——
Lines[].ServiceName✓——
Lines[].ServiceSku✓——
Lines[].ServiceExternalId✓——
Lines[].DescriptionService✓——
Lines[].BillingCodeName✓——
Lines[].VendorName✓——
Lines[].DescriptionInternal✓——
Lines[].DescriptionInvoice✓——
Lines[].PeriodTypeName✓——
Lines[].PeriodsPerYear✓——
Lines[].UnitPriceList✓——
Lines[].UnitPrice✓——
Lines[].UnitPriceAdjusted✓——
Lines[].UnitCost✓——
Lines[].Units✓——
Lines[].UnitPriceCurrentPeriod✓——
Lines[].UnitCostCurrentPeriod✓——
Lines[].UnitsPeriodStartDate✓——
Lines[].UnitsPeriodEndDate✓——
Lines[].ExtendedPrice✓——
Lines[].ExtendedCost✓——
Lines[].DiscountPercent✓——
Lines[].MonthlyValue✓——
Lines[].AnnualValue✓——
Lines[].QuoteItemId✓——

Pour aller plus loin