{"info":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","description":"<html><head></head><body><p>API's to create, read, update and delete your investment data like assets, funds and metrics.</p>\n<h3 id=\"authentication\">Authentication</h3>\n<p>We will be using API keys for authentication. Given that each API will be stateless each API will be authorized seperately. <strong>You will have to send the api key in request header as mentioned below or in the url with query parameter \"key\"</strong>.</p>\n<p>Along with api key you will also need to send app id which is the identifier of your key in your header as shown below.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>x-app-id</strong></th>\n<th><strong>32-bit-base64encoded-string</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><p><em>Note:</em> Sending app id and key id as request headers is the preferred way. But incase you are sending the key as a query param, also send \"app-id\" as a query param.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6625379","collectionId":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","publishedId":"VUqmxL2z","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"152421","highlight":"A8CF54"},"publishDate":"2022-08-18T11:58:02.000Z"},"item":[{"name":"Metric","item":[{"name":"List all metrics","id":"16cb2f5a-9384-4355-9d6d-ef29bec60496","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/metrics","description":"<p><strong>Description</strong></p>\n<p>Returns a list of all the metrics.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["metrics"],"query":[],"variable":[]}},"response":[{"id":"54bb2cac-18ee-4e6f-afab-451d22d186d5","name":"List all metrics","originalRequest":{"method":"GET","header":[{"key":"","value":"","type":"text","disabled":true}],"url":"/metrics"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n      \"name\": \" (SASB E102) Air Quality\",\n      \"metric_id\": \"627cfcc10043ecba88e10b33\",\n      \"field_name\": \"__sasb_e102__air_quality\",\n      \"field_type\": \"multiple_choice_label_number\",\n      \"type\": \"standard\",\n      \"unit\": \"#\",\n      \"unit_type\": \"number\",\n      \"updatable\": false,\n      \"field_options\": [\n        0.25,\n        0.5,\n        0.75\n      ],\n      \"field_label_options\": [\n        \"+\",\n        \"=\",\n        \"-\"\n      ],\n      \"sasb_risk_code\": \"E102\",\n      \"description\": \"The category addresses management of air quality impacts resulting from stationary (e.g., factories, power plants) and mobile sources (e.g., trucks, delivery vehicles, planes) as well as industrial emissions. Relevant airborne pollutants include, but are not limited to, oxides of nitrogen (NOx), oxides of sulfur (SOx), volatile organic compounds (VOCs), heavy metals, particulate matter, and chlorofluorocarbons. The category does not include GHG emissions, which are addressed in a separate category.\"\n    }\n]"}],"_postman_id":"16cb2f5a-9384-4355-9d6d-ef29bec60496"}],"id":"34d69f77-8ea2-4e88-a7ba-540fa675edc1","description":"<p><strong>Description:</strong></p>\n<p>A metric, as the name suggests is a detailed definition of the data point for a particular asset. Each asset has a set of metrics as its data points.</p>\n<p>For example - To add \"SASB sub sector\" as data point for an asset, say \"SVG equity\".</p>\n<p><code>{ \"sasb_sub\": \"Renewable Resources &amp; Alternative Energy - Wind Technology &amp; Project Developers\" }</code></p>\n<p>We will have \"SASB sub sector\" as a metric, which will have a data point <code>field_name = \"sasb_sub\"</code> denoting that \"<code>sasb_sub</code>\" is the field name used by asset object.</p>\n<p><strong>Fields:</strong></p>\n<ul>\n<li><strong>name</strong> - Name of the metric</li>\n<li><strong>metric_id</strong> - Treety Id of the metric</li>\n<li><strong>field_name</strong> - field which is used to store and retrieve this metric's data for any fund or an asset</li>\n<li><strong>field_type</strong> - data type this metric is going to hold, options given below<ul>\n<li><em>number</em> - Numeric data</li>\n<li><em>string</em> - Text data</li>\n<li><em>boolean</em> - True or False</li>\n<li><em>datatime</em> - Date and time</li>\n<li><em>multiple_choice_string</em> - Set of text to select from</li>\n<li><em>multiple_choice_number</em> - Set of numbers to select from</li>\n<li><em>multiple_choice_label_number</em> - Set of number which are represented by a label in string form</li>\n<li><em>attachment</em> - File type</li>\n</ul>\n</li>\n<li><strong>type</strong> - type of the metric based on where the asset level data for this metric comes from, options given below<ul>\n<li><em>standard</em> - metric data at asset level comes from user input</li>\n<li><em>custom</em> - metric data at asset level is calculated using mathematical formula</li>\n</ul>\n</li>\n<li><strong>unit</strong> - unit of the data</li>\n<li><strong>unit_type</strong> - unit type of the data this metric will take, example - weight, distance, currency</li>\n</ul>\n","_postman_id":"34d69f77-8ea2-4e88-a7ba-540fa675edc1","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}}},{"name":"Fund","item":[{"name":"List all funds","id":"4af6ac07-03c9-4f15-8a84-435442ff8d11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/funds","description":"<p><strong>Description</strong></p>\n<p>Returns a list of all the funds with their data points.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["funds"],"query":[],"variable":[]}},"response":[{"id":"d71c932c-93a4-47df-84a2-b59ebeef988d","name":"List all funds","originalRequest":{"method":"GET","header":[],"url":"/funds"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"fund_id\": \"62c5ad3d52bdde9f23bf298c\",\n        \"name\": \"Westermeerwind Aandelenfonds\",\n        \"sasb_details\": [\n            {\n                \"sasb_id\": \"e103\",\n                \"sasb_name\": \"energy management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"weighted_exp_eur\": 1901500,\n                \"weighted_exp_fc\": 1901500,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",\n                \"unweighted_exp_prec\": 100,\n                \"exp_perc_+\": 0,\n                \"exp_perc_-\": 0,\n                \"exp_perc_=\": 100\n            },\n            {\n                \"sasb_id\": \"g101\",\n                \"sasb_name\": \"product design and lifecycle management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"weighted_exp_eur\": 1901500,\n                \"weighted_exp_fc\": 1901500,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",\n                \"unweighted_exp_prec\": 100,\n                \"exp_perc_+\": 0,\n                \"exp_perc_-\": 0,\n                \"exp_perc_=\": 100\n            }\n        ]\n    },\n    {\n        \"fund_id\": \"62c5ad3d52bdde9f23bf298d\",\n        \"name\": \"Westermeerwind Leningenfonds\",\n        \"sasb_details\": [\n            {\n                \"sasb_id\": \"e103\",\n                \"sasb_name\": \"energy management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"weighted_exp_eur\": 1901500,\n                \"weighted_exp_fc\": 1901500,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",\n                \"unweighted_exp_prec\": 100,\n                \"exp_perc_+\": 0,\n                \"exp_perc_-\": 0,\n                \"exp_perc_=\": 100\n            },\n            {\n                \"sasb_id\": \"g101\",\n                \"sasb_name\": \"product design and lifecycle management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"weighted_exp_eur\": 1901500,\n                \"weighted_exp_fc\": 1901500,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",\n                \"unweighted_exp_prec\": 100,\n                \"exp_perc_+\": 0,\n                \"exp_perc_-\": 0,\n                \"exp_perc_=\": 100\n            }\n        ]\n    }\n]"}],"_postman_id":"4af6ac07-03c9-4f15-8a84-435442ff8d11"},{"name":"Get a fund","id":"dad9df68-5ee8-4ee7-835b-9cae0227d1fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/fund/:fund_id","description":"<p><strong>Description</strong></p>\n<p>Returns the fund of the given fund_id and all of its data point.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id"],"query":[],"variable":[{"type":"any","value":"treety-fund-id","key":"fund_id"}]}},"response":[{"id":"284a834a-e629-4b4e-b016-9d8159e939d2","name":"Get a fund","originalRequest":{"method":"GET","header":[],"url":{"raw":"/fund/:fund_id","path":["fund",":fund_id"],"variable":[{"key":"fund_id","value":"treety-fund-id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\",                              \n    \"name\": \"Westermeerwind Aandelenfonds\",                             \n    \"sasb_details\": [                                                   \n        {\n            \"sasb_id\": \"e103\",                                          \n            \"sasb_name\": \"energy management\",                           \n            \"sasb_score\": 0.5,                                          \n            \"aum_exposure\": 50,                                         \n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        },\n        {\n            \"sasb_id\": \"g101\",\n            \"sasb_name\": \"product design and lifecycle management\",\n            \"sasb_score\": 0.5,\n            \"aum_exposure\": 50,\n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        },\n        {\n            \"sasb_id\": \"g102\",\n            \"sasb_name\": \"product development\",\n            \"sasb_score\": 0.5,\n            \"aum_exposure\": 50,\n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        }\n    ]\n}\n"}],"_postman_id":"dad9df68-5ee8-4ee7-835b-9cae0227d1fa"},{"name":"Create a fund","id":"3f24aa74-d509-4e72-ad07-2933cae54939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"/fund","description":"<p><strong>Description</strong></p>\n<p>API to create a fund</p>\n<p><strong>Required Field</strong></p>\n<p><strong>name</strong>: Name of the fund</p>\n<p><strong>Optional Fields</strong></p>\n<p>Any other field can also be passed with payload, however if there is an existing metric same as this field, it will be overwritten by the aggregated sum of the assets in that fund.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund"],"query":[],"variable":[]}},"response":[{"id":"ea19b7d3-5f72-4393-9b19-6bffaf71cb80","name":"Create a fund","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Westermeerwind Aandelenfonds\",\n    \"any_key\": \"any_value\"\n}","options":{"raw":{"language":"json"}}},"url":"/fund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\"\n}"}],"_postman_id":"3f24aa74-d509-4e72-ad07-2933cae54939"},{"name":"Update a fund","id":"3d7ce827-03bd-425c-8033-87cbfdc90c44","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"/fund/:fund_id","description":"<p><strong>Description</strong></p>\n<p>API to update data points of an already existing fund</p>\n<p><strong>Fields</strong></p>\n<p>You can pass any field in request body, however if there is an existing metric same as that field, it will be overwritten by the aggregated sum of the assets in that fund.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"}]}},"response":[{"id":"2b977460-5778-4e07-b829-f082b24a4ad8","name":"Update a fund","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Westermeerwind Aandelenfonds\",\n    \"any_key\": \"any_value\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id","path":["fund",":fund_id"],"variable":[{"key":"fund_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\"\n}"}],"_postman_id":"3d7ce827-03bd-425c-8033-87cbfdc90c44"},{"name":"Delete a fund","id":"c19bb58f-ea52-4f48-a2e3-a9d1ad04dc70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/fund/:fund_id","description":"<p><strong>Description</strong></p>\n<p>API to delete a fund. Removing a fund will remove it from the aggregations (example: Grand total of your organizations portfolio).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"}]}},"response":[{"id":"fa5fc0b2-8f42-42f3-b805-0c95c6f73d09","name":"Delete a fund","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"/fund/:fund_id","path":["fund",":fund_id"],"variable":[{"key":"fund_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\"\n}"}],"_postman_id":"c19bb58f-ea52-4f48-a2e3-a9d1ad04dc70"}],"id":"7b4afe3e-8594-4705-b94f-36e5951addca","description":"<p><strong>Description</strong></p>\n<p>A fund is a collection of assets. Each fund has an aggregated data of all the assets in the fund. The aggregation of fund's metrics form the grand total of your organization.</p>\n<p><strong>Identifier Fields:</strong></p>\n<ul>\n<li><strong>fund_id</strong> : Fund id of the fund</li>\n<li><strong>name</strong> : Name of the fund</li>\n</ul>\n<p><strong>Other fields:</strong></p>\n<p>There can be any field for each fund, however if there is an existing metric same as this field, it will be overwritten by the aggregated sum of the assets in that fund.</p>\n<p>Following are the API to read, create, update and delete funds.</p>\n","_postman_id":"7b4afe3e-8594-4705-b94f-36e5951addca","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}}},{"name":"Asset","item":[{"name":"List all assets in a fund","id":"f080aa1c-cc68-485d-bc69-1426e4f58f85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/fund/:fund_id/assets","description":"<p><strong>Description</strong></p>\n<p>Returns the list of assets in the given fund.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id","assets"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"}]}},"response":[{"id":"7ab1c0f7-253b-484b-acea-3ae77d2e83bf","name":"List all assets in a fund","originalRequest":{"method":"GET","header":[],"url":{"raw":"/fund/:fund_id/assets","path":["fund",":fund_id","assets"],"variable":[{"key":"fund_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"\n{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\",\n    \"fund_name\": \"Knight Tech\",\n\n    \"assets\": [\n        {\n\n            \"asset_id\": \"62c5ad6852bdde9f2bbf2991\", \n            \"name\": \"NET US Equity\",\n            \"portfolio_weight\": 14.5,   \n            \"asset_cm_id\": \"cm_id\",\n            \"ticker\": \"EUR\",\n            \"isin\": 0,\n            \"asset_valuation\": 3803000,\n\n            \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n            \"sasb_details\": [\n                {\n                    \"sasb_id\": \"e103\",\n                    \"sasb_name\": \"energy management\",\n                    \"sasb_score\": 0.5,\n                    \"aum_exposure\": 50,\n                    \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n                },\n                {\n                    \"sasb_id\": \"g101\",\n                    \"sasb_name\": \"product design and lifecycle management\",\n                    \"sasb_score\": 0.5,\n                    \"aum_exposure\": 50,\n                    \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n                }\n            ]\n        },\n        {\n\n            \"asset_id\": \"62c5ad6852bdde9f2bbf2992\", \n            \"name\": \"SHOP US Equity\",\n            \"portfolio_weight\": 14.7,   \n            \"asset_cm_id\": \"cm_id\",\n            \"ticker\": \"EUR\",\n            \"isin\": 0,\n            \"asset_valuation\": 4803000,\n\n            \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n            \"sasb_details\": [\n                {\n                    \"sasb_id\": \"e103\",\n                    \"sasb_name\": \"energy management\",\n                    \"sasb_score\": 0.5,\n                    \"aum_exposure\": 50,\n                    \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n                },\n                {\n                    \"sasb_id\": \"g101\",\n                    \"sasb_name\": \"product design and lifecycle management\",\n                    \"sasb_score\": 0.5,\n                    \"aum_exposure\": 50,\n                    \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n                }\n            ]\n        }\n    ]\n}\n"}],"_postman_id":"f080aa1c-cc68-485d-bc69-1426e4f58f85"},{"name":"Get an asset","id":"b49f21bc-d88e-427b-b2e3-d1ba326a545a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/fund/:fund_id/asset/:asset_id","description":"<p><strong>Description</strong></p>\n<p>Returns an asset.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id","asset",":asset_id"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"},{"type":"any","value":null,"key":"asset_id"}]}},"response":[{"id":"5be1dac0-8f97-45a3-9af9-b7335d4df4f0","name":"Get an asset","originalRequest":{"method":"GET","header":[],"url":{"raw":"/fund/:fund_id/asset/:asset_id","path":["fund",":fund_id","asset",":asset_id"],"variable":[{"key":"fund_id","value":null},{"key":"asset_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"\n{\n    \"fund_id\": \"62c5ad3d52bdde9f23bf298c\",\n    \"fund_name\": \"Knight Tech\",\n\n    \"asset\":{\n\n        \"asset_id\": \"62c5ad6852bdde9f2bbf2991\", \n        \"name\": \"NET US Equity\",\n        \"portfolio_weight\": 14.5,   \n        \"asset_cm_id\": \"cm_id\",\n        \"ticker\": \"EUR\",\n        \"isin\": 0,\n        \"asset_valuation\": 3803000,\n\n        \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n        \"sasb_details\": [\n            {\n                \"sasb_id\": \"e103\",\n                \"sasb_name\": \"energy management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n            },\n            {\n                \"sasb_id\": \"g101\",\n                \"sasb_name\": \"product design and lifecycle management\",\n                \"sasb_score\": 0.5,\n                \"aum_exposure\": 50,\n                \"timestamp_last_update\": \"2020-01-01T00:00:00Z\"\n            }\n        ]\n    }\n}\n"}],"_postman_id":"b49f21bc-d88e-427b-b2e3-d1ba326a545a"},{"name":"Create an asset","id":"773d4a6f-71c2-40a1-b1fe-ec51539eeed9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"/fund/:fund_id/asset","description":"<p><strong>Description</strong></p>\n<p>API to create an asset inside a fund.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id","asset"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"}]}},"response":[{"id":"40d7d733-88b5-4892-8e21-8ae57c533d82","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"NET US Equity\",\n    \"portfolio_weight\": 14.5,\n    \"asset_cm_id\": \"cm_id\",\n    \"ticker\": \"EUR\",\n    \"isin\": 0,\n    \"asset_valuation\": 3803000,\n    \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n    \"sasb_details\": [\n        {\n            \"sasb_id\": \"e103\",\n            \"sasb_score\": 0.5\n        },\n        {\n            \"sasb_id\": \"g101\",\n            \"sasb_score\": 0.5\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id/asset","path":["fund",":fund_id","asset"],"variable":[{"key":"fund_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset_id\": \"62c5ad6852bdde9f2bbf2991\"\n}"},{"id":"2765ed60-d44c-44b7-a447-916a76503fb9","name":"Error: Missing asset_cm_id","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{ \n    \"name\": \"New asset\",\n    \"portfolio_weight\": \"3.22\",\n    \"asset_valuation\": 430400\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id/asset","path":["fund",":fund_id","asset"],"variable":[{"key":"fund_id","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error_code\": \"invalid_cm_id\",\n    \"message\": \"Cannot create an asset without a CM id.\"\n}"},{"id":"680eb25d-5ffb-4214-9947-ac0f684fe855","name":"Error: Duplicate asset_cm_id","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"NET US Equity\",\n    \"portfolio_weight\": 14.5,\n    \"asset_cm_id\": \"cm-id-already-in-fund\",\n    \"ticker\": \"EUR\",\n    \"isin\": 0,\n    \"asset_valuation\": 3803000,\n    \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n    \"sasb_details\": [\n        {\n            \"sasb_id\": \"e103\",\n            \"sasb_score\": 0.5\n        },\n        {\n            \"sasb_id\": \"g101\",\n            \"sasb_score\": 0.5\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id/asset","path":["fund",":fund_id","asset"],"variable":[{"key":"fund_id","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error_code\": \"duplicate_cm_id\",\n    \"message\": \"An asset with this CM id already exists in this fund.\",\n    \"asset_id\": \"62789f57844976f68b612f40\"\n}\n"}],"_postman_id":"773d4a6f-71c2-40a1-b1fe-ec51539eeed9"},{"name":"Update an asset","id":"2b1a5462-19b5-4138-9c1f-35f61b4e22ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"/fund/:fund_id/asset/:asset_id","description":"<p><strong>Description</strong></p>\n<p>API to update an asset</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id","asset",":asset_id"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"},{"type":"any","value":null,"key":"asset_id"}]}},"response":[{"id":"e9d25edb-30c0-4811-b599-580abe21b6e0","name":"Success","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"NET US Equity\",\n    \"portfolio_weight\": 14.5,\n    \"asset_cm_id\": \"cm_id\",\n    \"ticker\": \"EUR\",\n    \"isin\": 0,\n    \"asset_valuation\": 3803000,\n    \"sasb_sub\": \"Renewable Resources & Alternative Energy - Wind Technology & Project Developers\",\n    \"sasb_details\": [\n        {\n            \"sasb_id\": \"e103\",\n            \"sasb_score\": 0.5\n        },\n        {\n            \"sasb_id\": \"g101\",\n            \"sasb_score\": 0.5\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id/asset/:asset_id","path":["fund",":fund_id","asset",":asset_id"],"variable":[{"key":"fund_id","value":null},{"key":"asset_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset_id\": \"62c5ad6852bdde9f2bbf2991\"\n}"},{"id":"a82c4033-60ea-4981-8335-4c12966be356","name":"Error: Duplicate asset_cm_id","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"asset_cm_id\": \"cm-id-of-another-asset\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/fund/:fund_id/asset/:asset_id","path":["fund",":fund_id","asset",":asset_id"],"variable":[{"key":"fund_id","value":null},{"key":"asset_id","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset_id\": \"62789f57844976f68b612f40\",\n    \"error_code\": \"duplicate_cm_id\",\n    \"message\": \"An asset with this CM id already exists in this fund.\"\n}"}],"_postman_id":"2b1a5462-19b5-4138-9c1f-35f61b4e22ae"},{"name":"Delete an asset","id":"370b83a6-823c-4bee-a058-56a048b3ea61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/fund/:fund_id/asset/:asset_id","description":"<p><strong>Description</strong></p>\n<p>API to delete an asset.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["fund",":fund_id","asset",":asset_id"],"query":[],"variable":[{"type":"any","value":null,"key":"fund_id"},{"type":"any","value":null,"key":"asset_id"}]}},"response":[{"id":"e2bc9cdf-3e03-4949-8073-1abe151173e2","name":"Delete an asset","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"/fund/:fund_id/asset/:asset_id","path":["fund",":fund_id","asset",":asset_id"],"variable":[{"key":"fund_id","value":null},{"key":"asset_id","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset_id\": \"62c5ad6852bdde9f2bbf2991\"\n}"}],"_postman_id":"370b83a6-823c-4bee-a058-56a048b3ea61"}],"id":"9dbdb58c-1630-4090-81e2-6f07536b22f5","description":"<p><strong>Description</strong></p>\n<p>An asset is a fundamental entity in a fund for example an equity or a company. An asset or group of assets combine to form a fund.</p>\n<p>Each asset has several metrics. These metrics are the empirical data points of an asset. Fund's metrics are an aggregation of assets within the fund.</p>\n<p><strong>Identifier fields</strong></p>\n<ul>\n<li>asset_id : Treety id of the asset</li>\n<li>name : Name of the asset</li>\n</ul>\n<p>Additionally there can any field in an asset however if there is an existing metric of type \"custom\" same as this field, its value will be overwritten by the calculated value derived from the formula of that metric.</p>\n","_postman_id":"9dbdb58c-1630-4090-81e2-6f07536b22f5","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}}},{"name":"Organization","item":[{"name":"Get organization","id":"13da5142-defd-4d42-8e9b-215bdfef998e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/organization","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["organization"],"query":[],"variable":[]}},"response":[{"id":"db533fc6-07b9-4e81-8126-c9d97f5ffa45","name":"Get organization","originalRequest":{"method":"GET","header":[],"url":"/organization"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"ESG Fund Management\",\n    \"sasb_details\": [                                                   \n        {\n            \"sasb_id\": \"e103\",                                          \n            \"sasb_name\": \"energy management\",                           \n            \"sasb_score\": 0.5,                                          \n            \"aum_exposure\": 50,                                         \n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        },\n        {\n            \"sasb_id\": \"g101\",\n            \"sasb_name\": \"product design and lifecycle management\",\n            \"sasb_score\": 0.5,\n            \"aum_exposure\": 50,\n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        },\n        {\n            \"sasb_id\": \"g102\",\n            \"sasb_name\": \"product development\",\n            \"sasb_score\": 0.5,\n            \"aum_exposure\": 50,\n            \"weighted_exp_eur\" : 1901500 ,                              \n            \"weighted_exp_fc\" : 1901500,                                \n            \"timestamp_last_update\": \"2020-01-01T00:00:00Z\",            \n            \"unweighted_exp_prec\" : 100,                                \n            \"exp_perc_+\" : 0,                                           \n            \"exp_perc_-\" : 0,                                           \n            \"exp_perc_=\" : 100\n        }\n    ],\n    \"any_key\": \"any_value\"\n}\n"}],"_postman_id":"13da5142-defd-4d42-8e9b-215bdfef998e"}],"id":"735495cd-77be-4ddb-accb-8351431906c0","description":"<p>\"Organization\" refers to the entity managing the investment. The organization data holds the aggregation of all the funds within.</p>\n","_postman_id":"735495cd-77be-4ddb-accb-8351431906c0","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}}},{"name":"Test","item":[{"name":"Get test results","id":"565ca2ec-b2e0-416a-ba27-fae5af6a5421","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/test","description":"<p>The response for this API is in 2 part</p>\n<ol>\n<li>Asset - Returns a list of results, where each result signifies a response for an API call mentioned in the Asset section.</li>\n<li>Fund - Returns a list of results, where each result signifies a response for an API call mentioned in the Fund section.</li>\n</ol>\n<p>Following are the data points in each results:</p>\n<ol>\n<li>request_type: type of the request ( get | post | put )</li>\n<li>status: http status code of the response for this API call</li>\n<li>elapse: time taken for the request to complete</li>\n<li>comments: Comment regarding some extra step taken with respect to the API call</li>\n</ol>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}},"urlObject":{"path":["test"],"query":[],"variable":[]}},"response":[{"id":"9feafc16-bbbb-46fe-8e7c-856f5cf2fbfd","name":"Success","originalRequest":{"method":"GET","header":[],"url":"/test"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset\": [\n        {\n            \"comments\": \"\",\n            \"elapse\": 2.01134,\n            \"request_type\": \"create\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Asset validation successful.\",\n            \"elapse\": 1.984488,\n            \"request_type\": \"get\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.03744,\n            \"request_type\": \"update\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Asset validation successful.\",\n            \"elapse\": 1.025816,\n            \"request_type\": \"get\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.068489,\n            \"request_type\": \"delete\",\n            \"status\": 200\n        }\n    ],\n    \"fund\": [\n        {\n            \"comments\": \"\",\n            \"elapse\": 4.052504,\n            \"request_type\": \"create\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Fund validation successful.\",\n            \"elapse\": 1.866504,\n            \"request_type\": \"get\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 2.062924,\n            \"request_type\": \"update\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Fund validation successful.\",\n            \"elapse\": 1.344407,\n            \"request_type\": \"get\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.584774,\n            \"request_type\": \"delete\",\n            \"status\": 200\n        }\n    ]\n}"},{"id":"56dc7d42-00c6-4e7c-9013-778f7f69df5c","name":"Error","originalRequest":{"method":"GET","header":[],"url":"/test"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"asset\": [\n        {\n            \"comments\": \"\",\n            \"elapse\": 2.01134,\n            \"request_type\": \"create\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Asset validation successful.\",\n            \"elapse\": 1.984488,\n            \"request_type\": \"get\",\n            \"status\": 400\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.03744,\n            \"request_type\": \"update\",\n            \"status\": 500\n        },\n        {\n            \"comments\": \"Asset validation successful.\",\n            \"elapse\": 1.025816,\n            \"request_type\": \"get\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.068489,\n            \"request_type\": \"delete\",\n            \"status\": 200\n        }\n    ],\n    \"fund\": [\n        {\n            \"comments\": \"\",\n            \"elapse\": 4.052504,\n            \"request_type\": \"create\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Fund validation successful.\",\n            \"elapse\": 1.866504,\n            \"request_type\": \"get\",\n            \"status\": 500\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 2.062924,\n            \"request_type\": \"update\",\n            \"status\": 200\n        },\n        {\n            \"comments\": \"Fund validation successful.\",\n            \"elapse\": 1.344407,\n            \"request_type\": \"get\",\n            \"status\": 400\n        },\n        {\n            \"comments\": \"\",\n            \"elapse\": 1.584774,\n            \"request_type\": \"delete\",\n            \"status\": 200\n        }\n    ]\n}"}],"_postman_id":"565ca2ec-b2e0-416a-ba27-fae5af6a5421"}],"id":"ccf09c73-e5f9-4337-ad7d-5c4ef12b9f26","description":"<p>To test whether all the assets and funds APIs are working properly this API can be used.</p>\n<p>This API internal simulates the following steps using API call internal</p>\n<ol>\n<li>Create a fund</li>\n<li>Create an asset with the fund</li>\n<li>Update the asset</li>\n<li>Update the fund</li>\n<li>Delete the asset</li>\n<li>Delete the fund</li>\n</ol>\n<p>After every update the API also fires a get call to check whether the fund or asset in the system as updated by the simulation.</p>\n","_postman_id":"ccf09c73-e5f9-4337-ad7d-5c4ef12b9f26","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]},"isInherited":true,"source":{"_postman_id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","id":"0fcf2d56-3ead-446a-b0cb-58c639a2116e","name":"Treety API","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"x-api-key"},{"key":"value","value":"32bit-base64encoded-unique-string"}]}},"event":[{"listen":"prerequest","script":{"id":"c1337f25-74a7-4e69-a5c6-40aeb00be5ec","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"249c7fa5-1c91-4bc1-be09-2e24be43ffdf","type":"text/javascript","exec":[""]}}],"variable":[{"key":"api_key","value":"32bit-base64encoded-unique-string"},{"key":"fund_id","value":"treety-fund-id"},{"key":"asset_id","value":"treety-asset-id","type":"string"},{"key":"metric-id","value":"treety-metric-id","type":"string"},{"key":"email-id","value":"users-email-id","type":"string"},{"key":"api_key_header","value":"x-api-key","type":"string"}]}