Download OpenAPI specification:
All API endpoints are under the plugin-path (baseurl).
baseurl: http://<eaiws-server>/EAIWS/plugins/Reporter/
Eg.: https://s1.eaiws.pcon-solutions.com/4.18.2-001/EAIWS/plugins/Reporter/templates.json
API errors fall into two categories. Some errors will abort the request while others will be suppressed. Errors that abort will either have a json body or rarely a text response. In the case of aborted errors it is good practice to check the http error code in case of a text response. Suppressed errors are appended as a list to a successfull (eg.: http status code 200) request response.
Example of an aborted error:
{
"additionalInformation": {},
"cause": [],
"code": 422,
"id": "request-session-not-found",
"message": "No active session was found for the specified session id.",
"scopes": [],
"type": "request"
}
Example of an appended suppressed error:
{
"errors": [
{
"additionalInformation": {},
"cause": ["Some exception..."],
"id": "item-text-error",
"message": "Failed to get item app data!",
"scopes": ["ERROR"],
"type": "item"
}
],
"name": "Management_AN-54321_111024-111109.pdf",
"url": "https://www.../.../.../.../Management_AN-54321_111024-111109.pdf"
}
Suppressed errors do not have an error code and instead have one of two scopes: WARN or ERROR. A response can have multiple suppressed errors or warnings attached to it.
Get list of available templates
| sessionId | string Required to determine the application locale. Defaults to english when sessionId is not defined. |
| authToken | string Authorization token for retrieving user specific OWDS templates. |
| owdsURL | string Override for the owds base url. Default.: https://owds.pcon-solutions.com. Can also be changed server side in plugin settings. |
| update | integer Empty query parameter that forces the plugin to reload all templates. The parameter is irrelevant. Eg.: |
| category | string Category key by which to filter the result set. When not provided only templates of the default category will be listed. To get all templates on a server the wildcard * can be used. A comma separated list of category keys is also accepted, eg.: |
[- {
- "category": {
- "key": "default",
- "name": "Default"
}, - "description": "pCon.basket Standard PRO - FOP Template",
- "key": "basket-standard-pro-fop",
- "name": "Quote",
- "pageBreaksDisabled": false,
- "properties": [ ],
- "sortWeight": -90,
- "source": "server",
- "templateKey": "basket-standard-pro-fop",
- "version": "1.6.1",
- "views": [ ]
}, - {
- "category": {
- "key": "default",
- "name": "Default"
}, - "description": "pCon.basket CE - FOP Template",
- "key": "basket-ce-fop",
- "name": "Overview",
- "pageBreaksDisabled": false,
- "properties": [ ],
- "sortWeight": -1000,
- "source": "server",
- "templateKey": "basket-ce-fop",
- "version": "1.6.1",
- "views": [ ]
}, - {
- "category": {
- "key": "order",
- "name": "Order"
}, - "description": "pCon.basket Standard PRO - Order Template",
- "key": "basket-standard-pro-order",
- "name": "Order",
- "pageBreaksDisabled": false,
- "properties": [ ],
- "sortWeight": -1000,
- "source": "server",
- "templateKey": "basket-standard-pro-order",
- "version": "1.6.1",
- "views": [ ]
}
]Returns template options.
Response contains template defined option categories and attachments that are provided by the template. Both can be used when generating a template to change the PDF.
| templateKey required | string Unique template identifier |
| sessionId | string Required to determine the application locale. Defaults to english when sessionId is not defined. |
{- "options": {
- "attachments": {
}, - "categories": [
- {
- "fields": [
- {
- "key": "logoUrl",
- "label": "Logo Pfad",
- "type": "string"
}, - {
- "key": "subject",
- "label": "Betreff",
- "type": "string"
}, - {
- "default": true,
- "key": "showProjectDate",
- "label": "Angebotsdatum",
- "type": "boolean"
}
], - "key": "header",
- "label": "Kopfzeile"
}, - {
- "fields": [
- {
- "default": false,
- "key": "showExternalPosition",
- "label": "Externe Positionsnummer",
- "type": "boolean"
}, - {
- "default": 20,
- "key": "articleImageSize",
- "label": "Artikelbilder",
- "options": [
- {
- "key": "-1",
- "label": "Keine"
}, - {
- "key": "15",
- "label": "Klein"
}, - {
- "key": "20",
- "label": "Medium"
}, - {
- "key": "30",
- "label": "Groß"
}
], - "type": "int"
}
], - "key": "articleList",
- "label": "Artikelliste"
}
]
}
}Generate PDF reports. Request body properties are optional unless marked as required
| templateKey required | string Unique template identifier |
| sessionId required | string uuid of the current session. |
| calculationScheme | string Default: "STDB2B_WBK" Scheme for the price calculation. |
| preferredImageColumn | string Default: "73bd68f4-da62-11d8-b9d6-00e081513ada" User defined image column. Used to retrieve a user defined image for an article before getting an internal image. |
| viewId | string UUID of the view to use for this export. |
| externalRefColumn | string UUID to reference the basket column that contains the external reference number |
| data | object Map of additional data to pass-through to the template. All parameters are passed to the template without modification. |
| items | Array of strings List of Article IDs to include in the Report. Acts as a filter. |
| matchBasketItemIds | boolean boolean value to indicate whether the Article IDs supplied by the |
| imageOptions | Array of strings Image options to override the |
| filename | string Custom filename for the report. Will override default genarated filename. Valid filename examples: |
| imageColumns | Array of strings Default: ["7423b6f0-d424-48b3-b75c-9fc5c61992c1","a3cc0a92-9b7c-4d51-a893-796a5adca350","85d7d0a1-6fe6-4c83-ac6d-3c225038f325","66dce599-d33f-481b-94aa-1caac4cd1a4a","070a5251-d7c4-4ada-a086-06c1a625d215","43ad12e0-f290-4290-9968-5efb466d8939","6d5c4f9f-e560-4601-a254-94c10e5b9ed5","35e71612-ecba-4d52-b2d0-55cee65748ba","93f7b14b-7379-4b58-a620-0562abba35a6","e39c215c-c463-4ca8-8e59-cc63f6c1538b"] Array of column UUIDs for additional image column fields to export. |
Array of objects Page break positions for the template. Eg.: | |
| templateOptions | object Map of options as defined by the FOP template. See Get template options. See examples for usage. |
| prependLinks | Array of strings Array of PDF attachment links to merge at the beginning of the document. Eg.: |
| appendLinks | Array of strings Array of PDF attachment links to merge at the end of the document. Eg.: |
| dateTimeLocale | string Overrides Locale used for number formatting. This affects prices and dates/time. Only use when required to deviate from the default behaviour. Example values: |
{- "sessionId": "39d105c0-5254-4860-9865-935aba7cc78a",
- "calculationScheme": "STDB2B_WBK",
- "preferredImageColumn": "cc080d73-88f4-4bfc-8ec1-e7e2ad30739a",
- "externalRefColumn": "c962203c-7e83-4a2f-8060-acaa4a06c921",
- "viewId": "67f105c0-5254-4860-9865-935aba7cc567",
- "data": {
- "egr_report_sometext": "some text information to pass through to the template",
- "egr_report_customboolvalue": false
}, - "items": [
- "e788318d-aa89-4134-93e2-2a5074d68dfe",
- "0ebe798a-97eb-4410-90fa-852a6303713b",
- "a6adcdfd-cd4f-4011-a2d3-f0bf294f6cd7"
], - "matchBasketItemIds": true,
- "filename": "somecustomname.pdf",
- "imageOptions": [
- "tag=default",
- "hideSubArticles=false",
- "zoom=2",
- "alpha=130",
- "beta=45",
- "format=JPG",
- "shadowPlane=true",
- "shadowPlane.filter=DOF",
- "shadowPlane.color=0.4 0.4 0.4",
- "ambient=0.8 0.8 0.8",
- "renderMode=PBR"
], - "templateOptions": {
- "subject": "Test Subject",
- "hideVariantText": true
}, - "pageBreaks": [
- {
- "posNo": "1",
- "value": "before"
}, - {
- "posNo": "3",
- "value": "after"
}
],
}{- "name": "Report_020523-135558.pdf",
- "errors": [
- {
- "additionalInformation": { },
- "cause": [
- "Some exception..."
], - "id": "item-text-error",
- "message": "Failed to get item app data!",
- "scopes": [
- "ERROR"
], - "type": "item"
}
]
}Output all the data available to a template. Request body properties are optional unless marked as required
Note: This request supports all options for the generate request.
Results in a JSON representation of the data available to the specified template. This can vary depending on the template so no response examples will be provided here. This method is for debugging and template development only, not for production use. The Request can result in the same errors as the generate request.
| templateKey required | string Unique template identifier |
| sessionId required | string uuid of the current session. |
| calculationScheme | string Default: "STDB2B_WBK" Scheme for the price calculation. |
| preferredImageColumn | string Default: "73bd68f4-da62-11d8-b9d6-00e081513ada" User defined image column. Used to retrieve a user defined image for an article before getting an internal image. |
| viewId | string UUID of the view to use for this export. |
| externalRefColumn | string UUID to reference the basket column that contains the external reference number |
| data | object Map of additional data to pass-through to the template. All parameters are passed to the template without modification. |
| items | Array of strings List of Article IDs to include in the Report. Acts as a filter. |
| matchBasketItemIds | boolean boolean value to indicate whether the Article IDs supplied by the |
| imageOptions | Array of strings Image options to override the |
| filename | string Custom filename for the report. Will override default genarated filename. Valid filename examples: |
| imageColumns | Array of strings Default: ["7423b6f0-d424-48b3-b75c-9fc5c61992c1","a3cc0a92-9b7c-4d51-a893-796a5adca350","85d7d0a1-6fe6-4c83-ac6d-3c225038f325","66dce599-d33f-481b-94aa-1caac4cd1a4a","070a5251-d7c4-4ada-a086-06c1a625d215","43ad12e0-f290-4290-9968-5efb466d8939","6d5c4f9f-e560-4601-a254-94c10e5b9ed5","35e71612-ecba-4d52-b2d0-55cee65748ba","93f7b14b-7379-4b58-a620-0562abba35a6","e39c215c-c463-4ca8-8e59-cc63f6c1538b"] Array of column UUIDs for additional image column fields to export. |
Array of objects Page break positions for the template. Eg.: | |
| templateOptions | object Map of options as defined by the FOP template. See Get template options. See examples for usage. |
| prependLinks | Array of strings Array of PDF attachment links to merge at the beginning of the document. Eg.: |
| appendLinks | Array of strings Array of PDF attachment links to merge at the end of the document. Eg.: |
| dateTimeLocale | string Overrides Locale used for number formatting. This affects prices and dates/time. Only use when required to deviate from the default behaviour. Example values: |
{- "sessionId": "39d105c0-5254-4860-9865-935aba7cc78a",
- "calculationScheme": "STDB2B_WBK",
- "preferredImageColumn": "cc080d73-88f4-4bfc-8ec1-e7e2ad30739a",
- "externalRefColumn": "c962203c-7e83-4a2f-8060-acaa4a06c921",
- "viewId": "67f105c0-5254-4860-9865-935aba7cc567",
- "data": {
- "egr_report_sometext": "some text information to pass through to the template",
- "egr_report_customboolvalue": false
}, - "items": [
- "e788318d-aa89-4134-93e2-2a5074d68dfe",
- "0ebe798a-97eb-4410-90fa-852a6303713b",
- "a6adcdfd-cd4f-4011-a2d3-f0bf294f6cd7"
], - "matchBasketItemIds": true,
- "filename": "somecustomname.pdf",
- "imageOptions": [
- "tag=default",
- "hideSubArticles=false",
- "zoom=2",
- "alpha=130",
- "beta=45",
- "format=JPG",
- "shadowPlane=true",
- "shadowPlane.filter=DOF",
- "shadowPlane.color=0.4 0.4 0.4",
- "ambient=0.8 0.8 0.8",
- "renderMode=PBR"
], - "templateOptions": {
- "subject": "Test Subject",
- "hideVariantText": true
}, - "pageBreaks": [
- {
- "posNo": "1",
- "value": "before"
}, - {
- "posNo": "3",
- "value": "after"
}
],
}pseudoCalculationLines field to Article model for Templates.data.json request for debugging not working due to JAVA update incompatibility.allowUnsafeVelocityAccess flag to template.xml to bypass StrictUberspector when necessary.Latin-1 to UTF-8.templateKey parameter to template information to distinguish between the unique key.accessibility field to template.xml so that templates can enable accessibility mappings.accessibility set to true. This does not guarantee UA compliance, templates need to be updated for that.connection and read timeouts to all outgoing requests.accessibility enabled templates can embed them if needed.