{"swagger":"2.0","info":{"title":"Open Bank Project API","description":"An Open Source API for Banks. (c) TESOBE GmbH. 2011 - 2026. Licensed under the AGPL and commercial licences.","contact":{"name":"TESOBE GmbH. / Open Bank Project","url":"https://openbankproject.com","email":"contact@tesobe.com"},"version":"v5.1.0"},"host":"api.ttk.com.mk","basePath":"/","schemes":["http","https"],"securityDefinitions":{"directLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Direct-Login","in":"header","name":"Authorization"},"gatewayLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Gateway-Login","in":"header","name":"Authorization"}},"security":[{"directLogin":[],"gatewayLogin":[]}],"paths":{"/obp/v5.1.0/management/method_routings":{"get":{"tags":["Method-Routing","API"],"summary":"Get MethodRoutings","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"<p>Get the all MethodRoutings.</p><p>Query url parameters:</p><ul><li>method_name: filter with method_name</li><li>active: if active = true, it will show all the webui_ props. Even if they are set yet, we will return all the default webui_ props</li></ul><p>eg:<br /><a href=\"https://api.ttk.com.mk/obp/v3.1.0/management/method_routings?active=true\">https://api.ttk.com.mk/obp/v3.1.0/management/method_routings?active=true</a><br /><a href=\"https://api.ttk.com.mk/obp/v3.1.0/management/method_routings?method_name=getBank\">https://api.ttk.com.mk/obp/v3.1.0/management/method_routings?method_name=getBank</a></p><p>User Authentication is Required. The User must be logged in. The Application must also be authenticated.</p><p><strong>JSON response body fields:</strong></p><p><a href=\"/glossary#\"><strong>key</strong></a>: CustomerNumber</p><p><a href=\"/glossary#parameters\"><strong>parameters</strong></a>:</p><p><a href=\"/glossary#\"><strong>value</strong></a>: 5987953</p>","operationId":"OBPv3.1.0-getMethodRoutings","parameters":[],"responses":{"200":{"description":"Success","schema":{"type":"object","required":["method_routings"],"properties":{"method_routings":{"type":"array","items":{"$ref":"#/definitions/MethodRoutingCommons"}}}}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorAuthenticatedUserIsRequired"}}}},"post":{"tags":["Method-Routing","API"],"summary":"Create MethodRouting","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"<p>Create a MethodRouting.</p><p>User Authentication is Required. The User must be logged in. The Application must also be authenticated.</p><p>Explanation of Fields:</p><ul><li>method_name is required String value, current supported value: [mapped | stored_procedure_vDec2019 | rest_vMar2019]</li><li>connector_name is required String value</li><li>is_bank_id_exact_match is required boolean value, if bank_id_pattern is exact bank_id value, this value is true; if bank_id_pattern is null or a regex, this value is false</li><li>bank_id_pattern is optional String value, it can be null, a exact bank_id or a regex</li><li>parameters is optional array of key value pairs. You can set some parameters for this method</li></ul><p>note and CAVEAT!:</p><ul><li>bank_id_pattern has to be empty for methods that do not take bank_id as a function parameter, otherwise might get empty result</li><li>methods that aggregate bank objects (e.g. getBankAccountsForUser) have to take any  existing method routings for these objects into consideration</li><li>so if you create e.g. a bank specific method routing for getting an account, make sure that it is also served by endpoints getting ALL accounts for ALL banks</li><li>if bank_id_pattern is regex, special characters need to do escape, for example: bank_id_pattern = &quot;some-id_pattern_\\d+&quot;</li></ul><p>If the connector name starts with rest, parameters can contain &quot;outBoundMapping&quot; and &quot;inBoundMapping&quot;, convert OutBound and InBound json structure.<br />for example:<br />outBoundMapping example, convert json from source to target:<br /><img src=\"https://user-images.githubusercontent.com/2577334/75248007-33332e00-580e-11ea-8d2a-d1856035fa24.png\" alt=\"Snipaste_outBoundMapping\" /><br />Build OutBound json value rules:<br />1 set cId value with: outboundAdapterCallContext.correlationId value<br />2 set bankId value with: concat bankId.value value with  string helloworld<br />3 set originalJson value with: whole source json, note: the field value expression is $root</p><p>inBoundMapping example, convert json from source to target:<br /><img src=\"https://user-images.githubusercontent.com/2577334/75248199-a9d02b80-580e-11ea-9238-e073264e9170.png\" alt=\"inBoundMapping\" /><br />Build InBound json value rules:<br />1 and 2 set inboundAdapterCallContext and status value: because field name ends with &quot;$default&quot;, remove &quot;$default&quot; from field name, not change the value<br />3 set fullName value with: concat string full: with result.name value<br />4 set bankRoutingScheme value: because source value is Array, but target value is not Array, the mapping field name must ends with [0].</p><p><strong>JSON request body fields:</strong></p><p><a href=\"/glossary#\"><strong>key</strong></a>: CustomerNumber</p><p><a href=\"/glossary#parameters\"><strong>parameters</strong></a>:</p><p><a href=\"/glossary#\"><strong>value</strong></a>: 5987953</p><p><strong>JSON response body fields:</strong></p><p><a href=\"/glossary#\"><strong>key</strong></a>: CustomerNumber</p><p><a href=\"/glossary#parameters\"><strong>parameters</strong></a>:</p><p><a href=\"/glossary#\"><strong>value</strong></a>: 5987953</p>","operationId":"OBPv3.1.0-createMethodRouting","parameters":[{"in":"body","name":"body","description":"MethodRoutingCommons object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/MethodRoutingCommons"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/MethodRoutingCommons"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorAuthenticatedUserIsRequired"}}}}},"/obp/v5.1.0/management/method_routings/{METHOD_ROUTING_ID}":{"delete":{"tags":["Method-Routing","API"],"summary":"Delete MethodRouting","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"<p>Delete a MethodRouting specified by METHOD_ROUTING_ID.</p><p>User Authentication is Required. The User must be logged in. The Application must also be authenticated.</p><p><strong>URL Parameters:</strong></p><p><a href=\"/glossary#method_routing_id\">METHOD_ROUTING_ID</a>:</p><p><strong>JSON response body fields:</strong></p>","operationId":"OBPv3.1.0-deleteMethodRouting","parameters":[{"in":"path","name":"METHOD_ROUTING_ID","description":"the method routing id ","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorAuthenticatedUserIsRequired"}}}},"put":{"tags":["Method-Routing","API"],"summary":"Update MethodRouting","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"<p>Update a MethodRouting.</p><p>User Authentication is Required. The User must be logged in. The Application must also be authenticated.</p><p>Explaination of Fields:</p><ul><li>method_name is required String value, current supported value: [mapped | stored_procedure_vDec2019 | rest_vMar2019]</li><li>connector_name is required String value</li><li>is_bank_id_exact_match is required boolean value, if bank_id_pattern is exact bank_id value, this value is true; if bank_id_pattern is null or a regex, this value is false</li><li>bank_id_pattern is optional String value, it can be null, a exact bank_id or a regex</li><li>parameters is optional array of key value pairs. You can set some paremeters for this method<br />note:</li><li><p>if bank_id_pattern is regex, special characters need to do escape, for example: bank_id_pattern = &quot;some-id_pattern_\\d+&quot;</p></li></ul><p>If connector name start with rest, parameters can contain &quot;outBoundMapping&quot; and &quot;inBoundMapping&quot;, to convert OutBound and InBound json structure.<br />for example:<br />outBoundMapping example, convert json from source to target:<br /><img src=\"https://user-images.githubusercontent.com/2577334/75248007-33332e00-580e-11ea-8d2a-d1856035fa24.png\" alt=\"Snipaste_outBoundMapping\" /><br />Build OutBound json value rules:<br />1 set cId value with: outboundAdapterCallContext.correlationId value<br />2 set bankId value with: concat bankId.value value with  string helloworld<br />3 set originalJson value with: whole source json, note: the field value expression is $root</p><p>inBoundMapping example, convert json from source to target:<br /><img src=\"https://user-images.githubusercontent.com/2577334/75248199-a9d02b80-580e-11ea-9238-e073264e9170.png\" alt=\"inBoundMapping\" /><br />Build InBound json value rules:<br />1 and 2 set inboundAdapterCallContext and status value: because field name ends with &quot;$default&quot;, remove &quot;$default&quot; from field name, not change the value<br />3 set fullName value with: concat string full: with result.name value<br />4 set bankRoutingScheme value: because source value is Array, but target value is not Array, the mapping field name must ends with [0].</p><p><strong>URL Parameters:</strong></p><p><a href=\"/glossary#method_routing_id\">METHOD_ROUTING_ID</a>:</p><p><strong>JSON response body fields:</strong></p><p><a href=\"/glossary#\"><strong>key</strong></a>: CustomerNumber</p><p><a href=\"/glossary#parameters\"><strong>parameters</strong></a>:</p><p><a href=\"/glossary#\"><strong>value</strong></a>: 5987953</p>","operationId":"OBPv3.1.0-updateMethodRouting","parameters":[{"in":"body","name":"body","description":"MethodRoutingCommons object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/MethodRoutingCommons"}},{"in":"path","name":"METHOD_ROUTING_ID","description":"the method routing id ","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/MethodRoutingCommons"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorAuthenticatedUserIsRequired"}}}}}},"definitions":{"ErrorAuthenticatedUserIsRequired":{"properties":{"message":{"type":"string","example":"OBP-20001: User not logged in. Authentication is required!"}}},"MethodRoutingCommons":{"required":["is_bank_id_exact_match","method_name","connector_name","parameters"],"properties":{"is_bank_id_exact_match":{"type":"boolean","example":"false"},"method_name":{"type":"string","example":"getBank"},"connector_name":{"type":"string","example":"rest_vMar2019"},"method_routing_id":{"type":"string"},"bank_id_pattern":{"type":"string","example":"some_bankId_.*"},"parameters":{"type":"array","items":{"$ref":"#/definitions/MethodRoutingParam"}}}},"MethodRoutingParam":{"required":["key","value"],"properties":{"key":{"type":"string","example":"url"},"value":{"type":"string","example":"http://mydomain.com/xxx"}}}}}