Use it

Use it

dsds

Table of Contents
< All Topics

API Endpoints (functional)

Unless otherwise noted, all requests must be performed using the POST HTTP method, and send a single JSON data element.

For concrete examples, see the section below.

  • /nested: attempts to parse and enrich the input SWIFT data, and returns the result in nested format.
  • /exploded: attempts to parse and enrich the input SWIFT data, and returns the result in exploded format.
  • /example: always processes the same sample data and returns the result in nested format, regardless of the actual argument. In fact, the input data is ignored, and always replaced with the MT910 sample message mentioned below. However, the full processing is actually performed — in other words, it’s the argument which is fixed, not the result. This call will not be needed in normal circumstances, but it is useful as a quick way to determine if the software is working correctly.

NOTE: Invoking these endpoints incurs billing.

Examples

Test Data

For convenience, here are two sample SWIFT messages that you can use as input for testing the endpoints. Of course, you may also use any other valid SWIFT messages.

MT910
"{1:F01MASKCHZZX80A2596106739}{2:O9101900160703MASKCHZHXXXX25961067391607031900N}{3:{108:110110149709}}{4:\r\n:20:ALPINAREF-1\r\n:21:SOMEREF\r\n:25P:1234567890\r\nCRESCHZZ80A\r\n:13D:1712010800-0500\r\n:32A:180919CHF1000000000,00\r\n:50K:/CH3604835011405382000 \r\nSchweizerische- und \r\nFernsehgesellschaft \r\nGiacomettistrasse 1 \r\nCH/3006 Bern\r\n:52A:COPRATWW\r\n:56D:BAN OF JAP \r\nTOKYO STREET \r\nCALI 1001\r\n:72:CVR OF DIR PYMT \r\nSSN:123456 \r\n-}"
MT541
"{1:F01ABNACHZ8XXXX2596106739}{2:O5411345160418ICBKCNBJXBJM00897254971604181345N}{3:{108:110110149709}}{4:\r\n:16R:GENL\r\n:20C::SEME//1234567890123456\r\n:23G:NEWM\r\n:98C::PREP//20181123165256\r\n:16S:GENL\r\n:16R:TRADDET\r\n:98A::TRAD//20181123\r\n:98A::SETT//20181127\r\n:35B:ISIN CH0012138530\r\nCREDIT SUISSE GROUP\r\n:16S:TRADDET\r\n:16R:FIAC\r\n:36B::SETT//UNIT/10,\r\n:97A::SAFE//0123-1234567-05-001\r\n:94F::SAFE//NCSD/INSECHZZXXX\r\n:16S:FIAC\r\n:16R:SETDET\r\n:22F::SETR//TRAD\r\n:16R:SETPRTY\r\n:95R::DEAG/SCOM/CH123456\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::SELL//ABCDABABXXX\r\n:97A::SAFE//123456789\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::PSET//INSECHZZ\r\n:16S:SETPRTY\r\n:16R:AMT\r\n:19A::SETT//CHF218,4\r\n:16S:AMT\r\n:16S:SETDET\r\n-}"

Invocations

The following examples assume that the curl command is being run from within the container, and that the server is listening on the default port 9000. Otherwise, substitute the host/port combination (localhost:9000) with the publicly reachable URL.

  • Invocation of the example endpoint (as mentioned above, this is equivalent to invoking the nested endpoint with the MT910 input):
curl -X POST http://localhost:9000/example -d '{"data":"testing"}'

