Skip to content

Commit 130f5b0

Browse files
users/me is deprecated and replaced by users/self (iZettle#143)
* Replaced the deprecated `users/me` with `users/self` * Updated CHANGELOG with the info about users/me deprecation. * Editorial fixes * Update CHANGELOG.adoc Co-authored-by: AndreaFilyo <[email protected]> Co-authored-by: AndreaFilyo <[email protected]> * Updated based on Anand's comment * Clarified how to specify the organization UUID and how to use `self` Co-authored-by: AndreaFilyo <[email protected]>
1 parent f2b636d commit 130f5b0

File tree

5 files changed

+43
-14
lines changed

5 files changed

+43
-14
lines changed

CHANGELOG.adoc

+18-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ Each log entry uses the following tags:
77
- For API changes and the corresponding documentation changes, the log is tagged with the name of the changes API. For example, `OAuth API`.
88
- For documentation changes that are editorial and are not introduced by any API change, the log is tagged with `Editorial changes`.
99
10+
.**January 18, 2022** `OAuth API` `Editorial changes`
11+
[%collapsible]
12+
====
13+
**Replaced the deprecated endpoint `users/me` with `users/self`**
14+
15+
The following updates were done for the deprecation:
16+
17+
- The OAuth API endpoint `users/me` is deprecated and replaced by `users/self`.
18+
- Until `users/me` is removed, all API requests to it will be redirected to `users/self`.
19+
- The API documentation is updated to include `users/self` instead of `users/me`.
20+
21+
> **Note:** The support for the deprecated `users/me` will continue until further notice. It is recommended to replace `users/me` with `users/self` in your integration as soon as possible.
22+
====
23+
1024
.**November 24, 2021** `Editorial changes`
1125
[%collapsible]
1226
====
@@ -29,7 +43,7 @@ The improvements include the following:
2943
The Password grant OAuth flow has been deprecated and will be removed on 31st January 2022. Please update your Zettle integration to another authentication flow to keep it running. For information about how to update the authentication flow, see xref:oauth-api/zettle-password-grant-migration-guide/zettle-password-grant-migration-guide.md[Zettle Password grant migration guide].
3044
====
3145

32-
.**July 20 2021** `Finance API`
46+
.**July 20, 2021** `Finance API`
3347
[%collapsible]
3448
====
3549
**Finance API documentation improvements**
@@ -41,7 +55,7 @@ The improvements include the following:
4155
- Added user guides.
4256
====
4357
44-
.**May 3 2021** `Pusher API`
58+
.**May 3, 2021** `Pusher API`
4559
[%collapsible]
4660
====
4761
**Pusher API documentation improvements**
@@ -53,7 +67,7 @@ The improvements include the following:
5367
- Added the user guides and troubleshooting documents.
5468
====
5569
56-
.**October 28 2020** `Editorial changes`
70+
.**October 28, 2020** `Editorial changes`
5771
[%collapsible]
5872
====
5973
**Applied a Beta label on any mention of API documentation**
@@ -65,7 +79,7 @@ To be transparent and set expectations right, we've applied a Beta label on any
6579
We are currently working to improve the Zettle Developer Platform, including the API documentation.
6680
====
6781

68-
.**September 21 2020** `Finance API` `Purchase API` `Product library API` `Image API`
82+
.**September 21, 2020** `Finance API` `Purchase API` `Product library API` `Image API`
6983
[%collapsible]
7084
====
7185
Updated documentation for Finance, Purchase, Product Library, and Image APIs.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ When contacting the Integrations team, please provide the following information:
5555
* Information about affected merchants. That includes:
5656
* Emails of affected merchants.
5757
* UUIDs and organisation UUIDs of the affected merchants.
58-
To fetch UUIDs and organisation UUIDs, use the `GET users/me` endpoint of the OAuth API. For more information about using the endpoint, see [Get user info](authorization.md/#get-user-info).
58+
To fetch UUIDs and organisation UUIDs, use the `GET users/self` endpoint of the OAuth API. For more information about using the endpoint, see [Get user info](authorization.md/#get-user-info).

faq.adoc

+17-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,18 @@ filter instead of `{organizationUuid}`
8181
[%collapsible]
8282
====
8383
****
84-
You can either use the `self` filter or call the following endpoint to fetch the organization UUID.
84+
You can use the `self` path parameter instead of specifying organization UUID in an endpoint.
85+
86+
Example request
87+
[source]
88+
--
89+
GET /organizations/self/accounts/{accountTypeGroup}/balance
90+
--
91+
92+
Or, you can fetch the organization UUID by calling the following endpoint.
8593
[source]
8694
--
87-
GET https://oauth.izettle.com/users/me
95+
GET https://oauth.zettle.com/users/self
8896
--
8997
Example response
9098
[source,json]
@@ -95,6 +103,13 @@ Example response
95103
"organizationUuid": "ab305d54-75b4-431b-adb2-eb6b9e546013"
96104
}
97105
106+
--
107+
After fetching the organization UUID, you can specify it in an endpoint.
108+
109+
Example request
110+
[source]
111+
--
112+
GET /organizations/ab305d54-75b4-431b-adb2-eb6b9e546013/accounts/{accountTypeGroup}/balance
98113
--
99114
100115
For more information on the filter and the endpoint, see xref:/authorization.md[OAuth].

finance-api/api-reference.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ See example [Fetch current balance for a liquid account](#fetch-current-balance-
4848

4949
|Name |Type |In |Required/Optional |Description
5050
|:---- |:---- |:---- |:---- |:----
51-
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
51+
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
5252
|accountTypeGroup |string |path |required |The type of a merchant's Zettle account. You can use one of the following account types: <br/><ul><li> `PRELIMINARY` account where transactions are to be confirmed.</li><li> `LIQUID` account where transactions are to be paid out to the merchant.</li></ul>
5353
|at |string |query |optional |Used to fetch account balance that is available at a UTC time. If it's used, any transaction after that point will be ignored. If it's not used, the balance of all transactions at the current point of time is returned. <br/>You can specify a UTC time in one of the following formats: <br/><ul><li>`YYYY-MM` to specify a month. By default, it specifies the first second of the first day in the month. For example, for `2020-11`, the time will be `2020-11-01T00:00:00`.</li><li>`YYYY-MM-DD` to specify a date. For example, `2020-11-29`.</li><li>`YYYY-MM-DDThh:mm:ss` to specify a time. For example, `2020-11-29T03:10:02`.</li></ul>
5454
</details>
@@ -93,7 +93,7 @@ See example [Fetch transactions for a liquid account](#fetch-transactions-for-a-
9393

9494
|Name |Type |In |Required/Optional |Description
9595
|:---- |:---- |:---- |:---- |:----
96-
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
96+
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
9797
|accountTypeGroup |string |path |required |The type of a merchant's Zettle account. You can use one of the following account types: <br/><ul><li> `PRELIMINARY` account where transactions are to be confirmed.</li><li> `LIQUID` account where transactions are to be paid out to the merchant.</li></ul>
9898
|start |string |query |required |A start time in UTC (inclusive) from when the transactions will be fetched. You can specify a UTC time in one of the following formats: <br/><ul><li>`YYYY-MM` to specify a month. By default, it specifies the first second of the first day in the month. For example, for `2020-11`, the time will be `2020-11-01T00:00:00`.</li><li>`YYYY-MM-DD` to specify a date. For example, `2020-11-29`.</li><li>`YYYY-MM-DDThh:mm:ss` to specify a time. For example, `2020-11-29T03:10:02`.</li></ul>
9999
|end |string |query |required |An end time in UTC (exclusive) before when the transactions will be fetched. You can specify a UTC time in one of the following formats: <br/><ul><li>`YYYY-MM` to specify a month. By default, it specifies the first second of the first day in the month. For example, for `2020-11`, the time will be `2020-11-01T00:00:00`.</li><li>`YYYY-MM-DD` to specify a date. For example, `2020-11-29`.</li><li>`YYYY-MM-DDThh:mm:ss` to specify a time. For example, `2020-11-29T03:10:02`.</li></ul>
@@ -177,7 +177,7 @@ See example [Fetch payout information on a specific period](#fetch-payout-inform
177177

178178
|Name |Type |In |Required/Optional |Description
179179
|:---- |:---- |:---- |:---- |:----
180-
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
180+
|organizationUuid |string |path |required |Unique identifier for your organisation. You can specify the value with one of the following: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
181181
|at |string |query |optional |Used to fetch payouts at a certain point in UTC time. If it's used, any transaction after that time will be ignored. If it's not used, the balance of all transactions at the current point of time is returned. <br/>You can specify a UTC time in one of the following formats: <br/><ul><li>`YYYY-MM` to specify a month. For example, `2020-11`. By default, it specifies the first second of the first day in the month.</li><li>`YYYY-MM-DD` to specify a date. For example, `2020-11-29`.</li><li>`YYYY-MM-DDThh:mm:ss` to specify a time. For example, `2020-11-29T03:10:02`.</li></ul>
182182
</details>
183183

pusher-api/api-reference.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ See example [Create a webhook subscription](#create-a-webhook-subscription).
7171

7272
|Name |Type |In |Required/Optional |Description
7373
|---- |---- |---- |---- |----
74-
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
74+
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li>Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
7575
|uuid |string |query |required | Unique identifier for the subscription as UUID version 1.
7676
|transportName |string |query |required | The message option used by Pusher API. Currently only `WEBHOOK` is supported.
7777
|eventNames |array |query |required | Event names for events that you want to create subscription for. The events are specified in an array. <br/>If you pass an empty array, you will subscribe to all events that the Pusher API supports. In this case, make sure that you have all the corresponding authorization scopes issued. See [the list of scopes](#supported-events).
@@ -127,7 +127,7 @@ See example [Get webhook subscriptions](#get-webhook-subscriptions).
127127

128128
|Name |Type |In |Required/Optional |Description
129129
|---- |---- |---- |---- |----
130-
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
130+
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
131131
</details>
132132

133133

@@ -178,7 +178,7 @@ See example [Update a webhook subscription](#update-a-webhook-subscription).
178178

179179
|Name |Type |In |Required/Optional |Description
180180
|---- |---- |---- |---- |----
181-
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
181+
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
182182
|subscriptionUuid |string |path |required |Unique identifier for an existing subscription as UUID version 1.
183183
|transportName |string |query |optional | The message option used by the Pusher API. E.g. `WEBHOOK`. You need to specify the same option that you used while creating the subscription.
184184
|eventNames |array |query |optional | Events that you want to update on the existing subscription. The events are specified in an array.
@@ -225,7 +225,7 @@ See example [Delete a webhook subscription](#delete-a-webhook-subscription).
225225

226226
|Name |Type |In |Required/Optional |Description
227227
|---- |---- |---- |---- |----
228-
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/me` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
228+
|organizationUuid |string |path |required |Unique identifier for your organization. You can use following options to fill in this value: <br/><ul><li>Use `self` as the value. This will retrieve your organizationUuid from the authentication token in the request.</li><li> Get it by using the `users/self` endpoint of OAuth2 API. For more information, see [OAuth2 API](../authorization.md).</li></ul>
229229
|subscriptionUuid |string |path |required |Unique identifier for an existing subscription as UUID version 1.
230230
</details>
231231

0 commit comments

Comments
 (0)