You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apiary.apib
+23-23
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
FORMAT: 1A
2
-
HOST: https://api.teamleader.eu
2
+
HOST: https://api.focus.teamleader.eu
3
3
4
4
#Teamleader API
5
5
@@ -11,13 +11,13 @@ Do you have any feedback, do you miss functionality to support your use case? Le
11
11
12
12
An API is an Application Programming Interface. It is used to programmatically interact with Teamleader, integrate with other software tools or add custom functionalities to Teamleader.
13
13
14
-
Before creating a new integration, make sure to check our existing integrations built by our community in our [Teamleader Marketplace](https://marketplace.teamleader.eu).
14
+
Before creating a new integration, make sure to check our existing integrations built by our community in our [Teamleader Marketplace](https://marketplace.focus.teamleader.eu).
15
15
16
16
##General principles
17
17
18
18
###Endpoints
19
19
20
-
Our API consists of HTTP RPC-style methods, in the form of `https://api.teamleader.eu/resource.action`.
20
+
Our API consists of HTTP RPC-style methods, in the form of `https://api.focus.teamleader.eu/resource.action`.
21
21
22
22
We chose this action based approach over the more popular REST, because it enables us to have domain related actions on resources such as `invoices.book`, `timetracking.start` and `timetracking.stop`.
23
23
@@ -28,7 +28,7 @@ All methods must be called using HTTPS. Data is passed as JSON data in a POST re
28
28
For more complex actions we recommend using POST requests with JSON:
29
29
30
30
```
31
-
POST https://api.teamleader.eu/invoices.list
31
+
POST https://api.focus.teamleader.eu/invoices.list
32
32
33
33
{
34
34
"filter": {
@@ -44,7 +44,7 @@ POST https://api.teamleader.eu/invoices.list
44
44
The GET equivalent:
45
45
46
46
```
47
-
GET https://api.teamleader.eu/invoices.list?filter[department_id]=9d4096c3-813f-4bd5-b3c4-4091807b5b74&page[number]=3&page[size]=50&company_id=3250c613-c478-4a43-9640-b97da923eb21
47
+
GET https://api.focus.teamleader.eu/invoices.list?filter[department_id]=9d4096c3-813f-4bd5-b3c4-4091807b5b74&page[number]=3&page[size]=50&company_id=3250c613-c478-4a43-9640-b97da923eb21
48
48
```
49
49
50
50
###Responses
@@ -149,17 +149,17 @@ OAuth 2 is an authorization framework that allows a user to grant limited access
149
149
150
150
To get access to the protected resources using our API, OAuth 2 uses access tokens. An access token is a string representing the granted permissions. Access tokens can be obtained after a user has completed the OAuth 2 authorization flow.
151
151
152
-
Before starting, you will need to register your integration (an OAuth 2 client) on our [Marketplace](https://marketplace.teamleader.eu/build). Each registered integration is assigned a unique `client_id` and `client_secret`, which is used in the OAuth 2 authorization flow. Note that the `client_secret` key should not be shared or embedded in client-side code.
152
+
Before starting, you will need to register your integration (an OAuth 2 client) on our [Marketplace](https://marketplace.focus.teamleader.eu/build). Each registered integration is assigned a unique `client_id` and `client_secret`, which is used in the OAuth 2 authorization flow. Note that the `client_secret` key should not be shared or embedded in client-side code.
153
153
154
-
When you register an integration on our [Marketplace](https://marketplace.teamleader.eu), it is required to select all *scopes* your integration wants access to.
154
+
When you register an integration on our [Marketplace](https://marketplace.focus.teamleader.eu), it is required to select all *scopes* your integration wants access to.
155
155
156
156
For more detailed information about OAuth 2, we recommend reading [this article](https://auth0.com/docs/protocols/oauth2).
157
157
158
158
###Authorization flow
159
159
160
160
To get access to a user's Teamleader data using the *authorization code grant type*, redirect users to the Teamleader authorization page:
161
161
162
-
`https://app.teamleader.eu/oauth2/authorize`
162
+
`https://focus.teamleader.eu/oauth2/authorize`
163
163
164
164
The required GET parameters are:
165
165
@@ -168,9 +168,9 @@ The required GET parameters are:
168
168
-`state` - unique string to be passed back upon completion (optional)
169
169
-`redirect_uri` - URL to redirect back to after authorization
170
170
171
-
> A list of allowed redirect URIs needs to be configured on your integration's [settings page](https://marketplace.teamleader.eu/build). Only redirect URIs matching one of these whitelisted URIs will be accepted. This is a security measure to prevent malicious users to impersonate your integration.
171
+
> A list of allowed redirect URIs needs to be configured on your integration's [settings page](https://marketplace.focus.teamleader.eu/build). Only redirect URIs matching one of these whitelisted URIs will be accepted. This is a security measure to prevent malicious users to impersonate your integration.
172
172
173
-
After logging in, the user will be asked to authorize your integration to access the data in their account. You will only be granted access to certain Teamleader data, based on the scopes you have selected on your integration's [settings page](https://marketplace.teamleader.eu/build).
173
+
After logging in, the user will be asked to authorize your integration to access the data in their account. You will only be granted access to certain Teamleader data, based on the scopes you have selected on your integration's [settings page](https://marketplace.focus.teamleader.eu/build).
174
174
175
175
If the user authorizes your integration, they will be redirected to the specified `redirect_uri` with a temporary authorization code and the original `state` parameter. If the `state` parameter does not match the original value, the response may have been created by a third party and should be ignored.
176
176
@@ -184,7 +184,7 @@ If the user denies your integration, he will be redirected to the `redirect_uri`
184
184
185
185
After receiving the authorization code from the previous step, an access token can be requested to make API calls. Note that authorization codes can only be exchanged for an access token once and expire 10 minutes after issuance. To exchange the code for an access token, send an HTTP POST request to the following endpoint:
186
186
187
-
`https://app.teamleader.eu/oauth2/access_token`
187
+
`https://focus.teamleader.eu/oauth2/access_token`
188
188
189
189
The required POST parameters are:
190
190
@@ -213,7 +213,7 @@ You will receive a JSON response containing an `access_token` and `refresh_token
213
213
These access tokens are also known as bearer tokens. You can use this token to call API endpoints on behalf of the user, by adding it to the API request as an `Authorization` header.
214
214
215
215
```
216
-
GET https://api.teamleader.eu/contacts.list HTTP/1.1
216
+
GET https://api.focus.teamleader.eu/contacts.list HTTP/1.1
@@ -224,7 +224,7 @@ Access tokens expire shortly (usually 1 hour) after they are issued for security
224
224
225
225
If an access token is expired, a new access token and refresh token pair can be obtained by sending an HTTP POST request to the following endpoint:
226
226
227
-
`https://app.teamleader.eu/oauth2/access_token`
227
+
`https://focus.teamleader.eu/oauth2/access_token`
228
228
229
229
The required POST parameters are:
230
230
@@ -242,7 +242,7 @@ The implicit grant is a simplified authorization code flow optimized for clients
242
242
243
243
Similar to the regular flow, users are redirected to the Teamleader authorization page, but use `token` as the `response_type`:
244
244
245
-
`https://app.teamleader.eu/oauth2/authorize`
245
+
`https://focus.teamleader.eu/oauth2/authorize`
246
246
247
247
The required GET parameters are:
248
248
@@ -251,7 +251,7 @@ The required GET parameters are:
251
251
-`state` - unique string to be passed back upon completion (optional)
252
252
-`redirect_uri` - URL to redirect back to after authorization
253
253
254
-
> A list of allowed redirect URIs needs to be configured on your integration's [settings page](https://marketplace.teamleader.eu/build). Only redirect URIs matching one of these whitelisted URIs will be accepted. This is a security measure to prevent malicious users to impersonate your integration.
254
+
> A list of allowed redirect URIs needs to be configured on your integration's [settings page](https://marketplace.focus.teamleader.eu/build). Only redirect URIs matching one of these whitelisted URIs will be accepted. This is a security measure to prevent malicious users to impersonate your integration.
255
255
256
256
After authorization, the user is redirected to the `redirect_uri` with the following parameters in the **fragment part of the url**:
257
257
@@ -270,7 +270,7 @@ Note that the implicit grant does not return refresh tokens and that our access
270
270
271
271
To retrieve information about the user who authorized your application (the resource owner), call the `users.me` API endpoint:
0 commit comments