API QuickBooks Online — clients
Lire, créer et modifier les clients de QuickBooks Online depuis votre application, par une simple requête HTTP : pas de SDK, pas d’ODBC. Conexio relaie l’appel vers QuickBooks Online et vous répond en JSON — entité Customer.
✓ Lire (GET)✓ Créer (POST)✓ Modifier (PUT)
Lire les clients
Une requête GET sur /api/Entity/Customer, avec les modificateurs $select, $filter et $top. L’en-tête ALLOW_PAGINATION renvoie { Data, ResultsCount, TotalCount }.
GET https://gateway.conexio.dev/api/Entity/Customer?$select=NoClient,NomClient,NomPersonneContact,EstActif&$filter=NoClient eq 'VALEUR'&$top=10
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
ALLOW_PAGINATION: truecurl 'https://gateway.conexio.dev/api/Entity/Customer?$select=NoClient,NomClient,NomPersonneContact,EstActif&$filter=NoClient%20eq%20'VALEUR'&$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/Customer?$select=NoClient,NomClient,NomPersonneContact,EstActif&$filter=NoClient%20eq%20'VALEUR'&$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/Customer?$select=NoClient,NomClient,NomPersonneContact,EstActif&$filter=NoClient%20eq%20'VALEUR'&$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/Customer?$select=NoClient,NomClient,NomPersonneContact,EstActif&$filter=NoClient%20eq%20'VALEUR'&$top=10",
auth=(CODE_LICENCE, CLE_API),
headers={"COMPANY_CODE": "VOTRE_COMPAGNIE", "ALLOW_PAGINATION": "true"},
)
data = response.json()["Data"]Filtrer
Les champs filtrables de Customer sur QuickBooks Online, et leurs opérateurs $filter :
| Champ | Opérateurs |
|---|---|
NoUniqueSystemeSource | eq ne |
NoClient | eq ne |
NomClient | eq ne |
Créer des clients
Un POST sur la même adresse, avec l’élément en JSON (les champs obligatoires sur QuickBooks Online) :
POST https://gateway.conexio.dev/api/Entity/Customer
Authorization: Basic base64(CODE_LICENCE:CLE_API)
COMPANY_CODE: VOTRE_COMPAGNIE
Content-Type: application/json
{
"NomClient": "VALEUR"
}Les champs
| Champ | Lire | Créer | Modifier |
|---|---|---|---|
NoUniqueSystemeSource | ✓ | — | — |
NoClient | ✓ | ✓ | ✓ |
NomClient requis | ✓ | ✓ | ✓ |
NomPersonneContact | ✓ | ✓ | ✓ |
Adresse | ✓ | ✓ | ✓ |
Adresse2 | — | ✓ | ✓ |
Ville | ✓ | ✓ | ✓ |
CodePostal | ✓ | ✓ | ✓ |
Province | ✓ | ✓ | ✓ |
Pays | ✓ | ✓ | ✓ |
EstActif | ✓ | ✓ | ✓ |
SiteWeb | ✓ | ✓ | ✓ |
CommentairesClients | ✓ | ✓ | ✓ |
EmailPrincipal_Adresse | ✓ | ✓ | ✓ |
Telephone_Principal.Numero | ✓ | ✓ | ✓ |
Telephone_Telecopieur.Numero | ✓ | ✓ | ✓ |
Telephone_3.Numero | ✓ | ✓ | ✓ |
Telephone_4.Numero | ✓ | ✓ | ✓ |
Fiche_DerniereModification | ✓ | — | — |
Les mêmes clients, dans les autres logiciels
Même requête, même JSON : seule la compagnie change.
- API Acomba : clients
- API Acomba GO : clients
- API Avantage : clients
- API Sage 300 : clients
- API Autotask : clients
- API ProShop : clients