{"data":"{\"block5\":{},\"parsingInfo\":{\"msg\":\"{1:F01MASKCHZZX80A2596106739}{2:O9101900160703MASKCHZHXXXX25961067391607031900N}{3:{108:110110149709}}{4:\\r\\n:20:ALPINAREF-1\\r\\n:21:SOMEREF\\r\\n:25P:1234567890\\r\\nCRESCHZZ80A\\r\\n:13D:1712010800-0500\\r\\n:32A:180919CHF1000000000,00\\r\\n:50K:/CH3604835011405382000 \\r\\nSchweizerische-  und \\r\\nFernsehgesellschaft \\r\\nGiacomettistrasse 1 \\r\\nCH/3006 Zurich\\r\\n:52A:COPRATWW\\r\\n:56D:BANK OF JAMES \\r\\nTOKYO STREET  \\r\\n Manilla \\r\\nPhilippines\\r\\n:72:CVR OF DIR PYMT \\r\\nSSN:123456 \\r\\n-}\",\"parsedFully\":true,\"lastError\":{}},\"blockS\":{},\"block3\":{\"subBlocks\":{\"108\":\"110110149709\"}},\"block12\":{\"obsPeriod\":{},\"direction\":\"O\",\"receiverInfo\":{\"bicInfo\":{\"timezone\":{},\"locationCode\":\"ZZ\",\"bic\":\"MASKCHZZ80A\",\"branchCode\":\"80A\",\"bankCode\":\"MASK\",\"countryCode\":\"CH\",\"logicalTerminal\":\"X\"},\"timestamp\":1467565200000,\"sessionNumber\":\"2596\",\"seqNumber\":\"106739\"},\"senderInfo\":{\"bicInfo\":{\"timezone\":{},\"locationCode\":\"ZH\",\"bic\":\"MASKCHZHXXX\",\"branchCode\":\"XXX\",\"bankCode\":\"MASK\",\"countryCode\":\"CH\",\"logicalTerminal\":\"X\"},\"timestamp\":1467565200000,\"sessionNumber\":\"2596\",\"seqNumber\":\"106739\"},\"delMon\":{},\"mtType\":\"910\",\"msgPriority\":\"N\",\"appId\":\"F\",\"serviceId\":\"01\"},\"block4\":{\"Other\":{\"50K\":[{\"Name_and_Address\":\"Schweizerische-  und \\r\\nFernsehgesellschaft \\r\\nGiacomettistrasse 1 \\r\\nCH/3006 Zurich\",\"Account\":\"CH3604835011405382000 \",\"country_code\":[\"CA\",\"DZ\",\"US\",\"CH\",\"NL\"]}],\"72\":[{\"Narrative\":\"CVR OF DIR PYMT \\r\\nSSN:123456 \"}],\"21\":[{\"Related_Reference\":\"SOMEREF\"}],\"13D\":[{\"Sign\":\"-\",\"Offset\":\"0500\",\"timestamp_utc\":1512133200000,\"datetime_original\":\"2017-12-01T08:00-05:00\"}],\"56D\":[{\"Party_Identifier_Debit_Credit_Indicator\":\"\",\"Name_and_Address\":\"BANK OF JAMES \\r\\nTOKYO STREET  \\r\\n Manilla \\r\\nPhilippines\",\"Party_Identifier\":\"\",\"country_code\":[\"PH\",\"AU\",\"ZA\",\"US\",\"EC\",\"RU\"]}],\"20\":[{\"Transaction_Reference_Number\":\"ALPINAREF-1\"}],\"52A\":[{\"Party_Identifier\":\"\",\"Identifier_Code_Logical_Terminal\":\"\",\"Identifier_Code_Location_Code\":\"WW\",\"Identifier_Code_Bank_Code\":\"COPR\",\"Party_Identifier_Debit_Credit_Indicator\":\"\",\"Identifier_Code_Country_Code\":\"AT\"}],\"25P\":[{\"Identifier_Code_Logical_Terminal\":\"80A\",\"Identifier_Code_Location_Code\":\"ZZ\",\"Identifier_Code_Bank_Code\":\"CRES\",\"Identifier_Code_Country_Code\":\"CH\",\"Account\":\"1234567890\"}],\"32A\":[{\"Currency\":\"CHF\",\"timestamp_utc\":1537308000000,\"datetime_original\":\"2018-09-19T00:00+02:00\",\"Amount\":1000000000.00}]}}}"}
  • Invocation of the exploded endpoint with the MT541 input:
curl -X POST http://localhost:9000/exploded -d '{"data":"{1:F01ABNACHZ8XXXX2596106739}{2:O5411345160418ICBKCNBJXBJM00897254971604181345N}{3:{108:110110149709}}{4:\r\n:16R:GENL\r\n:20C::SEME//1234567890123456\r\n:23G:NEWM\r\n:98C::PREP//20181123165256\r\n:16S:GENL\r\n:16R:TRADDET\r\n:98A::TRAD//20181123\r\n:98A::SETT//20181127\r\n:35B:ISIN CH0012138530\r\nCREDIT SUISSE GROUP\r\n:16S:TRADDET\r\n:16R:FIAC\r\n:36B::SETT//UNIT/10,\r\n:97A::SAFE//0123-1234567-05-001\r\n:94F::SAFE//NCSD/INSECHZZXXX\r\n:16S:FIAC\r\n:16R:SETDET\r\n:22F::SETR//TRAD\r\n:16R:SETPRTY\r\n:95R::DEAG/SCOM/CH123456\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::SELL//ABCDABABXXX\r\n:97A::SAFE//123456789\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::PSET//INSECHZZ\r\n:16S:SETPRTY\r\n:16R:AMT\r\n:19A::SETT//CHF218,4\r\n:16S:AMT\r\n:16S:SETDET\r\n-}"}'

