RS Integrasjon Webservice
Click here for a complete list of operations.
SaveTasks
Save array of WorkbookTask to RS workbook.
WorkbookTask item properties:
DBStatus (None, Create, Update, Delete). (required)
ExternalId = ID for item in external system (required).
ExternalSystem = Description for system item is inserted from (required).
RSId = Id in RS for item. Is returned for new items. Use RSid with DBStatus to update/delete item.
NationalId = Version 1.1.0: New property for WorkbookTask.NationalId (se version documentation for more details):
- Can be used for external system for saving tasks to persons current employment info based only on persons NationalId.
- If using value in NationalId then PersonID must be 0. No need for info in OrgUnitId/PositionId/EmploymentId.
- Employment (first and best) for task is selected in this order:
* Activity for external system exist and task period is inside activity period
* Activity for external system exist and task period is outside activity period
* Shift exist and task periode is inside shift period
* Shift exist and task periode is outside shift period
* Free shift exist for start date of task
* None => Error getting RS employment
PersonId/OrgUnitId/PositionId/EmploymentId = Person/Employment executing the task (required if NationalId is blank).
TaskOrgunitId: The orgunit the task is to be executed on (required if NationalId is blank).
TaskId: ID of the task as given from GetTaskCodes() (required) (NB! Use only tasks defined in RS, use GetTaskCodes() to get defined tasks for orgunit)
Comment (optional)
Start = start date and time for the task (required)
End = end date and time for the task (required)
ResponseStatus = OK, OKWithInfo, Error
ResponseMessage = Error details or info for OKWithInfo
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /prsgericaws/PrsGerica.asmx HTTP/1.1 Host: prstest.no Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://healthXML.org/PrsGateway/SaveTasks" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SaveTasks xmlns="http://healthXML.org/PrsGateway"> <customerId>string</customerId> <userId>string</userId> <password>string</password> <tasks> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> </tasks> <responseInfo>string</responseInfo> </SaveTasks> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SaveTasksResponse xmlns="http://healthXML.org/PrsGateway"> <SaveTasksResult>boolean</SaveTasksResult> <tasks> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> </tasks> <responseInfo>string</responseInfo> </SaveTasksResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /prsgericaws/PrsGerica.asmx HTTP/1.1 Host: prstest.no Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SaveTasks xmlns="http://healthXML.org/PrsGateway"> <customerId>string</customerId> <userId>string</userId> <password>string</password> <tasks> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> </tasks> <responseInfo>string</responseInfo> </SaveTasks> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SaveTasksResponse xmlns="http://healthXML.org/PrsGateway"> <SaveTasksResult>boolean</SaveTasksResult> <tasks> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> <WorkbookTask> <DBStatus>None or Create or Update or Delete</DBStatus> <ExternalId>string</ExternalId> <ExternalSystem>string</ExternalSystem> <RSId>int</RSId> <NationalId>string</NationalId> <PersonId>int</PersonId> <OrgUnitId>string</OrgUnitId> <PositionId>string</PositionId> <EmploymentId>int</EmploymentId> <TaskOrgunitId>string</TaskOrgunitId> <TaskId>string</TaskId> <Comment>string</Comment> <Start>dateTime</Start> <End>dateTime</End> <ResponseStatus>OK or OKWithInfo or Error</ResponseStatus> <ResponseMessage>string</ResponseMessage> </WorkbookTask> </tasks> <responseInfo>string</responseInfo> </SaveTasksResponse> </soap12:Body> </soap12:Envelope>