Conexio vitrine du développeur

API Sage 300 — commandes clients

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

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

Lire les commandes clients

Une requête GET sur /api/Entity/CustomerOrder, 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/CustomerOrder?$select=NoFacture,DateFacture,Description,NoCommandeRéférence,TotalFacture&$filter=DateFacture 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/CustomerOrder?$select=NoFacture,DateFacture,Description,NoCommandeRéférence,TotalFacture&$filter=DateFacture%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/CustomerOrder?$select=NoFacture,DateFacture,Description,NoCommandeRéférence,TotalFacture&$filter=DateFacture%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/CustomerOrder?$select=NoFacture,DateFacture,Description,NoCommandeRéférence,TotalFacture&$filter=DateFacture%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/CustomerOrder?$select=NoFacture,DateFacture,Description,NoCommandeRéférence,TotalFacture&$filter=DateFacture%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 CustomerOrder sur Sage 300, et leurs opérateurs $filter :

ChampOpérateurs
NoFactureeq ne contains
NoUniqueSystemeSourceeq ne contains
DateFactureeq ne gt ge lt le
DateExpirationDocumenteq ne gt ge lt le
Fiche_DerniereModificationeq ne gt ge lt le
Descriptioneq ne contains
Référenceeq ne contains
NoCommandeRéférenceeq ne contains
NoAutorisationeq ne contains
TotalFactureeq ne gt ge lt le
SousTotalFactureeq ne gt ge lt le
FraisDeTransporteq ne gt ge lt le
MontantNonPayeeq ne gt ge lt le
Deviseeq ne contains
EstActifeq ne
NoVendeureq ne contains
NoTerritoireeq ne contains
NoModeExpeditioneq ne contains
TermeDePaiement.NoTermeDePaiementeq ne contains
NoProjeteq ne contains
NoSoumissionRéférenceeq ne contains
NoSoumissionRéférence_NoUniqueSystemeSourceeq ne contains
InfoClientFacturerA.NoClienteq ne contains
InfoClientFacturerA.NomClienteq ne contains
InfoClientFacturerA.Adresseeq ne contains
InfoClientFacturerA.Villeeq ne contains
InfoClientFacturerA.Provinceeq ne contains
InfoClientFacturerA.CodePostaleq ne contains
InfoClientFacturerA.Payseq ne contains
InfoClientFacturerA.EmailPrincipal_Adresseeq ne contains
InfoClientLivrerA.NoClienteq ne contains
InfoClientLivrerA.NomClienteq ne contains
InfoClientLivrerA.Adresseeq ne contains
InfoClientLivrerA.Villeeq ne contains
InfoClientLivrerA.Provinceeq ne contains
InfoClientLivrerA.CodePostaleq ne contains
InfoClientLivrerA.Payseq ne contains
InfoClientLivrerA.EmailPrincipal_Adresseeq ne contains

Créer des commandes clients

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

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

{
  "NoFacture": "VALEUR",
  "DateFacture": "2026-01-01",
  "Description": "VALEUR"
}

Les champs

ChampLireCréerModifier
NoFacture✓✓—
NoUniqueSystemeSource✓——
TypeDoc✓——
DateFacture✓✓—
DateExpirationDocument———
Fiche_DerniereModification———
Description✓✓—
Référence✓✓—
NoCommandeRéférence✓——
NoAutorisation———
TotalFacture✓——
SousTotalFacture✓✓—
FraisDeTransport———
MontantNonPaye———
Devise✓——
EstActif✓——
NoVendeur———
NoTerritoire—✓—
NoModeExpedition✓——
TermeDePaiement.NoTermeDePaiement✓✓—
NoProjet———
NoSoumissionRéférence———
NoSoumissionRéférence_NoUniqueSystemeSource———
InfoClientFacturerA.NoClient✓✓—
InfoClientFacturerA.NomClient✓✓—
InfoClientFacturerA.DescriptionAdresse✓——
InfoClientFacturerA.Adresse✓✓—
InfoClientFacturerA.Adresse2✓——
InfoClientFacturerA.Ville✓✓—
InfoClientFacturerA.Province✓✓—
InfoClientFacturerA.CodePostal✓✓—
InfoClientFacturerA.Pays✓✓—
InfoClientFacturerA.NomPersonneContact✓✓—
InfoClientFacturerA.EmailPrincipal_Adresse✓✓—
InfoClientFacturerA.Email2_Adresse✓✓—
InfoClientFacturerA.Telephone_Principal.Numero✓✓—
InfoClientFacturerA.Telephone_Telecopieur.Numero✓✓—
InfoClientLivrerA.NoClient✓——
InfoClientLivrerA.NomClient✓✓—
InfoClientLivrerA.Adresse✓✓—
InfoClientLivrerA.Ville✓✓—
InfoClientLivrerA.Province✓✓—
InfoClientLivrerA.CodePostal✓✓—
InfoClientLivrerA.Pays✓✓—
InfoClientLivrerA.EmailPrincipal_Adresse✓——
InfoClientLivrerA.Telephone_Principal.Numero✓——
LigneFacture[].NoLigneFacture✓✓—
LigneFacture[].strNoProduit✓✓—
LigneFacture[].DescriptionLigne✓✓—
LigneFacture[].QteCommande✓✓—
LigneFacture[].QteFacture✓——
LigneFacture[].PrixFinal✓✓—
LigneFacture[].PrixCoutant—✓—
LigneFacture[].Montant_TotalLigne✓——
LigneFacture[].UniteMesure✓✓—
LigneFacture[].UniteMesurePoids✓✓—

Les mêmes commandes clients, dans les autres logiciels

Même requête, même JSON : seule la compagnie change.

Pour aller plus loin