Artikel
Zuletzt geändert: 18.07.2026 15:54

Ressource: articles #

Artikelstamm der EULANDA-Tabelle Artikel. Die Anlage läuft über die EULANDA-Prozedur cn_ArNew (übernimmt den Vorlagen-Artikel .MUSTER samt Preisen und Merkmalen, falls vorhanden). Preisfindung und Bestände sind read-only und kommen aus den EULANDA-Funktionen - die API rechnet nie selbst. Bilder und DMS-Dateien des Artikels: siehe Bilder und DMS-Dateien.

Endpunkte #

MethodePfadScopeZweck
GET/api/v1/articlesarticles:readListe (Paging, Filter, q, changedSince, fields, categoryAnd/Or/Not)
GET/api/v1/articles/categoriesarticles:readMerkmalbaum für den Merkmal-Filter, siehe Merkmale
GET/api/v1/articles/{id}/categoriesarticles:readMerkmale eines Artikels
PUT/PATCH/api/v1/articles/{id}/categoriesarticles:writeMerkmal-Zuordnung ersetzen bzw. ändern
GET/api/v1/articles/{id}/service-articlesservice-articles:readGeräte-Instanzen des Artikels, siehe Serviceartikel
GET/api/v1/articles/idsarticles:readSchlüsselliste für den Lösch-Abgleich
GET/api/v1/articles/{id}articles:readEinzelner Artikel über die Id
GET/api/v1/articles/by-number/{number}articles:readEinzelner Artikel über die Artikelnummer
POST/api/v1/articlesarticles:writeAnlegen (cn_ArNew + Felder)
PATCH/api/v1/articles/{id}articles:writeFelder ändern (partiell)
DELETE/api/v1/articles/{id}articles:writeLöschen, nur wenn unbenutzt (cnf_ArCanDelete)
GET/api/v1/articles/{id}/pricearticles:readPreisfindung (cn_Preis_GetVk)
GET/api/v1/articles/{id}/stockarticles:readBestände (cnf_BestandVerfuegbarGesamt, cnf_ArLagerBestand)

Der Vorlagen-Artikel .MUSTER ist geschützt (409 ARTICLE_TEMPLATE_PROTECTED); eine übergebene articleNumber wird über cnf_ArUniqueArtNummer eindeutig gemacht.

Felder (Glossar Entwurf) #

API-FeldDB-SpalteTypSchreibbar
id / uidID / uidint/guidnein
articleNumberArtNummerstringja (eindeutig via cnf_ArUniqueArtNummer)
manufacturerNumberArtNummerHerstellerstringja
matchArtMatchstringja
barcodeBarcodestringja
name / name2 / shortNameKurztext1 / Kurztext2 / Ultrakurztextstringja
longTextLangtextstringja
unit / priceUnit / packagingUnitMengenEh / PreisEh / VerpackEhstring/decimalja (unit validiert gegen KonMengenEh, z.B. Stk.)
weight / volumeGewicht / Volumendecimalja
priceVkdecimalja (Basis-VK; Interpretation über isGross)
priceNet / priceGross / isGrossVkNetto / VkBrutto / BruttoFlgdecimal/boolnein
currency / vatGroup / vatRateWaehrung / MwStGr / MwstSatz-nein
productGroupWarenGrstringja (validiert gegen konWG)
discountGroupRabattGrstringja (validiert gegen KonRG)
manufacturerIdHerstellerIDintja (validiert gegen Hersteller)
customsTariffNumber / countryOfOriginWarenNr / UrsprungsLandstringja
storageBinLagerplatzstringja
minStock / maxStock / deliveryDaysStdBestandMin / StdBestandMax / BeschaffungsZeitdecimal/intja
isDiscontinued / isNew / isSpecial / shopEnabledAuslaufFlg / NeuFlg / SonderFlg / ShopFreigabeFlgboolja
serialRequired / batchRequired / stockType / status / articleTypeSNPflichtFlg / ChargenPflichtFlg / LagerTyp / Status / Typ-nein
createdAt / changedAtCreateDate / ChangeDatedatetimenein

Einkaufspreise (EkNetto u.a.) sind bewusst nicht im Feldkatalog - sie kommen erst mit einem eigenen, restriktiveren Scope. Die Gruppen-Felder sind echte Fremdschlüssel: ungültige Werte lehnt die API mit 422 VALIDATION_LOOKUP_INVALID ab, bevor der SQL Server einen rohen Constraint-Fehler wirft.

Beispiele #

Liste und Einzelabruf:

$h = @{ Authorization = "Bearer $key" }
Invoke-RestMethod 'http://localhost:8100/api/v1/articles?limit=10&fields=id,articleNumber,name,price,currency' -Headers $h
Invoke-RestMethod 'http://localhost:8100/api/v1/articles/by-number/1100' -Headers $h
curl.exe -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/articles?limit=10&fields=id,articleNumber,name,price,currency"
curl.exe -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/articles/by-number/1100"

Preisfindung für einen Kunden (3 Stück, Kundenpreise/Staffeln inklusive):

Invoke-RestMethod 'http://localhost:8100/api/v1/articles/1/price?customerId=2&quantity=3' -Headers $h
curl.exe -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/articles/1/price?customerId=2&quantity=3"
{
  "articleId": 1, "customerId": 2, "quantity": 3.0,
  "currency": "EUR", "isGross": false,
  "price": 100.00, "discountPercent": 5.00, "finalPrice": 95.00,
  "source": "Preisliste", "info": ""
}

Bestand:

Invoke-RestMethod 'http://localhost:8100/api/v1/articles/1/stock' -Headers $h
curl.exe -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/articles/1/stock"

Anlegen und ändern:

$body = @{ articleNumber = 'API-0001'; name = 'API-Testartikel'; unit = 'Stk'; price = 19.9 } | ConvertTo-Json
$article = Invoke-RestMethod 'http://localhost:8100/api/v1/articles' -Method Post -Headers $h -ContentType 'application/json' -Body $body
Invoke-RestMethod "http://localhost:8100/api/v1/articles/$($article.id)" -Method Patch -Headers $h -ContentType 'application/json' -Body (@{ isNew = $true } | ConvertTo-Json)
curl.exe -X POST -H "Authorization: Bearer %KEY%" -H "Content-Type: application/json" -d "{ \"articleNumber\": \"API-0001\", \"name\": \"API-Testartikel\", \"unit\": \"Stk\", \"price\": 19.9 }" "http://localhost:8100/api/v1/articles"
curl.exe -X PATCH -H "Authorization: Bearer %KEY%" -H "Content-Type: application/json" -d "{ \"isNew\": true }" "http://localhost:8100/api/v1/articles/123"

Fehlercodes dieser Ressource #

HTTPCodeBedeutung
404NOT_FOUNDKein Artikel zum Schlüssel
409ARTICLE_IN_USELöschen abgelehnt, Artikel wird referenziert
409ARTICLE_TEMPLATE_PROTECTED.MUSTER darf nicht geändert oder gelöscht werden
422VALIDATION_LOOKUP_INVALIDGruppe existiert nicht (productGroup/discountGroup)
422VALIDATION_FIELD_UNKNOWN / VALIDATION_FIELD_READONLY / VALIDATION_NO_FIELDSBody-Validierung

Noch offen (Roadmap) #

  • Lookup-Endpunkte (/lookups/product-groups usw.), damit Clients gültige Gruppen abfragen können.
  • Einkaufspreise und Lieferantenartikel mit eigenem Scope.
  • Rabatt-Matrix (RabattGr x KundenGr) als Auskunfts-Endpunkt.