is an open routing service for standards of the Forum Datenaustausch, basically allowing to find a communication partner in function of/for a certain Forum Datenaustausch standard.
glnProvider(standardName, glnIntermediate, glnFrom)
{
"openapi": "3.0.2",
"info": {
"title": "medSRS",
"description": "The medSRS (medical Standard Routing Service) is a RESTful
webservice for adding and querying routing half sets (RHS).",
"contact": {
"url": "http://medSRS.ch",
"email": "info@medSRS.ch"
},
"version": "1.0.0"
},
"servers": [
{
"url": "https://medSRS.ch/v100"
},
{
"url": "http://medSRS.ch/v100"
}
],
"tags": [
{
"name": "RHS",
"description": "Routing Half Set",
"externalDocs": {
"description": "More information about RHS",
"url": "http://medSRS.ch"
}
}
],
"paths": {
"/addRHS.cgi": {
"get": {
"summary": "Insert/Update a routing half set (RHS)",
"operationId": "addRHS",
"parameters": [
{
"name": "appKey",
"in": "query",
"description": "application key of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
},
{
"name": "glnProvider",
"in": "query",
"description": "official GLN of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^76[0-9]{11}$"
}
},
{
"name": "glnFrom",
"in": "query",
"description": "routing From GLN used in the transport element",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "glnIntermediate",
"in": "query",
"description": "official GLN of the intermediate",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "standardName",
"in": "query",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalInvoiceRequest450",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {}
},
"400": {
"description": "Operation unsuccessful e.g. due to untrustworthy requestor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/errorResponse"
}
}
}
}
},
"x-codegen-request-body-name": "body"
}
},
"/findRHS.cgi": {
"get": {
"summary": "Find a specific routing half set (RHS) - thus the existence of a RHS is tested",
"operationId": "findRHS",
"parameters": [
{
"name": "appKey",
"in": "query",
"description": "application key of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
},
{
"name": "glnProvider",
"in": "query",
"description": "official GLN of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^76[0-9]{11}$"
}
},
{
"name": "glnFrom",
"in": "query",
"description": "routing From GLN used in the transport element",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "glnIntermediate",
"in": "query",
"description": "official GLN of the intermediate",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "standardName",
"in": "query",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalNotification451",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/findResponse"
}
}
}
},
"400": {
"description": "Operation unsuccessful e.g. if the RHS does not exist",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/errorResponse"
}
}
}
}
},
"x-codegen-request-body-name": "body"
}
},
"/deleteRHS.cgi": {
"get": {
"summary": "Delete a routing half set (RHS) if and only if the RHS was added by the same appKey - thus only own RHS can be deleted",
"operationId": "deleteRHS",
"parameters": [
{
"name": "appKey",
"in": "query",
"description": "application key of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
},
{
"name": "glnProvider",
"in": "query",
"description": "official GLN of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^76[0-9]{11}$"
}
},
{
"name": "glnFrom",
"in": "query",
"description": "routing From GLN used in the transport element",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "glnIntermediate",
"in": "query",
"description": "official GLN of the intermediate",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "standardName",
"in": "query",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalInvoiceRequest450",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {}
},
"400": {
"description": "Operation unsuccessful e.g. due to a privilege violation (creator and destructor appKey mismatch)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/errorResponse"
}
}
}
}
},
"x-codegen-request-body-name": "body"
}
},
"/queryRHS.cgi": {
"get": {
"summary": "Query for a RHS of a well known recipient GLN",
"description": "The RHS of a well known recipient GLN is searched and
the webservice returns the glnTo and optionally a second
intermediate GLN (via(2))",
"operationId": "queryRHS",
"parameters": [
{
"name": "glnProvider",
"in": "query",
"description": "official GLN of the provider",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^76[0-9]{11}$"
}
},
{
"name": "glnFrom",
"in": "query",
"description": "routing From GLN used in the transport element",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "glnIntermediate",
"in": "query",
"description": "official GLN of the intermediate",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$"
}
},
{
"name": "standardName",
"in": "query",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalInvoiceRequest450",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$"
}
},
{
"name": "glnRecipient",
"in": "query",
"description": "offficial GLN of the recipient",
"required": true,
"allowEmptyValue": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"pattern": "^76[0-9]{11}$"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/queryResponse"
}
}
}
},
"400": {
"description": "RHS or glnRecipient wrong/illegal defined",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/errorResponse"
}
}
}
},
"404": {
"description": "RHS does not exist for queried recipient GLN",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/errorResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"baseData": {
"required": [
"glnProvider",
"glnFrom",
"standardName"
],
"type": "object",
"properties": {
"glnProvider": {
"type": "string",
"pattern": "^76[0-9]{11}$",
"description": "official GLN of the provider"
},
"glnFrom": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "from GLN used in the transport element"
},
"standardName": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalInvoiceRequest450"
}
},
"xml": {
"name": "baseData"
}
},
"queryResponse": {
"required": [
"glnFrom",
"glnVia",
"glnTo"
],
"type": "object",
"properties": {
"glnFrom": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "from GLN used in the transport element"
},
"glnVia": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "via GLN of the 1st intermediate (via element)"
},
"glnVia2": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "via GLN of the 2nd intermediate (via2 element)"
},
"glnTo": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "to GLN used in the transport element"
}
},
"xml": {
"name": "RHS"
}
},
"findResponse": {
"required": [
"glnProvider",
"glnFrom",
"glnIntermediate",
"standardName"
],
"type": "object",
"properties": {
"glnProvider": {
"type": "string",
"pattern": "^76[0-9]{11}$",
"description": "official GLN of the provider"
},
"glnFrom": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "from GLN used in the transport element"
},
"glnIntermediate": {
"type": "string",
"pattern": "^(76[0-9]{11}|2[0-9]{12})$",
"description": "official GLN of the intermediate"
},
"standardName": {
"type": "string",
"pattern": "^[A-Za-z0-9]{6,32}$",
"description": "name of the standard including the version as given by
the Forum Datenaustausch e.g. generalInvoiceRequest450"
}
},
"xml": {
"name": "RHS"
}
},
"errorResponse": {
"required": [
"error"
],
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "string with the error reason"
}
},
"example": {
"error": "the glnIntermediate is not allowed",
},
"xml": {
"name": "errData"
}
}
}
}
}
<complexType name="transportType">
<sequence>
<element name="via" maxOccurs="unbounded">
<complexType>
<attribute name="via" type="invoice:glnType" use="required"/>
</complexType>
</element>
</sequence>
<attribute name="from" type="invoice:glnType" use="required"/>
<attribute name="to" type="invoice:glnType" use="required"/>
</complexType>
As the above definition shows, the element consists of 2 routing half sets (RHS).