From 02e1de2a4073e007af9b2e67fa2d24f7eca89ef9 Mon Sep 17 00:00:00 2001 From: Maxence Busson Date: Wed, 15 Oct 2025 17:24:38 +0200 Subject: [PATCH 1/6] Update guide-generate-statement.mdx --- .../overview/guide-generate-statement.mdx | 117 +++++++++++++++--- 1 file changed, 103 insertions(+), 14 deletions(-) diff --git a/docs/topics/accounts/overview/guide-generate-statement.mdx b/docs/topics/accounts/overview/guide-generate-statement.mdx index a391dfe5c1..60e48706bd 100644 --- a/docs/topics/accounts/overview/guide-generate-statement.mdx +++ b/docs/topics/accounts/overview/guide-generate-statement.mdx @@ -11,14 +11,14 @@ Generate an account statement for a custom time period **using the API** or on y 1. Call the `generateAccountStatement` mutation. 1. Add the `accountId`. 1. Add the `openingDate` and `closingDate` with the following format: `YYYY-MM-DDT00:00:00.000Z` (up to three months). -1. Set the `language` for your account statement, and choose `PDF` or `CSV` if you'd like. -1. Add all information you'd like to review about the statement (lines 11-21). +1. Set the `language` for your account statement, and provide the file `format` (`PDF` or `CSV`). +1. Add all information you'd like to review about the statement (lines 11-27). ### Mutation {#mutation} -Open in API Explorer +Open in API Explorer -```graphql {4-8} showLineNumbers +```graphql {4-8,13-20,23-26} showLineNumbers mutation GenerateAccountStatement { generateAccountStatement( input: { @@ -26,50 +26,139 @@ mutation GenerateAccountStatement { openingDate: "2024-04-12T00:00:00.000Z" closingDate: "2024-06-12T00:00:00.000Z" language: nl - statementType: PDF + format: PDF } ) { closingDate createdAt - fees { + feeCredits { + currency + value + } + feeDebits { currency value } id openingDate period - status + statusInfo { + status + } updatedAt } } - ``` ### Payload {#payload} The mutation returns all of the requested information. -Notice the `period` = `Custom` (line 12), indicating that you generated this account statement, not Swan. +Notice the `period` = `Custom` (line 15), indicating that you generated this account statement, not Swan. + +The `statusInfo` > `status` is `Pending` while the statement is being generated (line 17). -```json {12} showLineNumbers +```json {15,17} showLineNumbers { "data": { "generateAccountStatement": { "closingDate": "2024-06-12T00:00:00.000Z", "createdAt": "2024-06-20T15:56:50.096Z", - "fees": { + "feeCredits": { "currency": "EUR", - "value": "0" + "value": "5.50" + }, + "feeDebits": { + "currency": "EUR", + "value": "12.00" }, "id": "$ACCOUNT_STATEMENT_ID", "openingDate": "2024-04-12T00:00:00.000Z", "period": "Custom", - "status": "Available", + "statusInfo": { + "status": "Pending" + }, "updatedAt": "2024-06-20T15:56:52.423Z" } } } ``` +### Retrieve generated statement {#retrieve} + +After generating the account statement, the `statusInfo` > `status` changes to `Generated`. +When the status is `Generated`, you can retrieve the download URL. + +1. Call the `accountStatement` query. +1. Add the account statement `id`. +1. Add `statusInfo` for all statuses. The URL to download the statement is provided in `statusInfo` > `GeneratedStatusInfo` > `url` (line 11). + +Open in API Explorer + +```graphql {2,9,11} showLineNumbers +query GetAccountStatement { + accountStatement(id: "$ACCOUNT_STATEMENT_ID") { + closingDate + createdAt + id + openingDate + period + statusInfo { + status + ... on GeneratedStatusInfo { + status + url + } + ... on PendingStatusInfo { + status + } + ... on FailedStatusInfo { + status + } + ... on VoidedStatusInfo { + status + url + } + } + updatedAt + } +} +``` + +#### Payload {#retrieve-payload} + +Use the `url` to download the statement (line 12). + +1. Copy the `url` from the payload. +1. Paste the `url` into your preferred browser. +1. The document downloads automatically after you press enter. + +```json {8,12} showLineNumbers +{ + "data": { + "accountStatement": { + "closingDate": "2024-06-12T00:00:00.000Z", + "createdAt": "2024-06-20T15:56:50.096Z", + "id": "$ACCOUNT_STATEMENT_ID", + "openingDate": "2024-04-12T00:00:00.000Z", + "period": "Custom", + "statusInfo": { + "__typename": "GeneratedStatusInfo", + "status": "Generated", + "url": "$DOWNLOAD_URL" + }, + "updatedAt": "2024-06-20T15:56:58.234Z" + } + } +} +``` + +:::caution Account statement statuses +- **`Pending`**: The statement is being generated. +- **`Generated`**: The statement is ready to download. The `url` field contains the download link. +- **`Failed`**: Statement generation failed. Generate a new statement. +- **`Voided`**: The statement has been voided. A voided statement `url` is still available for reference. +::: + ## Dashboard {#dashboard} You can also generate statements from your Dashboard. @@ -88,6 +177,6 @@ You can also generate statements from your Dashboard. ![Screenshot of Dashboard modal to generate an account statement](../../../images/topics/accounts/statement-generate-2.png) Your new statement appears on your list of account statements with the status `Pending`. -After the status changes to `Available`, you can download your statement. +After the status changes to `Generated`, you can download your statement. ![Screenshot of new account statement line with pending status](../../../images/topics/accounts/statement-generate-3.png) \ No newline at end of file From 92c0f5c36f157161da29c997609bf22ebe67ab8d Mon Sep 17 00:00:00 2001 From: Maxence Busson Date: Wed, 15 Oct 2025 22:27:54 +0200 Subject: [PATCH 2/6] Update guide-generate-statement.mdx --- .../accounts/overview/guide-generate-statement.mdx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/topics/accounts/overview/guide-generate-statement.mdx b/docs/topics/accounts/overview/guide-generate-statement.mdx index 60e48706bd..f96b3a8c25 100644 --- a/docs/topics/accounts/overview/guide-generate-statement.mdx +++ b/docs/topics/accounts/overview/guide-generate-statement.mdx @@ -2,7 +2,7 @@ title: Generate account statement --- -# Generate account statement +# Generate an account statement Generate an account statement for a custom time period **using the API** or on your **Dashboard**. @@ -10,7 +10,8 @@ Generate an account statement for a custom time period **using the API** or on y 1. Call the `generateAccountStatement` mutation. 1. Add the `accountId`. -1. Add the `openingDate` and `closingDate` with the following format: `YYYY-MM-DDT00:00:00.000Z` (up to three months). +1. Add the `openingDate` and `closingDate` using format `YYYY-MM-DDT00:00:00.000Z`. + - Maximum period: three months. 1. Set the `language` for your account statement, and provide the file `format` (`PDF` or `CSV`). 1. Add all information you'd like to review about the statement (lines 11-27). @@ -53,9 +54,9 @@ mutation GenerateAccountStatement { ### Payload {#payload} The mutation returns all of the requested information. -Notice the `period` = `Custom` (line 15), indicating that you generated this account statement, not Swan. +The `period` field shows `Custom` (line 15) for on-demand statements. Swan automatically generates statements with `period` values of `Monthly` or `Quarterly`. -The `statusInfo` > `status` is `Pending` while the statement is being generated (line 17). +The `statusInfo.status` shows `Pending` while Swan generates the statement (line 17). ```json {15,17} showLineNumbers { @@ -170,7 +171,7 @@ You can also generate statements from your Dashboard. ![Screenshot of the Dashboard Account statements tab](../../../images/topics/accounts/statement-generate-1.png) -5. Enter the start date and closing date. The time period can cover **up to three months**. +5. Enter the opening date and closing date. The time period can cover **up to three months**. 1. Choose the format and language. 1. Click **Save**. From b9ce1345b79f5245b770d56137b089082793dc6b Mon Sep 17 00:00:00 2001 From: Maxence Busson Date: Thu, 16 Oct 2025 15:03:14 +0200 Subject: [PATCH 3/6] DOC-1383/add-documentation-and-a-guide-about-updating-a-capital-deposit --- .../guide-update-shareholder-amount.mdx | 67 +++++++++++++++++++ docs/topics/capital-deposits/index.mdx | 12 ++++ .../partials/_update-shareholder-prereqs.mdx | 6 ++ sidebars.js | 3 +- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 docs/topics/capital-deposits/guide-update-shareholder-amount.mdx create mode 100644 docs/topics/capital-deposits/partials/_update-shareholder-prereqs.mdx diff --git a/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx b/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx new file mode 100644 index 0000000000..8884a3a247 --- /dev/null +++ b/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx @@ -0,0 +1,67 @@ +--- +title: Update a deposit amount +--- + +# Update a shareholder's capital deposit amount + +Use the API to update the deposit amount associated with a shareholder in a capital deposit case. + +import UpdateShareholderPrereqs from './partials/_update-shareholder-prereqs.mdx'; + +:::tip Prerequisites + +::: + +## Guide {#steps} + +1. Call the `updateCapitalDepositShareholderAmount` mutation. +1. Add the shareholder ID. +1. Add the updated amount in the `amount` field. +1. Add the success payload and any information you'd like to receive. +1. Add rejections (not shown). + +:::info Automatic recalculation +Updating a shareholder's deposit amount automatically triggers a recalculation of the total capital deposit amount for the case. +::: + +## Mutation {#mutation} + +Open in API Explorer + +```graphql {2-3} showLineNumbers +mutation UpdateShareholderAmount { + updateCapitalDepositShareholderAmount( + input: { id: "$SHAREHOLDER_ID", amount: { currency: "EUR", value: "1000" } } + ) { + ... on UpdateCapitalDepositShareholderAmountSuccessPayload { + __typename + shareholder { + id + capitalDepositAmount { + currency + value + } + } + } + } +} +``` + +## Payload {#payload} + +```graphql {6,8-10} showLineNumbers +{ + "data": { + "updateCapitalDepositShareholderAmount": { + "__typename": "UpdateCapitalDepositShareholderAmountSuccessPayload", + "shareholder": { + "id": "$SHAREHOLDER_ID", + "capitalDepositAmount": { + "currency": "EUR", + "value": "1000" + } + } + } + } +} +``` \ No newline at end of file diff --git a/docs/topics/capital-deposits/index.mdx b/docs/topics/capital-deposits/index.mdx index 01741798d7..a4a43b7e5a 100644 --- a/docs/topics/capital-deposits/index.mdx +++ b/docs/topics/capital-deposits/index.mdx @@ -269,6 +269,18 @@ participant N as Notary N -->> S: Transfers funds to Swan company account ``` +## Updating a shareholder's deposit amount {#update-amount} + +You can update a shareholder's deposit amount directly through the API. + +import UpdateShareholderPrereqs from './partials/_update-shareholder-prereqs.mdx'; + + + +Updating a shareholder's deposit amount automatically triggers a recalculation of the total capital deposit amount for the case. + +Follow the guide to [update a shareholder's capital deposit amount](./guide-update-shareholder-amount.mdx). + ## Canceling a capital deposit {#cancel} If needed, it's possible to cancel an ongoing capital deposit. diff --git a/docs/topics/capital-deposits/partials/_update-shareholder-prereqs.mdx b/docs/topics/capital-deposits/partials/_update-shareholder-prereqs.mdx new file mode 100644 index 0000000000..bdf7f61d24 --- /dev/null +++ b/docs/topics/capital-deposits/partials/_update-shareholder-prereqs.mdx @@ -0,0 +1,6 @@ +

All of the following conditions must be met:

+ +
    +
  1. The capital deposit [case status](../index.mdx#case-statuses) is `WaitingForInitialRequirements`, `PendingInternalReview`, or `WaitingForAdditionalInformation`.
  2. +
  3. The [shareholder status](../index.mdx#shareholders-statuses) is `PendingOnboarding`, `WaitingForVerification`, or `WaitingForTransfer`.
  4. +
\ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 96352600f2..0d3a459a0a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -191,6 +191,7 @@ module.exports = { link: { type: "doc", id: "topics/capital-deposits/index" }, collapsed: true, items: [ + "topics/capital-deposits/guide-update-shareholder-amount", "topics/capital-deposits/guide-cancel", ], }, @@ -788,4 +789,4 @@ module.exports = { ], }, ], -}; +}; \ No newline at end of file From adf8ca1530289222fe460324427e5a8d79719951 Mon Sep 17 00:00:00 2001 From: Maxence Busson Date: Thu, 16 Oct 2025 15:06:11 +0200 Subject: [PATCH 4/6] Revert "Update guide-generate-statement.mdx" This reverts commit 92c0f5c36f157161da29c997609bf22ebe67ab8d. --- .../accounts/overview/guide-generate-statement.mdx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/topics/accounts/overview/guide-generate-statement.mdx b/docs/topics/accounts/overview/guide-generate-statement.mdx index f96b3a8c25..60e48706bd 100644 --- a/docs/topics/accounts/overview/guide-generate-statement.mdx +++ b/docs/topics/accounts/overview/guide-generate-statement.mdx @@ -2,7 +2,7 @@ title: Generate account statement --- -# Generate an account statement +# Generate account statement Generate an account statement for a custom time period **using the API** or on your **Dashboard**. @@ -10,8 +10,7 @@ Generate an account statement for a custom time period **using the API** or on y 1. Call the `generateAccountStatement` mutation. 1. Add the `accountId`. -1. Add the `openingDate` and `closingDate` using format `YYYY-MM-DDT00:00:00.000Z`. - - Maximum period: three months. +1. Add the `openingDate` and `closingDate` with the following format: `YYYY-MM-DDT00:00:00.000Z` (up to three months). 1. Set the `language` for your account statement, and provide the file `format` (`PDF` or `CSV`). 1. Add all information you'd like to review about the statement (lines 11-27). @@ -54,9 +53,9 @@ mutation GenerateAccountStatement { ### Payload {#payload} The mutation returns all of the requested information. -The `period` field shows `Custom` (line 15) for on-demand statements. Swan automatically generates statements with `period` values of `Monthly` or `Quarterly`. +Notice the `period` = `Custom` (line 15), indicating that you generated this account statement, not Swan. -The `statusInfo.status` shows `Pending` while Swan generates the statement (line 17). +The `statusInfo` > `status` is `Pending` while the statement is being generated (line 17). ```json {15,17} showLineNumbers { @@ -171,7 +170,7 @@ You can also generate statements from your Dashboard. ![Screenshot of the Dashboard Account statements tab](../../../images/topics/accounts/statement-generate-1.png) -5. Enter the opening date and closing date. The time period can cover **up to three months**. +5. Enter the start date and closing date. The time period can cover **up to three months**. 1. Choose the format and language. 1. Click **Save**. From 75b6c13ad22244b2fc50bccdfa081685469d00e8 Mon Sep 17 00:00:00 2001 From: Maxence Busson Date: Thu, 16 Oct 2025 15:06:20 +0200 Subject: [PATCH 5/6] Revert "Update guide-generate-statement.mdx" This reverts commit 02e1de2a4073e007af9b2e67fa2d24f7eca89ef9. --- .../overview/guide-generate-statement.mdx | 117 +++--------------- 1 file changed, 14 insertions(+), 103 deletions(-) diff --git a/docs/topics/accounts/overview/guide-generate-statement.mdx b/docs/topics/accounts/overview/guide-generate-statement.mdx index 60e48706bd..a391dfe5c1 100644 --- a/docs/topics/accounts/overview/guide-generate-statement.mdx +++ b/docs/topics/accounts/overview/guide-generate-statement.mdx @@ -11,14 +11,14 @@ Generate an account statement for a custom time period **using the API** or on y 1. Call the `generateAccountStatement` mutation. 1. Add the `accountId`. 1. Add the `openingDate` and `closingDate` with the following format: `YYYY-MM-DDT00:00:00.000Z` (up to three months). -1. Set the `language` for your account statement, and provide the file `format` (`PDF` or `CSV`). -1. Add all information you'd like to review about the statement (lines 11-27). +1. Set the `language` for your account statement, and choose `PDF` or `CSV` if you'd like. +1. Add all information you'd like to review about the statement (lines 11-21). ### Mutation {#mutation} -Open in API Explorer +Open in API Explorer -```graphql {4-8,13-20,23-26} showLineNumbers +```graphql {4-8} showLineNumbers mutation GenerateAccountStatement { generateAccountStatement( input: { @@ -26,139 +26,50 @@ mutation GenerateAccountStatement { openingDate: "2024-04-12T00:00:00.000Z" closingDate: "2024-06-12T00:00:00.000Z" language: nl - format: PDF + statementType: PDF } ) { closingDate createdAt - feeCredits { - currency - value - } - feeDebits { + fees { currency value } id openingDate period - statusInfo { - status - } + status updatedAt } } + ``` ### Payload {#payload} The mutation returns all of the requested information. -Notice the `period` = `Custom` (line 15), indicating that you generated this account statement, not Swan. - -The `statusInfo` > `status` is `Pending` while the statement is being generated (line 17). +Notice the `period` = `Custom` (line 12), indicating that you generated this account statement, not Swan. -```json {15,17} showLineNumbers +```json {12} showLineNumbers { "data": { "generateAccountStatement": { "closingDate": "2024-06-12T00:00:00.000Z", "createdAt": "2024-06-20T15:56:50.096Z", - "feeCredits": { + "fees": { "currency": "EUR", - "value": "5.50" - }, - "feeDebits": { - "currency": "EUR", - "value": "12.00" + "value": "0" }, "id": "$ACCOUNT_STATEMENT_ID", "openingDate": "2024-04-12T00:00:00.000Z", "period": "Custom", - "statusInfo": { - "status": "Pending" - }, + "status": "Available", "updatedAt": "2024-06-20T15:56:52.423Z" } } } ``` -### Retrieve generated statement {#retrieve} - -After generating the account statement, the `statusInfo` > `status` changes to `Generated`. -When the status is `Generated`, you can retrieve the download URL. - -1. Call the `accountStatement` query. -1. Add the account statement `id`. -1. Add `statusInfo` for all statuses. The URL to download the statement is provided in `statusInfo` > `GeneratedStatusInfo` > `url` (line 11). - -Open in API Explorer - -```graphql {2,9,11} showLineNumbers -query GetAccountStatement { - accountStatement(id: "$ACCOUNT_STATEMENT_ID") { - closingDate - createdAt - id - openingDate - period - statusInfo { - status - ... on GeneratedStatusInfo { - status - url - } - ... on PendingStatusInfo { - status - } - ... on FailedStatusInfo { - status - } - ... on VoidedStatusInfo { - status - url - } - } - updatedAt - } -} -``` - -#### Payload {#retrieve-payload} - -Use the `url` to download the statement (line 12). - -1. Copy the `url` from the payload. -1. Paste the `url` into your preferred browser. -1. The document downloads automatically after you press enter. - -```json {8,12} showLineNumbers -{ - "data": { - "accountStatement": { - "closingDate": "2024-06-12T00:00:00.000Z", - "createdAt": "2024-06-20T15:56:50.096Z", - "id": "$ACCOUNT_STATEMENT_ID", - "openingDate": "2024-04-12T00:00:00.000Z", - "period": "Custom", - "statusInfo": { - "__typename": "GeneratedStatusInfo", - "status": "Generated", - "url": "$DOWNLOAD_URL" - }, - "updatedAt": "2024-06-20T15:56:58.234Z" - } - } -} -``` - -:::caution Account statement statuses -- **`Pending`**: The statement is being generated. -- **`Generated`**: The statement is ready to download. The `url` field contains the download link. -- **`Failed`**: Statement generation failed. Generate a new statement. -- **`Voided`**: The statement has been voided. A voided statement `url` is still available for reference. -::: - ## Dashboard {#dashboard} You can also generate statements from your Dashboard. @@ -177,6 +88,6 @@ You can also generate statements from your Dashboard. ![Screenshot of Dashboard modal to generate an account statement](../../../images/topics/accounts/statement-generate-2.png) Your new statement appears on your list of account statements with the status `Pending`. -After the status changes to `Generated`, you can download your statement. +After the status changes to `Available`, you can download your statement. ![Screenshot of new account statement line with pending status](../../../images/topics/accounts/statement-generate-3.png) \ No newline at end of file From 59c566cd16a3302a7c9f7ce3137a27c7b3431537 Mon Sep 17 00:00:00 2001 From: "Max B." <17831738+max-koro@users.noreply.github.com> Date: Mon, 20 Oct 2025 10:29:52 +0200 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: ntombing --- .../capital-deposits/guide-update-shareholder-amount.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx b/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx index 8884a3a247..e9de4da36f 100644 --- a/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx +++ b/docs/topics/capital-deposits/guide-update-shareholder-amount.mdx @@ -14,10 +14,10 @@ import UpdateShareholderPrereqs from './partials/_update-shareholder-prereqs.mdx ## Guide {#steps} -1. Call the `updateCapitalDepositShareholderAmount` mutation. -1. Add the shareholder ID. -1. Add the updated amount in the `amount` field. -1. Add the success payload and any information you'd like to receive. +1. Call the `updateCapitalDepositShareholderAmount` mutation (line 2). +1. Add the shareholder ID (line 3). +1. Add the updated amount in the `amount` field (line 3). +1. Add the `UpdateCapitalDepositShareholderAmountSuccessPayload` and any information you'd like to receive. 1. Add rejections (not shown). :::info Automatic recalculation