{
  "opencollection": "1.0.0",
  "info": {
    "name": "Accounts Account Beneficiary actions API",
    "version": "v1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Beneficiary actions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get beneficiaries",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries",
            "params": [
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "query",
                "description": "Optional. Filter beneficiaries reachable from this source account ID."
              },
              {
                "name": "sourceCurrency",
                "value": "",
                "type": "query",
                "description": "Optional. Filter beneficiaries reachable when sending from this currency (ISO 4217 code)."
              },
              {
                "name": "visible",
                "value": "",
                "type": "query",
                "description": "Filter the list of beneficiaries based on their visibility status. If set to TRUE, only visible beneficiaries are returned. If set to FALSE, only hidden beneficiaries are returned. If set to ALL, all beneficiaries, both visible and hidden, are returned. If the parameter is left empty, only visible beneficiaries are returned by default."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the list of beneficiaries registered for a client. All filter query parameters (accountId, sourceCurrency, visible) are optional: omit them to retrieve every beneficiary the client can pay; pass them to narrow the result to a specific source account or currency. By default only visible (non-hidden) beneficiaries are returned — pass visible=ALL or visible=FALSE to include or restrict to hidden ones."
        },
        {
          "info": {
            "name": "Create beneficiary",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries",
            "params": [
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a new beneficiary for the given client. The beneficiary can be either external (identified by account details such as IBAN/account number plus bank details) or internal (linked to another Toqio account). Once created the beneficiary can be used as the destination of a payment via the Create Transaction endpoint."
        },
        {
          "info": {
            "name": "Get beneficiary",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries/:beneficiaryId",
            "params": [
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              },
              {
                "name": "beneficiaryId",
                "value": "",
                "type": "path",
                "description": "beneficiaryId"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the full detail of a single beneficiary by identifier, including bank account details, address, asset type and visibility flags."
        },
        {
          "info": {
            "name": "Update beneficiary",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries/:beneficiaryId",
            "params": [
              {
                "name": "beneficiaryId",
                "value": "",
                "type": "path",
                "description": "beneficiaryId"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Updates the details of an existing beneficiary. Only profile fields (name, address, city, postal code, country and visibility) can be edited. Bank account details captured at creation (currency/asset type, bank country, IBAN, account numbers, sort/routing codes, BIC/SWIFT and the Currencycloud-specific identifiers) are immutable: they are marked read-only and any value supplied for them is ignored, the stored value is preserved. To change bank details, delete the beneficiary and create a new one"
        },
        {
          "info": {
            "name": "Delete beneficiary",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries/:beneficiaryId",
            "params": [
              {
                "name": "beneficiaryId",
                "value": "",
                "type": "path",
                "description": "beneficiaryId"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Removes a beneficiary from the client's address book. The beneficiary is logically deleted and will no longer appear in Get Beneficiaries; historical transactions that referenced it remain unaffected."
        },
        {
          "info": {
            "name": "Get or create internal beneficiary",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.sandbox.toq.io/wallet/api/customers/:customerId/clients/:clientId/beneficiaries/:accountId/internal",
            "params": [
              {
                "name": "customerId",
                "value": "",
                "type": "path",
                "description": "customerId"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "Id of the internal account for which you want to obtain the corresponding beneficiary"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://api.toq.io/iam/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the internal beneficiary pointing to the given Toqio account, creating it on the fly if one does not yet exist. Internal beneficiaries are used for transfers between two accounts that both live on Toqio (intra-platform payments) and avoid duplicating bank details across the address book."
        }
      ]
    }
  ],
  "bundled": true
}