1. Home
  2. Docs
  3. Information for administr...
  4. Technical information
  5. Public web services

Public web services

introduction

The public web service for sales orders enables third-party systems to be connected to the ems sales system.

URL and authentication

Target URL:
xxx/Public/SaleSystem/Version10001.asmx

The username and password for access will be given to you by the operator of the system. In the case of the ems cloud, this is SUBRIS GmbH.

Web services for vouchers

functions

CreateVoucher

Creation of vouchers

Check Voucher

Checking the vouchers for validity and the voucher value.
Voucher codes from voucher cards (EAN) can also be queried.

RedeemVoucher

Redeem voucher, if necessary create new voucher with residual value.

return

A standardized response object is returned. This contains the following content:
ErrorCode: 0 = Without error, otherwise the error code
VoucherCode: Voucher code (valid once)
VoucherCardCode: EAN or number on the voucher card
Value: value of the voucher CurrencyCode: currency code, e.g. CHF

input fields

Username: Username for login
Password: User’s password for login
PosID: Identification of the POS system

error codes

The error codes are returned in the response object in the Errorcode field.
(0 corresponds to no error)

Error code 1

Unknown error

Error code 1001

Wrong Username or password

Error code 1002

User no longer or not yet active in the system.

Error code 4001

POS system ID is not valid or the POS system is not active.

Error code 4031

Coupon not found or not valid.

Error code 4032

Voucher has already been redeemed.

Error code 4035

Invalid voucher data (amount less than zero or invalid currency)

Error code 4036

The amount to be redeemed is greater than the voucher value.


Explanation of the ems web services

The ems system offers the option to automate office documents via the Public WebServices. Data can be called up directly via the web services. For security reasons, however, the function is only possible if there is a running session (registered user). If no user is logged in, each call is forwarded directly to the login page.
Web services only allow data to be retrieved, not written.

Web service for data

reachability

The web services can be reached via the following URL:
[EMS-Web-URL]/start/OfficeAutomation.asmx
[EMS-Web-URL] corresponds to the URL of the customer system.

functions

The following functions are available in the ems web service. A list of the exact data types and expected parameters is available as follows:
[EMS-Web-URL]/start/OfficeAutomation.asmx?WSDL

System_getVersion

Return of the current version of the EMS Web System.
Return (String):
Return of the current version

Office_CompanyImageByCode_v001

Return of the logo (image) of the company.
Parameter:
intS1pCode: Code of the corresponding image position.
Position 1 corresponds to the logo used on reports.
Return (ByteArray):

Office_CostCenterListBySearchText_v001

List of cost centers or organizational units based on a search text.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01 … 999 = cost centers with ;-separated
position xx.00 = status (only for item 00)
position xx.01 = FiCode
position xx.02 = cost center
position xx.03 = cost center text / branch text
position xx.04 = locality

Office_CustomerAddressDataByKdCode_v001

Return a customer address based on the exact customer code. Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01-20 = customer data

Office_CustomerOpportunityDataByAsCode_v001

Return of the offer with the address data and order data.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01-15 = customer data
position 16-30 = object data
position 31-45 = shipping address
position 46-60 = planner
position 61-70 = offer data

Office_CustomerOrderDataByKaCode_v001

Return of the customer order with the address data and order data.
Parameter:
intKaCode: Exact Internal Sales Order Number (without KA)
Return (array):
position 00 = state
position 01-15 = customer data
position 16-30 = object data
position 31-45 = shipping address
position 46-60 = planner
position 61-70 = order data

Office_CustomerReferenceImageByFiRoCode_v001

Returning the image to a customer reference.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
Byte array with the image as JPG.

Office_CustomerReferenceListBySearchText_v001

Return a list of customer references that match the search term.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01 … 999 = reference objects with ;-separated
position xx.00 = status (only for item 00)
position xx.01 = FiRo code
position xx.02 = title
position xx.03 = continuous text

Office_DocumentBarcodeFormTemplateList_v001

Returns the list of possible barcode types in the database.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01 … 99 = template with ;-separated
position xx.00 = status (only for item 00)
position xx.01 = prefix
position xx.02 = document type
position xx.03 = document category
position xx.04 = document identifier

Office_EmployeeDataByMaPnr_v002

Return of an employee and the corresponding data of the employee.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01-10 = employee’s basic data
position 11-30 = employee’s business details
position 31-60 = list of trainings

Office_EmployeeDataListBySearchText_v001

Return a list of employees matching the search term.
Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
position 00 = state
position 01 … 999 = employees with ;-separated
position xx.00 = status (only for item 00)
position xx.01 = personnel no.
position xx.02 = last name first name (function)

Office_EmployeeImageByMaPnr_v001

Return of the picture to the employee. Parameter:
strTemplateType: Type of the desired document type, e.g. KA for customer order
Return (array):
Byte array with the image as JPG.

Office_ToolTypeByBmCode_v001

Return of the resource and resource type based on the exact resource number.
Parameter:
intBmCode: resource number
Return (array):
position 00 = state
position 01-10 = type data
position 11-20 = resource data
position 21-30 = Active Allocation

Office_ToolTypeByBmFremdnr_v002

Return of the equipment and equipment types based on the inventory number (external number).
Parameter:
strFremdNr: Inventory number of the equipment (not BM code)
Return (array):
position 00 = state
position 01-10 = type data
position 11-20 = resource data
position 21-30 = Active Allocation

Image handler for images

reachability

The image handlers can be reached via the following URL:
[EMS-Web-URL]/start/OfficeAutomation.ashx
[EMS-Web-URL] corresponds to the URL of the customer system.

functions

The image handler is called with parameters. These are appended to the URL as follows:[EMS-Web-URL] /start/OfficeAutomation.asmx?mapnr=1234
The image is returned directly as a return.

Valid parameters

mapnr=[Personalnummer] ficode=[Organisationseinheit Code] firocode=[Referenzcode] s1pcode= [Bildcode von Reports]