API Servex — bons de travail
Lire et créer les bons de travail de Servex depuis votre application, par une simple requête HTTP : pas de SDK, pas d’ODBC. Conexio relaie l’appel vers Servex et vous répond en JSON — entité WorkOrder.
✓ Lire (GET)✓ Créer (POST)✗ Modifier (PUT)
Lire les bons de travail
Une requête GET sur /api/Entity/WorkOrder, avec les modificateurs $select, $filter et $top. L’en-tête ALLOW_PAGINATION renvoie { Data, ResultsCount, TotalCount }.
GET https://gateway.conexio.dev/api/Entity/WorkOrder?$select=ErpInternalId,Id,WorkOrderNumber,CreationDate,LastModifiedDate&$filter=LastModifiedDate ge '2026-01-01'&$top=10
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
ALLOW_PAGINATION: truecurl 'https://gateway.conexio.dev/api/Entity/WorkOrder?$select=ErpInternalId,Id,WorkOrderNumber,CreationDate,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'const response = await fetch("https://gateway.conexio.dev/api/Entity/WorkOrder?$select=ErpInternalId,Id,WorkOrderNumber,CreationDate,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
var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://gateway.conexio.dev/api/Entity/WorkOrder?$select=ErpInternalId,Id,WorkOrderNumber,CreationDate,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();import requests
response = requests.get(
"https://gateway.conexio.dev/api/Entity/WorkOrder?$select=ErpInternalId,Id,WorkOrderNumber,CreationDate,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 WorkOrder sur Servex, et leurs opérateurs $filter :
| Champ | Opérateurs |
|---|---|
Id | eq in |
WorkOrderNumber | eq in |
LastModifiedDate | gt ge lt le |
Créer des bons de travail
Un POST sur la même adresse, avec l’élément en JSON (les champs obligatoires sur Servex) :
POST https://gateway.conexio.dev/api/Entity/WorkOrder
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
Content-Type: application/json
{
"CustomerId": "VALEUR",
"TechnicianNumber": "VALEUR",
"DispatcherNumber": "VALEUR",
"PaymentMethod": "VALEUR",
"ProductLines": [
{
"ExtendedProperties.Cost": "VALEUR"
}
]
}Les champs
| Champ | Lire | Créer | Modifier |
|---|---|---|---|
ErpInternalId | ✓ | — | — |
Id | ✓ | — | — |
WorkOrderNumber | ✓ | — | — |
CreationDate | ✓ | ✓ | — |
LastModifiedDate | ✓ | ✓ | — |
ExpectedDate | ✓ | ✓ | — |
ServiceRequestType | ✓ | — | — |
ServiceType | ✓ | — | — |
PriorityCode | ✓ | — | — |
ClassificationCode | — | — | — |
CustomerId requis | ✓ | ✓ | — |
CustomerNumber | ✓ | ✓ | — |
CustomerName | ✓ | ✓ | — |
CustomerAddressLine | ✓ | ✓ | — |
CustomerCity | ✓ | ✓ | — |
CustomerCountry | ✓ | ✓ | — |
CustomerPostalCode | ✓ | ✓ | — |
CustomerPhone | ✓ | ✓ | — |
CustomerEmail | ✓ | ✓ | — |
CustomerContact | ✓ | ✓ | — |
SalesRepId | ✓ | ✓ | — |
SalesRepNumber | ✓ | ✓ | — |
SalesRepName | — | — | — |
TechnicianId | ✓ | — | — |
TechnicianNumber requis | ✓ | ✓ | — |
TechnicianName | ✓ | — | — |
DispatcherId | ✓ | — | — |
DispatcherNumber requis | ✓ | ✓ | — |
DispatcherName | ✓ | — | — |
LabourCode | ✓ | — | — |
TravelCode | ✓ | — | — |
ContractReference | — | — | — |
PaymentMethod requis | ✓ | ✓ | — |
SourceSystem | — | — | — |
WorkItemType | — | — | — |
Title | — | — | — |
Description | — | — | — |
StatusName | — | — | — |
IsCompleted | — | — | — |
CompletedDate | — | — | — |
QueueName | — | — | — |
ProjectId | — | — | — |
ProjectNumber | — | — | — |
ProjectName | — | — | — |
PhaseId | — | — | — |
PhaseName | — | — | — |
EstimatedHours | — | — | — |
ExtendedProperties.WorkOrderStatus | ✓ | ✓ | — |
ExtendedProperties.ReferenceOrderNumber | ✓ | ✓ | — |
ExtendedProperties.RecurrenceDate | ✓ | ✓ | — |
ExtendedProperties.ProblemNote | ✓ | ✓ | — |
ExtendedProperties.ReferenceNote | ✓ | ✓ | — |
ExtendedProperties.LogFR | ✓ | ✓ | — |
ExtendedProperties.LogEN | ✓ | ✓ | — |
ExtendedProperties.PaymentTermId | — | ✓ | — |
ExtendedProperties.PaymentTermNumber | — | ✓ | — |
ProductLines[] | — | ✓ | — |
ProductLines[].WorkOrderHeaderNumber | — | — | — |
ProductLines[].LineNumber | — | — | — |
ProductLines[].ProductId | — | ✓ | — |
ProductLines[].ProductNumber | — | ✓ | — |
ProductLines[].LineDescription | — | ✓ | — |
ProductLines[].ProductCategoryId | — | ✓ | — |
ProductLines[].ProductCategoryNumber | — | ✓ | — |
ProductLines[].SupplierId | — | ✓ | — |
ProductLines[].SupplierNumber | — | ✓ | — |
ProductLines[].QuantityInvoiced | — | ✓ | — |
ProductLines[].QuantityOrdered | — | ✓ | — |
ProductLines[].QuantityShipped | — | ✓ | — |
ProductLines[].UnitPrice | — | ✓ | — |
ProductLines[].DiscountPercentage | — | ✓ | — |
ProductLines[].UnitCost | — | ✓ | — |
ProductLines[].SellingPrice | — | ✓ | — |
ProductLines[].TaxAmount | — | ✓ | — |
ProductLines[].Tax2Amount | — | ✓ | — |
ProductLines[].TotalAmount | — | ✓ | — |
ProductLines[].ExtendedProperties.Cost requis | — | ✓ | — |
Les mêmes bons de travail, dans les autres logiciels
Même requête, même JSON : seule la compagnie change.