{"id":1584,"date":"2022-01-21T10:45:10","date_gmt":"2022-01-21T09:45:10","guid":{"rendered":"https:\/\/www.ems-help.ch\/docs\/public-web-services\/"},"modified":"2025-05-06T09:27:20","modified_gmt":"2025-05-06T07:27:20","password":"","slug":"public-web-services","status":"publish","type":"docs","link":"https:\/\/www.ems-help.online\/en\/docs\/public-web-services\/","title":{"rendered":"Public web services"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Introduction<\/h1>\n\n<p>The public web service for sales orders makes it possible to connect third-party systems to the ems sales system.<\/p>\n\n<h2 class=\"wp-block-heading\">URL and authentication<\/h2>\n\n<p>Target URL:<br\/>xxx\/Public\/SaleSystem\/Version10001.asmx<br\/><br\/>The user name and password for access will be provided to you by the operator of the system. In the case of the ems cloud, this is SUBRIS GmbH. <\/p>\n\n<h1 class=\"wp-block-heading\">Web services for vouchers<\/h1>\n\n<h2 class=\"wp-block-heading\">Functions<\/h2>\n\n<h3 class=\"wp-block-heading\">CreateVoucher<\/h3>\n\n<p>Create vouchers<\/p>\n\n<h3 class=\"wp-block-heading\">CheckVoucher<\/h3>\n\n<p>Check vouchers for validity and voucher value.<br\/>Voucher codes from voucher cards (EAN) can also be queried.<\/p>\n\n<h3 class=\"wp-block-heading\">RedeemVoucher<\/h3>\n\n<p>Redeem voucher, create new voucher with residual value if necessary.<\/p>\n\n<h2 class=\"wp-block-heading\">Return<\/h2>\n\n<p>A standardized response object is returned. This contains the following content:<br\/>ErrorCode: 0 = No error, otherwise the error code<br\/>VoucherCode: Voucher code (valid once)<br\/>VoucherCardCode: EAN or number on voucher card<br\/>Value: Value of the voucher CurrencyCode: Currency code, e.g. CHF  <\/p>\n\n<h2 class=\"wp-block-heading\">Input fields<\/h2>\n\n<p>Username: User name for logging in<br\/>Password: User password for logging in<br\/>PosID: Identification of the POS system<\/p>\n\n<h2 class=\"wp-block-heading\">Error codes<\/h2>\n\n<p>The error codes are returned in the response object in the Errorcode field.<br\/>(0 corresponds to no error)<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 1<\/h3>\n\n<p>Unrecognized error<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 1001<\/h3>\n\n<p>Username or password incorrect<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 1002<\/h3>\n\n<p>User no longer or not yet active in the system.<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 4001<\/h3>\n\n<p>POS system ID is not valid or the POS system is not active.<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 4031<\/h3>\n\n<p>Voucher was not found or is not valid.<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 4032<\/h3>\n\n<p>Voucher has already been redeemed.<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 4035<\/h3>\n\n<p>Invalid voucher data (amount less than zero or invalid currency)<\/p>\n\n<h3 class=\"wp-block-heading\">Error code 4036<\/h3>\n\n<p>Amount to be redeemed is greater than the voucher value.<\/p>\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n<h2 class=\"wp-block-heading\">Explanation of ems web services<\/h2>\n\n<p>The ems system offers the option of automating Office documents via the Public WebServices. Data can be retrieved directly via the web services. For security reasons, however, this function is only possible if a running session (logged-in user) is available. If no user is logged in, every call is forwarded directly to the login page.<br\/>The web services only allow data to be retrieved, not written.   <\/p>\n\n<h1 class=\"wp-block-heading\">Web service for data<\/h1>\n\n<h2 class=\"wp-block-heading\">Accessibility<\/h2>\n\n<p>The web services can be accessed via the following URL:<br\/>[EMS-Web-URL]\/start\/OfficeAutomation.asmx<br\/><em>[EMS-Web-URL] corresponds to the URL of the customer system.<\/em><\/p>\n\n<h2 class=\"wp-block-heading\">Functions<\/h2>\n\n<p>The following functions are available in the ems web service. A list of the exact data types and expected parameters can be called up as follows:<br\/>[EMS-Web-URL]\/start\/OfficeAutomation.asmx?WSDL <br\/><\/p>\n\n<h3 class=\"wp-block-heading\">System_getVersion<\/h3>\n\n<p>Return of the current version of the EMS Web System.<br\/><strong>Return (string):<\/strong><br\/>Return of the current version<\/p>\n\n<h3 class=\"wp-block-heading\">Office_CompanyImageByCode_v001<\/h3>\n\n<p>Returns the logo (image) of the company.<br\/><strong>Parameter:<\/strong><br\/>intS1pCode: Code of the corresponding image position.<br\/><em>Position 1 corresponds to the logo used on reports.<\/em><br\/><strong>Return (ByteArray):<\/strong><br\/><\/p>\n\n<h3 class=\"wp-block-heading\">Office_CostCenterListBySearchText_v001<\/h3>\n\n<p>List of cost centers or organizational units based on a search text.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01 &#8230; 999 = Cost centers with ;-separated<br\/>Pos. xx.00 = Status (only for Pos. 00)<br\/>Pos. xx.01 = FiCode<br\/>Pos. xx.02 = Cost center<br\/>Pos. xx.03 = Cost center text \/ branch text<br\/>Pos. xx.04 = Location       <\/p>\n\n<h3 class=\"wp-block-heading\">Office_CustomerAddressDataByKdCode_v001<\/h3>\n\n<p>Returns a customer address based on the exact customer code. <strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-20 = Customer data  <\/p>\n\n<h3 class=\"wp-block-heading\">Office_CustomerOpportunityDataByAsCode_v001<\/h3>\n\n<p>Return of the offer with the address data and order data.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-15 = Customer data<br\/>Pos. 16-30 = Object data<br\/>Pos. 31-45 = Shipping address<br\/>Pos. 46-60 = Planner<br\/>Pos. 61-70 = Quotation data      <\/p>\n\n<h3 class=\"wp-block-heading\">Office_CustomerOrderDataByKaCode_v001<\/h3>\n\n<p>Return of the customer order with the address data and order data.<br\/><strong>Parameter:<\/strong><br\/>intKaCode: Exact internal customer order number (without KA)<br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-15 = Customer data<br\/>Pos. 16-30 = Object data<br\/>Pos. 31-45 = Shipping address<br\/>Pos. 46-60 = Planner<br\/>Pos. 61-70 = Order data      <\/p>\n\n<h3 class=\"wp-block-heading\">Office_CustomerReferenceImageByFiRoCode_v001<\/h3>\n\n<p>Return of the image to a customer reference.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Byte array with the image as a JPG.<\/p>\n\n<h3 class=\"wp-block-heading\">Office_CustomerReferenceListBySearchText_v001<\/h3>\n\n<p>Returns a list of customer references that match the search term.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01 &#8230; 999 = Reference objects with ;-separated<br\/>Pos. xx.00 = Status (only for Pos. 00)<br\/>Pos. xx.01 = FiRo code<br\/>Pos. xx.02 = Title<br\/>Pos. xx.03 = Continuous text      <\/p>\n\n<h3 class=\"wp-block-heading\">Office_DocumentBarcodeFormTemplateList_v001<\/h3>\n\n<p>Returns the list of possible barcode types in the database.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01 &#8230; 99 = Template with ;-separated<br\/>Pos. xx.00 = Status (only for Pos. 00)<br\/>Pos. xx.01 = Prefix<br\/>Pos. xx.02 = Document type<br\/>Pos. xx.03 = Document category<br\/>Pos. xx.04 = Document description       <\/p>\n\n<h3 class=\"wp-block-heading\">Office_EmployeeDataByMaPnr_v002<\/h3>\n\n<p>Return of an employee and the corresponding employee data.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-10 = Employee&#8217;s basic data<br\/>Pos. 11-30 = Employee&#8217;s business data<br\/>Pos. 31-60 = List of training courses    <\/p>\n\n<h3 class=\"wp-block-heading\">Office_EmployeeDataListBySearchText_v001<\/h3>\n\n<p>Returns a list of employees who match the search term.<br\/><strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01 &#8230; 999 = employee with ;-separated<br\/>Pos. xx.00 = status (only for Pos. 00)<br\/>Pos. xx.01 = personnel no.<br\/>Pos. xx.02 = surname first name (function)     <br\/><\/p>\n\n<h3 class=\"wp-block-heading\">Office_EmployeeImageByMaPnr_v001<\/h3>\n\n<p>Return of the screen for the employee. <strong>Parameter:<\/strong><br\/>strTemplateType: Type of the desired document type, e.g. KA for sales order <br\/><strong>Return (array):<\/strong><br\/>Byte array with the image as a JPG.<br\/><\/p>\n\n<h3 class=\"wp-block-heading\">Office_ToolTypeByBmCode_v001<\/h3>\n\n<p>Return of the equipment and equipment types based on the exact equipment number.<br\/><strong>Parameter:<\/strong><br\/>intBmCode: Equipment number<br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-10 = Type data<br\/>Pos. 11-20 = Equipment data<br\/>Pos. 21-30 = Active allocation    <\/p>\n\n<h3 class=\"wp-block-heading\">Office_ToolTypeByBmFremdnr_v002<\/h3>\n\n<p>Return of the equipment and equipment types based on the inventory number (external number).<br\/><strong>Parameter:<\/strong><br\/>strFremdNr: Inventory number of the equipment (not BM code)<br\/><strong>Return (array):<\/strong><br\/>Pos. 00 = Status<br\/>Pos. 01-10 = Type data<br\/>Pos. 11-20 = Equipment data<br\/>Pos. 21-30 = Active allocation    <\/p>\n\n<h1 class=\"wp-block-heading\">Image handler for images<\/h1>\n\n<h2 class=\"wp-block-heading\">Accessibility<\/h2>\n\n<p>The image handlers can be accessed via the following URL:<br\/>[EMS-Web-URL]\/start\/OfficeAutomation.ashx<br\/><em>[EMS-Web-URL] corresponds to the URL of the customer system.<\/em><\/p>\n\n<h2 class=\"wp-block-heading\">Functions<\/h2>\n\n<p>The image handler is called with parameters. These are appended to the URL as follows: [EMS-Web-URL]\/start\/OfficeAutomation.asmx?mapnr=1234<br\/>The image is returned directly.<\/p>\n\n<h3 class=\"wp-block-heading\">Valid parameters<\/h3>\n\n<p>mapnr= [Personnel number] ficode= [Organizational unit code] firocode= [Reference code] s1pcode= [Image code of reports]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The public web service for sales orders makes it possible to connect third-party systems to the ems sales system. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[170],"glossaries":[],"doc_tag":[221],"class_list":["post-1584","docs","type-docs","status-publish","hentry","doc_category-integrations-interfaces","doc_tag-integrator-en"],"year_month":"2026-05","word_count":1013,"total_views":"789","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.ems-help.online\/en\/author\/admin\/"},"doc_category_info":[{"term_name":"Integrations &amp; interfaces","term_url":"https:\/\/www.ems-help.online\/en\/docs-category\/integrations-interfaces\/"}],"doc_tag_info":[{"term_name":"integrator","term_url":"https:\/\/www.ems-help.online\/en\/docs-tag\/integrator-en\/"}],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/docs\/1584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/comments?post=1584"}],"version-history":[{"count":5,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/docs\/1584\/revisions"}],"predecessor-version":[{"id":7772,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/docs\/1584\/revisions\/7772"}],"wp:attachment":[{"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/media?parent=1584"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/doc_category?post=1584"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/glossaries?post=1584"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.ems-help.online\/en\/wp-json\/wp\/v2\/doc_tag?post=1584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}