Articles (OFML)
/api/ofml.dll/ofml
OFML covers all information about the commercial data and metadata of an article.
/articles — Load article
GET
Loads a commercial OCD article with its metadata. Used for the initial load after catalog navigation.
GET /api/ofml.dll/ofml/articles?token={TOKEN}&manufacturer={MANU}&program={PROG}&basearticlenumber={ARTNR}&lang=deParameters
| Parameter | Required | Description |
|---|---|---|
token | Required | Authentication |
manufacturer | Required | Manufacturer code, as returned by /getnodes |
program | Required | Series code, as returned by /getnodes |
basearticlenumber | Required | Base article number |
lang | Optional | Language |
langalt | Optional | Alternative language |
currency | Optional | Currency |
showprice | Optional | true: prices are included |
varcode | Optional | Variant code |
ocdreinitstring | Optional | Reinit string for a configured article |
Response
JSON object of a complete article:
Top level
| Field | Description |
|---|---|
id | Article identifier (for reconfiguration) |
rootid | Root ID of the topmost parent article (in meta planning) |
manufacturer | Manufacturer abbreviation |
program | Series abbreviation |
basearticlenumber | Base article number |
typename | Internal name of the meta type |
reinit | Meta reinit string |
children | Sub-articles grouped by property: entries { propname, value, childarticles }; the articles themselves are in childarticles |
propclasses | Meta properties |
metamessages | Messages from the meta context |
ocd (commercial data)
| Field | Description |
|---|---|
id | Internal commercial ID |
finalarticlenumber | Resolved article number (including code scheme) |
price | Article price |
currency | Currency |
pricecomponents | Individual price components |
shorttext | Commercial short text |
longtext | Commercial long text |
varianttext | Properties with their current value |
reinitstring | Commercial reinit string |
convertdate | Conversion date |
articlewithprice | Does the article have a price? |
propclasses | Property classes with properties and values |
usermessages | User message from the OCD context |
obligatory2c | True if at least one property is optional but must still be given a value |
Debug fields
| Field | Description |
|---|---|
dump | Variant code of the article (used e.g. in the OCI export) |
debugreinitstring | Reinit string for troubleshooting; don't use it for integrations |
debugiscommercialvalid | Not implemented |
debugisvisiblepropertieswithvalue | Not implemented |
ocd.propclasses — Property classes
| Field | Description |
|---|---|
name | Internal name |
text | Display text |
properties | Array of properties |
ocd.propclasses.properties — Properties
| Field | Description |
|---|---|
name | Internal name |
text | Display text |
proptype | C = alphanumeric, N/L = numeric |
currentvalue | Current value |
enabled | Editable? |
visible | Visible? |
obligatory | Required property? |
obligatory2c | True if the property is optional (obligatory=false) but must still be given a value; the article is invalid as long as at least one property with obligatory2c=true has no value |
addvalues | True if additional values can be added |
propclassname | Name of the property class that contains the property |
digits | Number of digits |
decdigits | Decimal places |
propertyvalues | Available values |
ranges | Value ranges (for numeric properties) |
propertyvalues — Property values
| Field | Description |
|---|---|
valuefrom | Actual value |
text | Display text |
previewimage | Path of the preview image (relative to /api/ocd.dll/, see Preview images) |
previewimagelarge | Path of the large preview image (relative to /api/ocd.dll/) |
ranges — Value ranges
| Field | Description |
|---|---|
valuefrom | Lower bound (optional; if omitted, the interval is open) |
opfrom | GT = greater than, GE = greater than or equal |
valueto | Upper bound (optional) |
opto | LT = less than, LE = less than or equal |
raster | Step size (e.g. 0.2) |
Example
Show full response
json
{
"typename": "",
"id": "{A4A000D2-D647-49C0-B9D1-2661DB5B8C86}",
"rootid": "{A4A000D2-D647-49C0-B9D1-2661DB5B8C86}",
"manufacturer": "_dx",
"program": "webti",
"basearticlenumber": "27R0614Q",
"reinit": "",
"propclasses": [],
"children": [],
"ocd": {
"id": "{5DA01879-ED51-47FC-A073-2199F95FE50B}",
"finalarticlenumber": "27 R 06 14 KL Q",
"price": 540,
"currency": "EUR",
"pricecomponents": [],
"shorttext": "Rechtecktisch, Tiefe 600 mm, Breite 1400 mm",
"longtext": "Rechtecktisch\\nTiefe: 600 mm\\nBreite: 1400 mm\\nQuadratisches Vierfuß-Gestell",
"varianttext": "Höhe: 720 mm - 1160 mm\\nPlattenfarbe: Buche\\nKantenfarbe: Buche\\nGestellfarbe: Anthrazit\\nKabeldurchlass: Links + Rechts\\n",
"reinitstring": "eJytkUEOgkAMRf9ZOIDRxLghLhhBII6IAy504_1v4Wtl75CYJp3On__baZt0w2aVipwnTvM159v9VS3RBNYpqVGvALtfkI1GdBXIzNuAf4IcVcAtMtSVHsQJxO4ztwGF6WOWvgWbvHbETHfP0gW4O-21xX6zZ9iHTG7nv7hk_v_MBBJYA2tcOujYQNQLJDAP4zWrc12I_5XLZmy5JuLKd5yTofbN9LAG347lWFf3myFHZd0Gr1LTZfLdlvoAe9lltw::",
"convertdate": "2018-04-20",
"propclasses": [
{
"name": "SONSTIGE",
"text": "Sonstige",
"properties": [
{
"name": "H",
"text": "Höhe",
"proptype": "C",
"currentvalue": "KL",
"enabled": true,
"visible": true,
"obligatory": true,
"propertyvalues": [
{ "valuefrom": "F", "text": "740 mm - fest" },
{ "valuefrom": "KL", "text": "720 mm - 1160 mm" }
]
},
{
"name": "FARBE_PL",
"text": "Plattenfarbe",
"proptype": "C",
"currentvalue": "HOLZ_BUCHE",
"propertyvalues": [
{ "valuefrom": "HOLZ_BUCHE", "text": "Buche", "previewimage": "ocd/preview/_dx/basics/holz_buche.jpg" },
{ "valuefrom": "HOLZ_EICHE", "text": "Eiche", "previewimage": "ocd/preview/_dx/basics/holz_eiche.jpg" },
{ "valuefrom": "HOLZ_NUSSB", "text": "Nussbaum", "previewimage": "ocd/preview/_dx/basics/holz_nussb.jpg" }
]
}
]
}
],
"articlewithprice": true,
"usermessages": ""
}
}/articles — Change article
POST
Changes an OCD article (changes a property/value).
POST /api/ofml.dll/ofml/articles?token={TOKEN}&manufacturer={MANU}&program={PROG}&basearticlenumber={ARTNR}&ocdreinitstring={REINIT}&lang=de&langalt=en¤cy=EUR&showprice=truelang, langalt, currency and showprice work as in GET /articles.
Request body
json
{
"id": "{000-0000-0-0-00-0000}",
"rootid": "{000-0000-0-0-00-0000}",
"proptype": "ocd",
"propclass": "PROPERTY_CLASS",
"prop": "MERKMALSNAME",
"newvalue": "NEWVALUE",
"jsondata": "{...}"
}| Field | Required | Description |
|---|---|---|
id | Required | Article identifier |
rootid | Required | Topmost article of the meta planning |
proptype | Required | ocd = commercial, meta = meta property |
propclass | Required | Name of the property class |
prop | Required | Name of the property |
newvalue | Required | New value (valuefrom) |
jsondata | Required | Complete JSON of the topmost article |
Response
Same format as GET /articles — contains the updated article with a new reinitstring.
Preview images
GET
The previewimage and previewimagelarge fields of a property value contain a path. The image URL is built like this:
GET /api/ocd.dll/{previewimage}?token={TOKEN}Example: /api/ocd.dll/ocd/preview/_dx/basics/holz_buche.jpg?token={TOKEN}