-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathConnector API.postman_collection.json
236 lines (236 loc) · 11.3 KB
/
Connector API.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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
{
"info": {
"_postman_id": "1d0afa5f-8dda-4341-bf94-d4d890a87f68",
"name": "Connector API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "1. Get Access Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.collectionVariables.set(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "{{client_id}}",
"type": "default"
},
{
"key": "client_secret",
"value": "{{client_secret}}",
"type": "default"
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "default"
},
{
"key": "scope",
"value": "user:create,user:read,transactions:write,transactions:read,accounts:write,accounts:read",
"type": "default"
}
]
},
"url": {
"raw": "https://api.tink.com/api/v1/oauth/token",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"api",
"v1",
"oauth",
"token"
]
},
"description": "Welcome to Tink’s Postman collection for Connector API.\n\nFor detailed information on how to use the Connector API, see [here](https://docs.tink.com/api/connector).\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\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 a report."
},
"response": []
},
{
"name": "2. Create User",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"external_user_id\": \"test-user-1\",\n \"locale\": \"en_US\",\n \"market\": \"GB\"\n}\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.tink.com/api/v1/user/create",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"api",
"v1",
"user",
"create"
]
},
"description": "Welcome to Tink’s Postman collection for Connector API.\n\nFor detailed information on how to use the Connector API, see [here](https://docs.tink.com/api/connector).\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\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 a report."
},
"response": []
},
{
"name": "3. Ingest Accounts for user as JSON",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "default",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"accounts\": [\n {\n \"availableCredit\": 20000.0,\n \"balance\": 7000.0,\n \"closed\": false,\n \"exclusion\": \"PFM_AND_SEARCH\",\n \"externalId\": \"test-account-1\",\n \"flags\": [\n \"MANDATE\"\n ],\n \"name\": \"Test account\",\n \"number\": \"0\",\n \"payload\": {},\n \"reservedAmount\": 2000.0,\n \"type\": \"OTHER\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.tink.com/connector/users/{{external_user_id}}/accounts",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"connector",
"users",
"{{external_user_id}}",
"accounts"
],
"query": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"disabled": true
}
]
},
"description": "Welcome to Tink’s Postman collection for Connector API.\n\nFor detailed information on how to use the Connector API, see [here](https://docs.tink.com/api/connector).\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\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 a report."
},
"response": []
},
{
"name": "4. Ingest Transactions for user as JSON",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "default",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"autoBook\": false,\n \"overridePending\": false,\n \"transactionAccounts\": [\n {\n \"balance\": 7000.0,\n \"externalId\": \"test-account-1\",\n \"payload\": {},\n \"reservedAmount\": 2000.0,\n \"transactions\": [\n {\n \"amount\": -98.5,\n \"date\": 1455740874875,\n \"description\": \"Dummy test transaction description\",\n \"externalId\": \"test-transaction-1\",\n \"payload\": {},\n \"pending\": false,\n \"type\": \"DEFAULT\"\n }\n ]\n }\n ],\n \"type\": \"REAL_TIME\"\n}\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.tink.com/connector/users/{{external_user_id}}/transactions",
"protocol": "https",
"host": [
"api",
"tink",
"com"
],
"path": [
"connector",
"users",
"{{external_user_id}}",
"transactions"
],
"query": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"disabled": true
}
]
},
"description": "Welcome to Tink’s Postman collection for Connector API.\n\nFor detailed information on how to use the Connector API, see [here](https://docs.tink.com/api/connector).\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\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 a report."
},
"response": []
}
],
"variable": [
{
"key": "access_token",
"value": ""
}
]
}