-
Notifications
You must be signed in to change notification settings - Fork 17
/
Investments.postman_collection.json
189 lines (189 loc) · 5.31 KB
/
Investments.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
"info": {
"_postman_id": "24e4d115-0eae-42e1-94b1-3a7d790338dd",
"name": "Investments",
"description": "Welcome to Tink’s Postman collection for Investments.\n\nThe documentation in this Postman collection shows how you get your Tink variables and enter them in Postman to be able to use this collection.\n\nMake sure that you have created your Tink Console account. This is where you find your API credentials, for example `client_id` and `client_secret`, and create and manage your apps. If you haven't created a Console account and an app, go to [Set up your Tink Console account](https://docs.tink.com/resources/landing/set-up-your-tink-account) and follow the instructions to set up an account and create your first app.\n\nIn Postman, go to the **Variables** tab, which should be the one with a green dot next to it. This tab contains four variables. The rest of this documentation shows how to retrieve these values.\n\nMake sure that you enter all of your variables in the **CURRENT VALUE** column.\n\nEnter the `client_id` and `client_secret` values from your Console app.\n\nMake sure that all of your variables are entered into the **CURRENT VALUE** column. Select **Save** (or Ctrl+S).\n\nWhen you've entered all your variables except for `access_token`, run the **POST** command to exchange your `code` for an `access_token`. The value for `access_token` is automatically entered into your list of variables.\n\nConfirm that your `access_token` has been added to your list of variables. Use your `access_token` any number of times to run the **GET** commands to fetch the required data.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "19421806"
},
"item": [
{
"name": "Get Token to Retrieve Investments",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.collectionVariables.set(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "code",
"value": "{{code}}",
"type": "text"
},
{
"key": "client_id",
"value": "{{client_id}}",
"type": "text"
},
{
"key": "client_secret",
"value": "{{client_secret}}",
"type": "text"
},
{
"key": "grant_type",
"value": "authorization_code",
"type": "text"
},
{
"key": "scope",
"value": "accounts:read,investment-accounts:readonly",
"type": "text"
}
]
},
"url": {
"raw": "https://api.tink.com/api/v1/oauth/token",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"api",
"v1",
"oauth",
"token"
]
}
},
"response": []
},
{
"name": "Get Holdings",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text"
}
],
"url": {
"raw": "https://api.tink.com/data/v2/investment-accounts/{{id}}/holdings",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"data",
"v2",
"investment-accounts",
"{{id}}",
"holdings"
],
"query": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "Get Investment Accounts",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text"
}
],
"url": {
"raw": "https://api.tink.com/data/v2/investment-accounts",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"data",
"v2",
"investment-accounts"
],
"query": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjEyYzZmNTIwLTFkMTQtNDFhNS1iZjFkLTliNTBhNGY3ZjMxMSIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjA5MTYwODYsImlhdCI6MTY2MDkwODg4NiwiaXNzIjoidGluazovL2F1dGgiLCJqdGkiOiI5ZTc2ZGZlYi1hOGU3LTRkNWItOTJhMS0yZDM3NDBlMGFmNzkiLCJvcmlnaW4iOiJtYWluIiwic2NvcGVzIjpbImFjY291bnRzOnJlYWQiLCJpbnZlc3RtZW50czpyZWFkIiwiaW52ZXN0bWVudC1hY2NvdW50czpyZWFkb25seSIsImxvYW5zOnJlYWQiLCJsb2FuLWFjY291bnRzOnJlYWRvbmx5Il0sInN1YiI6InRpbms6Ly9hdXRoL3VzZXIvYmMzMDYwMTZiM2IxNGRkMmJjMWY3Y2M1MGVmZTRhYmMiLCJ0aW5rOi8vYXBwL2lkIjoiNzMxZTJhNzQ1NjRlNDA4NTk3OTJjZGNlNmJlNGIwOTMiLCJ0aW5rOi8vYXBwL3ZlcmlmaWVkIjoiZmFsc2UifQ.p1O7TZASR2PuFl9CxniPwnNQSXeAkYlCVzPChHzWv_HUS8VofhEr0JZEBe39JQrw9HAGwkXfcAS7v-tR3GmmPA",
"disabled": true
}
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "access_token",
"value": ""
},
{
"key": "client_id",
"value": "",
"type": "string"
},
{
"key": "client_secret",
"value": "",
"type": "string"
},
{
"key": "code",
"value": "",
"type": "string"
}
]
}