Conexio vitrine du développeur

API Sage 300 — adresses clients

Lire, créer et modifier les adresses 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é CustomerAddress.

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

Lire les adresses clients

Une requête GET sur /api/Entity/CustomerAddress, 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/CustomerAddress?$select=ErpInternalId,CustomerId,Code,Id,IsActive&$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/CustomerAddress?$select=ErpInternalId,CustomerId,Code,Id,IsActive&$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/CustomerAddress?$select=ErpInternalId,CustomerId,Code,Id,IsActive&$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/CustomerAddress?$select=ErpInternalId,CustomerId,Code,Id,IsActive&$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/CustomerAddress?$select=ErpInternalId,CustomerId,Code,Id,IsActive&$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 CustomerAddress sur Sage 300, et leurs opérateurs $filter :

ChampOpérateurs
CustomerIdeq ne contains
Codeeq ne contains
Ideq ne contains
IsActiveeq ne
IsPrimaryeq ne
LastModifiedDateeq ne gt ge lt le
Descriptioneq ne contains
AddressLine1eq ne contains
AddressLine2eq ne contains
AddressLine3eq ne contains
AddressLine4eq ne contains
Cityeq ne contains
Stateeq ne contains
Countryeq ne contains
PostalCodeeq ne contains
Territoryeq ne contains
ExtendedProperties.ContactNameeq ne contains
ExtendedProperties.PhoneNumbereq ne contains
ExtendedProperties.FaxNumbereq ne contains
ExtendedProperties.Emaileq ne contains
ExtendedProperties.ContactsPhoneeq ne contains
ExtendedProperties.ContactsFaxeq ne contains
ExtendedProperties.ContactsEmaileq ne contains
ExtendedProperties.TaxGroupeq ne contains
ExtendedProperties.SpecialInstructionseq ne contains
ExtendedProperties.ShipViaCodeeq ne contains
ExtendedProperties.ShipViaDescriptioneq ne contains
ExtendedProperties.CustomerPriceListeq ne contains
ExtendedProperties.FreeOnBoardeq ne contains
ExtendedProperties.InventoryLocationeq ne contains
ExtendedProperties.Salesperson1eq ne contains

Créer des adresses clients

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

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

{
  "CustomerId": "VALEUR",
  "Code": "VALEUR",
  "IsActive": true
}

Les champs

ChampLireCréerModifier
ErpInternalId✓——
CustomerId✓✓✓
Code✓✓✓
Id✓——
IsActive✓✓✓
IsPrimary✓✓✓
LastModifiedDate✓——
Description✓✓✓
AddressLine1✓✓✓
AddressLine2✓✓✓
AddressLine3✓✓✓
AddressLine4✓✓✓
City✓✓✓
State✓✓✓
Country✓✓✓
PostalCode✓✓✓
Territory✓✓✓
ExtendedProperties.ContactName✓✓✓
ExtendedProperties.PhoneNumber✓✓✓
ExtendedProperties.FaxNumber✓✓✓
ExtendedProperties.Email✓✓✓
ExtendedProperties.ContactsPhone✓✓✓
ExtendedProperties.ContactsFax✓✓✓
ExtendedProperties.ContactsEmail✓✓✓
ExtendedProperties.TaxGroup✓✓✓
ExtendedProperties.SpecialInstructions✓✓✓
ExtendedProperties.ShipViaCode✓✓✓
ExtendedProperties.ShipViaDescription✓——
ExtendedProperties.CustomerPriceList✓✓✓
ExtendedProperties.FreeOnBoard✓✓✓
ExtendedProperties.InventoryLocation✓✓✓
ExtendedProperties.Salesperson1✓✓✓

Pour aller plus loin