From ef615b473780102b975433c3796bec4abd95ca27 Mon Sep 17 00:00:00 2001 From: morre Date: Sun, 8 Oct 2023 20:57:15 +0200 Subject: [PATCH] docs: add more information about recentEnvelopes (#46) --- .../Reference/api/{v2.md => v2/_index.md} | 4 +++- content/en/docs/Reference/api/v2/accounts.md | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) rename content/en/docs/Reference/api/{v2.md => v2/_index.md} (92%) create mode 100644 content/en/docs/Reference/api/v2/accounts.md diff --git a/content/en/docs/Reference/api/v2.md b/content/en/docs/Reference/api/v2/_index.md similarity index 92% rename from content/en/docs/Reference/api/v2.md rename to content/en/docs/Reference/api/v2/_index.md index 34a66d8..a185311 100644 --- a/content/en/docs/Reference/api/v2.md +++ b/content/en/docs/Reference/api/v2/_index.md @@ -28,4 +28,6 @@ This describes general behavior of all API endpoints ## Migrating from v1 -_All changes are covered in [Changed in v2](#changed-in-v2)_ +_Changes to all endpoints are covered in [Changed in v2](#changed-in-v2)._ + +For changes to the different resources, check their respective pages. diff --git a/content/en/docs/Reference/api/v2/accounts.md b/content/en/docs/Reference/api/v2/accounts.md new file mode 100644 index 0000000..bd6ff3e --- /dev/null +++ b/content/en/docs/Reference/api/v2/accounts.md @@ -0,0 +1,19 @@ +--- +title: "Accounts" +description: > + This document describes Accounts in API version 2 +--- + +## Recent Envelopes + +The `recentEnvelopes` field is a list of the 5 most common Envelopes that were used for the last 50 transactions where the account was the destination. +The list is ordered by the frequency with the most common Envelope being the first one. If two Envelopes have been used the same amount of times, +the one that was created **more recently** is first in the list. + +Income transactions are also counted in this list, with income appearing as the `null` value. + +Use this field to pre-fill the Envelope when creating transactions in a client. + +## Migrating from v1 + +- The `recentEnvelopes` field is now a list of IDs instead of a list envelope objects. Income is represented by `null`