{"data":"block12_appId|block12_delMon|block12_direction|block12_msgPriority|block12_mtType|block12_obsPeriod|block12_receiverInfo_bicInfo_bankCode|block12_receiverInfo_bicInfo_bic|block12_receiverInfo_bicInfo_branchCode|block12_receiverInfo_bicInfo_countryCode|block12_receiverInfo_bicInfo_locationCode|block12_receiverInfo_bicInfo_logicalTerminal|block12_receiverInfo_bicInfo_timezone|block12_receiverInfo_seqNumber|block12_receiverInfo_sessionNumber|block12_receiverInfo_timestamp|block12_senderInfo_bicInfo_bankCode|block12_senderInfo_bicInfo_bic|block12_senderInfo_bicInfo_branchCode|block12_senderInfo_bicInfo_countryCode|block12_senderInfo_bicInfo_locationCode|block12_senderInfo_bicInfo_logicalTerminal|block12_senderInfo_bicInfo_timezone|block12_senderInfo_seqNumber|block12_senderInfo_sessionNumber|block12_senderInfo_timestamp|block12_serviceId|block3_subBlocks_108|block4_FIAC_SAFE_94F_Identifier Code Bank Code|block4_FIAC_SAFE_94F_Identifier Code Country Code|block4_FIAC_SAFE_94F_Identifier Code Location Code|block4_FIAC_SAFE_94F_Identifier Code Logical Terminal|block4_FIAC_SAFE_94F_Place Code|block4_FIAC_SAFE_97A_Account Number|block4_FIAC_SETT_36B_Quantity|block4_FIAC_SETT_36B_Quantity Type Code|block4_GENL_Other_23G_Function|block4_GENL_Other_23G_Subfunction|block4_GENL_PREP_98C_datetime_original|block4_GENL_PREP_98C_timestamp_utc|block4_GENL_SEME_20C_Reference|block4_SETDET_AMT_SETT_19A_Amount|block4_SETDET_AMT_SETT_19A_Currency Code|block4_SETDET_AMT_SETT_19A_Sign|block4_SETDET_SETPRTY_DEAG_95R_Data Source Scheme|block4_SETDET_SETPRTY_DEAG_95R_Proprietary Code|block4_SETDET_SETPRTY_PSET_95P_Identifier Code Bank Code|block4_SETDET_SETPRTY_PSET_95P_Identifier Code Country Code|block4_SETDET_SETPRTY_PSET_95P_Identifier Code Location Code|block4_SETDET_SETPRTY_PSET_95P_Identifier Code Logical Terminal|block4_SETDET_SETPRTY_SAFE_97A_Account Number|block4_SETDET_SETPRTY_SELL_95P_Identifier Code Bank Code|block4_SETDET_SETPRTY_SELL_95P_Identifier Code Country Code|block4_SETDET_SETPRTY_SELL_95P_Identifier Code Location Code|block4_SETDET_SETPRTY_SELL_95P_Identifier Code Logical Terminal|block4_SETDET_SETR_22F_Data Source Scheme|block4_SETDET_SETR_22F_Indicator|block4_TRADDET_Other_35B_Description of Security|block4_TRADDET_Other_35B_ISIN|block4_TRADDET_SETT_98A_datetime_original|block4_TRADDET_SETT_98A_timestamp_utc|block4_TRADDET_TRAD_98A_datetime_original|block4_TRADDET_TRAD_98A_timestamp_utc|block5_MODULE$|block5_serialVersionUID|blockS_MODULE$|blockS_serialVersionUID|parsingInfo_lastError|parsingInfo_msg|parsingInfo_parsedFully\n\"F\"|\"None\"|\"O\"|\"N\"|\"541\"|\"None\"|\"ABNA\"|\"ABNACHZ8XXX\"|\"XXX\"|\"CH\"|\"Z8\"|\"X\"|\"Europe/Zurich\"|\"106739\"|\"2596\"|\"1460979900000\"|\"ICBK\"|\"ICBKCNBJBJM\"|\"BJM\"|\"CN\"|\"BJ\"|\"X\"|\"Asia/Shanghai\"|\"725497\"|\"0089\"|\"1460958300000\"|\"01\"|\"110110149709\"|\"INSE\"|\"CH\"|\"ZZ\"|\"XXX\"|\"NCSD\"|\"0123-1234567-05-001\"|\"10\"|\"UNIT\"|\"NEWM\"|\"\"|\"2018-11-23T16:52:56+08:00\"|\"1542963176000\"|\"1234567890123456\"|\"218.4\"|\"CHF\"|\"\"|\"None\"|\"None\"|\"INSE\"|\"CH\"|\"ZZ\"|\"\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"\"|\"TRAD\"|\"CREDIT SUISSE GROUP\"|\"CH0012138530\"|\"2018-11-27T00:00+08:00\"|\"1543248000000\"|\"2018-11-23T00:00+08:00\"|\"1542902400000\"|\"None\"|\"5066590221178148012\"|\"None\"|\"5066590221178148012\"|\"Map()\"|\"{1:F01ABNACHZ8XXXX2596106739}{2:O5411345160418ICBKCNBJXBJM00897254971604181345N}{3:{108:110110149709}}{4:\r\n:16R:GENL\r\n:20C::SEME//1234567890123456\r\n:23G:NEWM\r\n:98C::PREP//20181123165256\r\n:16S:GENL\r\n:16R:TRADDET\r\n:98A::TRAD//20181123\r\n:98A::SETT//20181127\r\n:35B:ISIN CH0012138530\r\nCREDIT SUISSE GROUP\r\n:16S:TRADDET\r\n:16R:FIAC\r\n:36B::SETT//UNIT/10,\r\n:97A::SAFE//0123-1234567-05-001\r\n:94F::SAFE//NCSD/INSECHZZXXX\r\n:16S:FIAC\r\n:16R:SETDET\r\n:22F::SETR//TRAD\r\n:16R:SETPRTY\r\n:95R::DEAG/SCOM/CH123456\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::SELL//ABCDABABXXX\r\n:97A::SAFE//123456789\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::PSET//INSECHZZ\r\n:16S:SETPRTY\r\n:16R:AMT\r\n:19A::SETT//CHF218,4\r\n:16S:AMT\r\n:16S:SETDET\r\n-}\"|\"true\"\n\"F\"|\"None\"|\"O\"|\"N\"|\"541\"|\"None\"|\"ABNA\"|\"ABNACHZ8XXX\"|\"XXX\"|\"CH\"|\"Z8\"|\"X\"|\"Europe/Zurich\"|\"106739\"|\"2596\"|\"1460979900000\"|\"ICBK\"|\"ICBKCNBJBJM\"|\"BJM\"|\"CN\"|\"BJ\"|\"X\"|\"Asia/Shanghai\"|\"725497\"|\"0089\"|\"1460958300000\"|\"01\"|\"110110149709\"|\"INSE\"|\"CH\"|\"ZZ\"|\"XXX\"|\"NCSD\"|\"0123-1234567-05-001\"|\"10\"|\"UNIT\"|\"NEWM\"|\"\"|\"2018-11-23T16:52:56+08:00\"|\"1542963176000\"|\"1234567890123456\"|\"218.4\"|\"CHF\"|\"\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"123456789\"|\"ABCD\"|\"AB\"|\"AB\"|\"XXX\"|\"\"|\"TRAD\"|\"CREDIT SUISSE GROUP\"|\"CH0012138530\"|\"2018-11-27T00:00+08:00\"|\"1543248000000\"|\"2018-11-23T00:00+08:00\"|\"1542902400000\"|\"None\"|\"5066590221178148012\"|\"None\"|\"5066590221178148012\"|\"Map()\"|\"{1:F01ABNACHZ8XXXX2596106739}{2:O5411345160418ICBKCNBJXBJM00897254971604181345N}{3:{108:110110149709}}{4:\r\n:16R:GENL\r\n:20C::SEME//1234567890123456\r\n:23G:NEWM\r\n:98C::PREP//20181123165256\r\n:16S:GENL\r\n:16R:TRADDET\r\n:98A::TRAD//20181123\r\n:98A::SETT//20181127\r\n:35B:ISIN CH0012138530\r\nCREDIT SUISSE GROUP\r\n:16S:TRADDET\r\n:16R:FIAC\r\n:36B::SETT//UNIT/10,\r\n:97A::SAFE//0123-1234567-05-001\r\n:94F::SAFE//NCSD/INSECHZZXXX\r\n:16S:FIAC\r\n:16R:SETDET\r\n:22F::SETR//TRAD\r\n:16R:SETPRTY\r\n:95R::DEAG/SCOM/CH123456\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::SELL//ABCDABABXXX\r\n:97A::SAFE//123456789\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::PSET//INSECHZZ\r\n:16S:SETPRTY\r\n:16R:AMT\r\n:19A::SETT//CHF218,4\r\n:16S:AMT\r\n:16S:SETDET\r\n-}\"|\"true\"\n\"F\"|\"None\"|\"O\"|\"N\"|\"541\"|\"None\"|\"ABNA\"|\"ABNACHZ8XXX\"|\"XXX\"|\"CH\"|\"Z8\"|\"X\"|\"Europe/Zurich\"|\"106739\"|\"2596\"|\"1460979900000\"|\"ICBK\"|\"ICBKCNBJBJM\"|\"BJM\"|\"CN\"|\"BJ\"|\"X\"|\"Asia/Shanghai\"|\"725497\"|\"0089\"|\"1460958300000\"|\"01\"|\"110110149709\"|\"INSE\"|\"CH\"|\"ZZ\"|\"XXX\"|\"NCSD\"|\"0123-1234567-05-001\"|\"10\"|\"UNIT\"|\"NEWM\"|\"\"|\"2018-11-23T16:52:56+08:00\"|\"1542963176000\"|\"1234567890123456\"|\"218.4\"|\"CHF\"|\"\"|\"SCOM\"|\"CH123456\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"None\"|\"\"|\"TRAD\"|\"CREDIT SUISSE GROUP\"|\"CH0012138530\"|\"2018-11-27T00:00+08:00\"|\"1543248000000\"|\"2018-11-23T00:00+08:00\"|\"1542902400000\"|\"None\"|\"5066590221178148012\"|\"None\"|\"5066590221178148012\"|\"Map()\"|\"{1:F01ABNACHZ8XXXX2596106739}{2:O5411345160418ICBKCNBJXBJM00897254971604181345N}{3:{108:110110149709}}{4:\r\n:16R:GENL\r\n:20C::SEME//1234567890123456\r\n:23G:NEWM\r\n:98C::PREP//20181123165256\r\n:16S:GENL\r\n:16R:TRADDET\r\n:98A::TRAD//20181123\r\n:98A::SETT//20181127\r\n:35B:ISIN CH0012138530\r\nCREDIT SUISSE GROUP\r\n:16S:TRADDET\r\n:16R:FIAC\r\n:36B::SETT//UNIT/10,\r\n:97A::SAFE//0123-1234567-05-001\r\n:94F::SAFE//NCSD/INSECHZZXXX\r\n:16S:FIAC\r\n:16R:SETDET\r\n:22F::SETR//TRAD\r\n:16R:SETPRTY\r\n:95R::DEAG/SCOM/CH123456\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::SELL//ABCDABABXXX\r\n:97A::SAFE//123456789\r\n:16S:SETPRTY\r\n:16R:SETPRTY\r\n:95P::PSET//INSECHZZ\r\n:16S:SETPRTY\r\n:16R:AMT\r\n:19A::SETT//CHF218,4\r\n:16S:AMT\r\n:16S:SETDET\r\n-}\"|\"true\""}

API Endpoints (technical)

These endpoints do not do meaningful processing, but may be used to perform various tests (or force errors).

  • /echo: returns the input value, unchanged.
  • /error: unconditionally throws an exception, i.e., results in an HTTP Server error.
  • /ping (GET method): returns pong.
  • /healthz (GET method): returns an empty document with HTTP status 200.

Invoking these endpoints does not incur billing.

License and billing enforcement

Swiftflow is a commercial software and requires both a license, and a successful integration with Google’s billing ecosystem in case you deploy it on GCP.

If any of these requirements is not met, the API server will temporarily refuse to process requests which would be subject to billing, until the issue is fixed. Instead, the server will respond with a HTTP 500 (Internal Server Error) code, and an appropriate message.

Examples of failure situations:

time curl -X POST http://localhost:9000/example -d '{"data":"testing"}'
Billing agent failure: agent offline for more than 180 seconds

time curl -X POST http://localhost:9000/example -d '{"data":"testing"}'
Swiftflow license check failed: The license expired