From b2ba1af0cca23fe476c5e7794f9985415733fbb3 Mon Sep 17 00:00:00 2001 From: Aleksey Kashapov Date: Thu, 26 Jun 2025 15:32:40 +0300 Subject: [PATCH 1/2] release valitydev/swag-wallets@d85ed5c4ff85fae56a6e4003073ec2b840752a25 by nanodirijabl --- api/payres/swagger.json | 4 + api/payres/swagger.yaml | 3 + api/wallet/swagger.json | 2061 ++++++--------------------------------- api/wallet/swagger.yaml | 1378 +++----------------------- 4 files changed, 458 insertions(+), 2988 deletions(-) diff --git a/api/payres/swagger.json b/api/payres/swagger.json index b433914a..e6b74c13 100644 --- a/api/payres/swagger.json +++ b/api/payres/swagger.json @@ -9,6 +9,10 @@ "name": "Support Team", "email": "support@vality.dev", "url": "https://vality.dev/" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "api.vality.dev", diff --git a/api/payres/swagger.yaml b/api/payres/swagger.yaml index 3f7c7010..afedea1d 100644 --- a/api/payres/swagger.yaml +++ b/api/payres/swagger.yaml @@ -10,6 +10,9 @@ info: name: Support Team email: support@vality.dev url: 'https://vality.dev/' + license: + name: Apache 2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' host: api.vality.dev basePath: /payres/v0 schemes: diff --git a/api/wallet/swagger.json b/api/wallet/swagger.json index d7773bc6..e9ebe0f5 100644 --- a/api/wallet/swagger.json +++ b/api/wallet/swagger.json @@ -9,6 +9,10 @@ "name": "Technical support team", "email": "support@vality.dev", "url": "https://api.vality.dev" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "api.vality.dev", @@ -65,24 +69,6 @@ "maxLength": 32, "minLength": 1 }, - "providerID": { - "name": "providerID", - "in": "path", - "description": "Identifier of the provider", - "required": true, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, - "identityID": { - "name": "identityID", - "in": "path", - "description": "Identifier of the owner's identity", - "required": true, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, "walletID": { "name": "walletID", "in": "path", @@ -225,24 +211,6 @@ "maxLength": 40, "minLength": 1 }, - "queryIdentityID": { - "name": "identityID", - "in": "query", - "description": "Identifier of the owner's identity", - "required": true, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, - "w2wTransferID": { - "name": "w2wTransferID", - "in": "path", - "description": "Identifier of transfer", - "required": true, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, "partyID": { "name": "partyID", "description": "The participant's unique identifier within the system.", @@ -254,16 +222,6 @@ } }, "tags": [ - { - "name": "Providers", - "x-displayName": "Service providers", - "description": "" - }, - { - "name": "Identities", - "x-displayName": "Identities", - "description": "" - }, { "name": "Wallets", "x-displayName": "Wallets", @@ -299,11 +257,6 @@ "x-displayName": "File upload", "description": "" }, - { - "name": "W2W", - "x-displayName": "Transfers within the system", - "description": "Transfers of funds between wallets within the system" - }, { "name": "Webhooks", "x-displayName": "Webhooks", @@ -358,10 +311,10 @@ } } }, - "/deposit-adjustments": { + "/deposits": { "get": { - "operationId": "listDepositAdjustments", - "summary": "Finding adjustments", + "operationId": "listDeposits", + "summary": "Search for deposits", "tags": [ "Deposits" ], @@ -378,16 +331,7 @@ { "name": "walletID", "in": "query", - "description": "Wallet identifier", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false - }, - { - "name": "identityID", - "in": "query", - "description": "Identifier of the owner's identity", + "description": "Identifier of the wallet", "type": "string", "maxLength": 40, "minLength": 1, @@ -396,7 +340,7 @@ { "name": "depositID", "in": "query", - "description": "Identifier of the input of funds", + "description": "Identifier of the deposit", "type": "string", "required": false, "maxLength": 50, @@ -405,7 +349,7 @@ { "name": "sourceID", "in": "query", - "description": "Identifier of the fund source", + "description": "Identifier of the funds source", "type": "string", "maxLength": 40, "minLength": 1, @@ -469,10 +413,10 @@ "type": "string" }, "result": { - "description": "Found adjustments", + "description": "Found deposits", "type": "array", "items": { - "$ref": "#/definitions/DepositAdjustment" + "$ref": "#/definitions/Deposit" } } } @@ -487,12 +431,12 @@ } } }, - "/deposit-reverts": { + "/destinations": { "get": { - "operationId": "listDepositReverts", - "summary": "Search for reverts", + "operationId": "listDestinations", + "summary": "List of destinations", "tags": [ - "Deposits" + "Withdrawals" ], "parameters": [ { @@ -504,75 +448,6 @@ { "$ref": "#/parameters/partyID" }, - { - "name": "walletID", - "in": "query", - "description": "Identifier of the wallet", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false - }, - { - "name": "identityID", - "in": "query", - "description": "Identifier of the owner's identity", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false - }, - { - "name": "depositID", - "in": "query", - "description": "Identifier of the input of funds", - "type": "string", - "required": false, - "maxLength": 50, - "minLength": 1 - }, - { - "name": "sourceID", - "in": "query", - "description": "Identifier of the source of funds", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false - }, - { - "name": "status", - "in": "query", - "type": "string", - "enum": [ - "Pending", - "Succeeded", - "Failed" - ], - "required": false - }, - { - "name": "createdAtFrom", - "in": "query", - "description": "Creation date from", - "type": "string", - "format": "date-time", - "required": false - }, - { - "name": "createdAtTo", - "in": "query", - "description": "Creation date to", - "type": "string", - "format": "date-time", - "required": false - }, - { - "$ref": "#/parameters/amountFrom" - }, - { - "$ref": "#/parameters/amountTo" - }, { "$ref": "#/parameters/currencyID" }, @@ -598,10 +473,10 @@ "type": "string" }, "result": { - "description": "Found reverts", + "description": "Destinations found", "type": "array", "items": { - "$ref": "#/definitions/DepositRevert" + "$ref": "#/definitions/Destination" } } } @@ -614,14 +489,12 @@ "$ref": "#/responses/Unauthorized" } } - } - }, - "/deposits": { - "get": { - "operationId": "listDeposits", - "summary": "Search for deposits", + }, + "post": { + "operationId": "createDestination", + "summary": "Start a destination creation", "tags": [ - "Deposits" + "Withdrawals" ], "parameters": [ { @@ -631,356 +504,97 @@ "$ref": "#/parameters/deadline" }, { - "$ref": "#/parameters/partyID" + "name": "destination", + "description": "Destination data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Destination" + } + } + ], + "responses": { + "201": { + "description": "Destination created", + "headers": { + "Location": { + "description": "The URI of the created destination", + "type": "string", + "format": "uri" + } + }, + "schema": { + "$ref": "#/definitions/Destination" + } }, - { - "name": "walletID", - "in": "query", - "description": "Identifier of the wallet", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" }, + "409": { + "$ref": "#/responses/ConflictRequest" + }, + "422": { + "description": "Incorrect destination data", + "schema": { + "$ref": "#/definitions/InvalidOperationParameters" + } + } + } + } + }, + "/destinations/{destinationID}": { + "get": { + "operationId": "getDestination", + "summary": "Get a specific destination", + "tags": [ + "Withdrawals" + ], + "parameters": [ { - "name": "identityID", - "in": "query", - "description": "Identifier of the owner's identity", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false + "$ref": "#/parameters/requestID" }, { - "name": "depositID", - "in": "query", - "description": "Identifier of the deposit", - "type": "string", - "required": false, - "maxLength": 50, - "minLength": 1 + "$ref": "#/parameters/deadline" }, { - "name": "sourceID", - "in": "query", - "description": "Identifier of the funds source", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false + "$ref": "#/parameters/destinationID" + } + ], + "responses": { + "200": { + "description": "Destination found", + "schema": { + "$ref": "#/definitions/Destination" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" }, + "404": { + "$ref": "#/responses/NotFound" + } + } + } + }, + "/external-ids/destinations/{externalID}": { + "get": { + "operationId": "getDestinationByExternalID", + "summary": "Get a destination by external identifier", + "tags": [ + "Withdrawals" + ], + "parameters": [ { - "name": "status", - "in": "query", - "type": "string", - "enum": [ - "Pending", - "Succeeded", - "Failed" - ], - "required": false + "$ref": "#/parameters/requestID" }, { - "name": "createdAtFrom", - "in": "query", - "description": "Creation date from", - "type": "string", - "format": "date-time", - "required": false - }, - { - "name": "createdAtTo", - "in": "query", - "description": "Creation date to", - "type": "string", - "format": "date-time", - "required": false - }, - { - "name": "revertStatus", - "in": "query", - "type": "string", - "enum": [ - "None", - "Partial", - "Full" - ], - "required": false - }, - { - "$ref": "#/parameters/amountFrom" - }, - { - "$ref": "#/parameters/amountTo" - }, - { - "$ref": "#/parameters/currencyID" - }, - { - "$ref": "#/parameters/limit" - }, - { - "name": "continuationToken", - "in": "query", - "required": false, - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - } - ], - "responses": { - "200": { - "description": "Search results", - "schema": { - "type": "object", - "properties": { - "continuationToken": { - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - }, - "result": { - "description": "Found deposits", - "type": "array", - "items": { - "$ref": "#/definitions/Deposit" - } - } - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - } - }, - "/destinations": { - "get": { - "operationId": "listDestinations", - "summary": "List of destinations", - "tags": [ - "Withdrawals" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/partyID" - }, - { - "name": "identityID", - "description": "Identifier of the owner's idenity", - "in": "query", - "required": false, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, - { - "$ref": "#/parameters/currencyID" - }, - { - "$ref": "#/parameters/limit" - }, - { - "name": "continuationToken", - "in": "query", - "required": false, - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - } - ], - "responses": { - "200": { - "description": "Search result", - "schema": { - "type": "object", - "properties": { - "continuationToken": { - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - }, - "result": { - "description": "Destinations found", - "type": "array", - "items": { - "$ref": "#/definitions/Destination" - } - } - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - }, - "post": { - "operationId": "createDestination", - "summary": "Start a destination creation", - "tags": [ - "Withdrawals" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "name": "destination", - "description": "Destination data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Destination" - } - } - ], - "responses": { - "201": { - "description": "Destination created", - "headers": { - "Location": { - "description": "The URI of the created destination", - "type": "string", - "format": "uri" - } - }, - "schema": { - "$ref": "#/definitions/Destination" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "409": { - "$ref": "#/responses/ConflictRequest" - }, - "422": { - "description": "Incorrect destination data", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } - } - } - } - }, - "/destinations/{destinationID}": { - "get": { - "operationId": "getDestination", - "summary": "Get a specific destination", - "tags": [ - "Withdrawals" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/destinationID" - } - ], - "responses": { - "200": { - "description": "Destination found", - "schema": { - "$ref": "#/definitions/Destination" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, - "/destinations/{destinationID}/grants": { - "post": { - "operationId": "issueDestinationGrant", - "summary": "Grant the right to manage the destinations", - "tags": [ - "Withdrawals" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/destinationID" - }, - { - "name": "request", - "description": "Request for the right to manage the destinations", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DestinationGrantRequest" - } - } - ], - "responses": { - "201": { - "description": "The right is granted", - "schema": { - "$ref": "#/definitions/DestinationGrantRequest" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "422": { - "description": "Invalid data for issuance", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } - } - } - } - }, - "/external-ids/destinations/{externalID}": { - "get": { - "operationId": "getDestinationByExternalID", - "summary": "Get a destination by external identifier", - "tags": [ - "Withdrawals" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" + "$ref": "#/parameters/deadline" }, { "$ref": "#/parameters/externalID" @@ -1023,202 +637,11 @@ "$ref": "#/parameters/externalID" } ], - "responses": { - "200": { - "description": "Withdrawal found", - "schema": { - "$ref": "#/definitions/Withdrawal" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, - "/external/wallets": { - "get": { - "summary": "Get wallet by specified external identifier", - "operationId": "getWalletByExternalID", - "tags": [ - "Wallets" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "name": "externalID", - "description": "External wallet identifier", - "in": "query", - "required": true, - "type": "string", - "maxLength": 40, - "minLength": 1 - } - ], - "responses": { - "200": { - "description": "Wallet details", - "schema": { - "$ref": "#/definitions/Wallet" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, - "/files/{fileID}/download": { - "post": { - "description": "Get a link to download a file", - "tags": [ - "Downloads" - ], - "operationId": "downloadFile", - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/fileID" - } - ], - "responses": { - "201": { - "description": "Data to get file", - "schema": { - "$ref": "#/definitions/FileDownload" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, - "/identities": { - "get": { - "operationId": "listIdentities", - "summary": "List the identities of the owners", - "tags": [ - "Identities" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/partyID" - }, - { - "name": "providerID", - "description": "Service provider's identifier", - "in": "query", - "required": false, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, - { - "name": "continuationToken", - "in": "query", - "required": false, - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - } - ], - "responses": { - "200": { - "description": "Search result", - "schema": { - "type": "object", - "properties": { - "continuationToken": { - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - }, - "result": { - "description": "Identities found", - "type": "array", - "items": { - "$ref": "#/definitions/Identity" - } - } - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - }, - "post": { - "operationId": "createIdentity", - "summary": "Create owner identity", - "tags": [ - "Identities" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "name": "identity", - "description": "Data of the identity created", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Identity" - } - } - ], - "responses": { - "201": { - "description": "Owner identity created", - "headers": { - "Location": { - "description": "Created identity URI", - "type": "string", - "format": "uri" - } - }, + "responses": { + "200": { + "description": "Withdrawal found", "schema": { - "$ref": "#/definitions/Identity" + "$ref": "#/definitions/Withdrawal" } }, "400": { @@ -1227,25 +650,19 @@ "401": { "$ref": "#/responses/Unauthorized" }, - "409": { - "$ref": "#/responses/ConflictRequest" - }, - "422": { - "description": "Invalid owner identity data", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } + "404": { + "$ref": "#/responses/NotFound" } } } }, - "/identities/{identityID}": { - "get": { - "operationId": "getIdentity", - "summary": "Get the owner's identity", + "/files/{fileID}/download": { + "post": { + "description": "Get a link to download a file", "tags": [ - "Identities" + "Downloads" ], + "operationId": "downloadFile", "parameters": [ { "$ref": "#/parameters/requestID" @@ -1254,14 +671,14 @@ "$ref": "#/parameters/deadline" }, { - "$ref": "#/parameters/identityID" + "$ref": "#/parameters/fileID" } ], "responses": { - "200": { - "description": "Owner's identity found", + "201": { + "description": "Data to get file", "schema": { - "$ref": "#/definitions/Identity" + "$ref": "#/definitions/FileDownload" } }, "400": { @@ -1276,7 +693,7 @@ } } }, - "/identities/{identityID}/reports": { + "/reports": { "post": { "description": "Generate a report with the specified type on the identity of the owner for the specified period of time", "tags": [ @@ -1293,9 +710,6 @@ { "$ref": "#/parameters/partyID" }, - { - "$ref": "#/parameters/identityID" - }, { "name": "ReportParams", "in": "body", @@ -1337,9 +751,6 @@ { "$ref": "#/parameters/partyID" }, - { - "$ref": "#/parameters/identityID" - }, { "$ref": "#/parameters/fromTime" }, @@ -1376,7 +787,7 @@ } } }, - "/identities/{identityID}/reports/{reportID}": { + "/reports/{reportID}": { "get": { "description": "Get a report for a given identifier", "tags": [ @@ -1393,9 +804,6 @@ { "$ref": "#/parameters/partyID" }, - { - "$ref": "#/parameters/identityID" - }, { "$ref": "#/parameters/reportID" } @@ -1419,122 +827,6 @@ } } }, - "/identities/{identityID}/withdrawal-methods": { - "get": { - "summary": "Get withdrawal methods available by owner identity", - "tags": [ - "Identities" - ], - "operationId": "getWithdrawalMethods", - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/identityID" - } - ], - "responses": { - "200": { - "description": "Methods found", - "schema": { - "type": "object", - "properties": { - "methods": { - "type": "array", - "items": { - "$ref": "#/definitions/WithdrawalMethod" - } - } - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - } - }, - "/providers": { - "get": { - "operationId": "listProviders", - "summary": "List available providers", - "tags": [ - "Providers" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/residence" - } - ], - "responses": { - "200": { - "description": "Providers found", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Provider" - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - } - }, - "/providers/{providerID}": { - "get": { - "operationId": "getProvider", - "summary": "Get provider details", - "tags": [ - "Providers" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/providerID" - } - ], - "responses": { - "200": { - "description": "Provider found", - "schema": { - "$ref": "#/definitions/Provider" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, "/residences/{residence}": { "get": { "operationId": "getResidence", @@ -1577,98 +869,6 @@ } } }, - "/w2w/transfers": { - "post": { - "description": "Create a transfer", - "tags": [ - "W2W" - ], - "operationId": "createW2WTransfer", - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "name": "transferParams", - "in": "body", - "description": "Transfer creation options", - "schema": { - "$ref": "#/definitions/W2WTransferParameters" - } - } - ], - "responses": { - "202": { - "description": "Transfer started", - "headers": { - "Location": { - "description": "URI of the transfer started", - "type": "string", - "format": "uri" - } - }, - "schema": { - "$ref": "#/definitions/W2WTransfer" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "409": { - "$ref": "#/responses/ConflictRequest" - }, - "422": { - "description": "Invalid transfer input data", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } - } - } - } - }, - "/w2w/transfers/{w2wTransferID}": { - "get": { - "description": "Get the transfer status.", - "tags": [ - "W2W" - ], - "operationId": "getW2WTransfer", - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "$ref": "#/parameters/w2wTransferID" - } - ], - "responses": { - "200": { - "description": "Transfer found", - "schema": { - "$ref": "#/definitions/W2WTransfer" - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "404": { - "$ref": "#/responses/NotFound" - } - } - } - }, "/wallets": { "get": { "operationId": "listWallets", @@ -1686,15 +886,6 @@ { "$ref": "#/parameters/partyID" }, - { - "name": "identityID", - "description": "Identifier of owner's identity", - "in": "query", - "required": false, - "type": "string", - "maxLength": 40, - "minLength": 1 - }, { "$ref": "#/parameters/currencyID" }, @@ -1715,63 +906,18 @@ "schema": { "type": "object", "properties": { - "continuationToken": { - "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", - "type": "string" - }, - "result": { - "description": "Wallets found", - "type": "array", - "items": { - "$ref": "#/definitions/Wallet" - } - } - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "401": { - "$ref": "#/responses/Unauthorized" - } - } - }, - "post": { - "operationId": "createWallet", - "summary": "Create a new wallet", - "tags": [ - "Wallets" - ], - "parameters": [ - { - "$ref": "#/parameters/requestID" - }, - { - "$ref": "#/parameters/deadline" - }, - { - "name": "wallet", - "description": "Data of the created wallet", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Wallet" - } - } - ], - "responses": { - "201": { - "description": "Wallet created", - "headers": { - "Location": { - "description": "URI of the wallet created", - "type": "string", - "format": "uri" + "continuationToken": { + "description": "A token signalling that only part of the data has been transmitted in the response.\nTo retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token.\nIf there is no token, the last piece of data is received.\n", + "type": "string" + }, + "result": { + "description": "Wallets found", + "type": "array", + "items": { + "$ref": "#/definitions/Wallet" + } + } } - }, - "schema": { - "$ref": "#/definitions/Wallet" } }, "400": { @@ -1779,15 +925,6 @@ }, "401": { "$ref": "#/responses/Unauthorized" - }, - "409": { - "$ref": "#/responses/ConflictRequest" - }, - "422": { - "description": "Invalid data of the wallet", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } } } } @@ -1806,6 +943,9 @@ { "$ref": "#/parameters/deadline" }, + { + "$ref": "#/parameters/partyID" + }, { "$ref": "#/parameters/walletID" } @@ -1843,6 +983,9 @@ { "$ref": "#/parameters/deadline" }, + { + "$ref": "#/parameters/partyID" + }, { "$ref": "#/parameters/walletID" } @@ -1866,13 +1009,13 @@ } } }, - "/wallets/{walletID}/grants": { - "post": { - "operationId": "issueWalletGrant", - "summary": "Grant the right to manage funds", + "/wallets/{walletID}/withdrawal-methods": { + "get": { + "summary": "Get withdrawal methods available for wallet", "tags": [ "Wallets" ], + "operationId": "getWithdrawalMethods", "parameters": [ { "$ref": "#/parameters/requestID" @@ -1881,23 +1024,25 @@ "$ref": "#/parameters/deadline" }, { - "$ref": "#/parameters/walletID" + "$ref": "#/parameters/partyID" }, { - "name": "request", - "description": "Request for the right to manage funds on the wallet", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WalletGrantRequest" - } + "$ref": "#/parameters/walletID" } ], "responses": { - "201": { - "description": "Single right granted", + "200": { + "description": "Methods found", "schema": { - "$ref": "#/definitions/WalletGrantRequest" + "type": "object", + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "#/definitions/WithdrawalMethod" + } + } + } } }, "400": { @@ -1908,12 +1053,6 @@ }, "404": { "$ref": "#/responses/NotFound" - }, - "422": { - "description": "Invalid data for issuance", - "schema": { - "$ref": "#/definitions/InvalidOperationParameters" - } } } } @@ -1977,7 +1116,7 @@ "$ref": "#/parameters/deadline" }, { - "$ref": "#/parameters/queryIdentityID" + "$ref": "#/parameters/partyID" } ], "responses": { @@ -2023,7 +1162,7 @@ "$ref": "#/parameters/webhookID" }, { - "$ref": "#/parameters/queryIdentityID" + "$ref": "#/parameters/partyID" } ], "responses": { @@ -2067,7 +1206,7 @@ "$ref": "#/parameters/webhookID" }, { - "$ref": "#/parameters/queryIdentityID" + "$ref": "#/parameters/partyID" } ], "responses": { @@ -2168,15 +1307,6 @@ "minLength": 1, "required": false }, - { - "name": "identityID", - "in": "query", - "description": "Identifier of the owner's identity", - "type": "string", - "maxLength": 40, - "minLength": 1, - "required": false - }, { "name": "withdrawalID", "in": "query", @@ -2716,236 +1846,41 @@ "description": "Currency unit sign\n", "type": "string", "example": "$" - }, - "exponent": { - "description": "The number of acceptable decimal places in the amount of funds, \nin which the number of minor monetary units can be indicated\n", - "type": "integer", - "minimum": 0, - "example": 2 - } - } - }, - "CurrencyID": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - }, - "Deposit": { - "description": "Deposit data", - "allOf": [ - { - "type": "object", - "required": [ - "wallet", - "source", - "body", - "id" - ], - "properties": { - "id": { - "description": "Deposit identifier", - "type": "string", - "example": "tZ0jUmlsV0", - "readOnly": true - }, - "createdAt": { - "description": "Deposit start date and time", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "wallet": { - "description": "Identifier of the wallet", - "type": "string", - "example": "10068321" - }, - "source": { - "description": "Funds source identifier", - "type": "string", - "example": "107498" - }, - "body": { - "description": "The amount of funds received", - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "The amount of money in minor units, for example, in cents\n", - "type": "integer", - "format": "int64", - "example": 1430000 - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - } - } - }, - "fee": { - "description": "Fee amount", - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "The amount of money in minor units, for example, in cents\n", - "type": "integer", - "format": "int64", - "example": 1430000 - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - } - } - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - }, - "desc": { - "description": "Deposit information", - "type": "string" - } - } - }, - { - "$ref": "#/definitions/DepositStatus" - } - ] - }, - "DepositAdjustment": { - "description": "Deposit adjustment data", - "allOf": [ - { - "type": "object", - "properties": { - "id": { - "description": "Deposit adjustment identifier", - "type": "string", - "example": "tZ0jUmlsV0", - "readOnly": true - }, - "createdAt": { - "description": "Date and time the adjustment was started", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - } - } - }, - { - "$ref": "#/definitions/DepositAdjustmentStatus" - } - ] - }, - "DepositAdjustmentFailure": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Adjustment error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" - } - } - }, - "DepositAdjustmentID": { - "description": "Deposit adjustment identifier", - "type": "string", - "example": "tZ0jUmlsV0" - }, - "DepositAdjustmentStatus": { - "type": "object", - "properties": { - "status": { - "description": "Deposit adjustment status.\n\n| Meaning | Explanation |\n| ----------- | ------------------------------------------------------- |\n| `Pending` | Adjustment in progress |\n| `Succeeded` | Adjustment completed successfully |\n| `Failed` | Adjustment failed |\n", - "type": "string", - "enum": [ - "Pending", - "Succeeded", - "Failed" - ], - "readOnly": true - }, - "failure": { - "description": "> If `status` == `Failed`\n\nExplanation of the reason for failure\n", - "readOnly": true, - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Adjustment error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" - } - } - } - } - }, - "DepositFailure": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Deposit error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" + }, + "exponent": { + "description": "The number of acceptable decimal places in the amount of funds, \nin which the number of minor monetary units can be indicated\n", + "type": "integer", + "minimum": 0, + "example": 2 } } }, - "DepositID": { - "description": "Deposit identifier", + "CurrencyID": { + "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", "type": "string", - "example": "tZ0jUmlsV0" + "pattern": "^[A-Z]{3}$", + "example": "USD" }, - "DepositRevert": { - "description": "Deposit revert data", + "Deposit": { + "description": "Deposit data", "allOf": [ { "type": "object", "required": [ "wallet", "source", - "body" + "body", + "id" ], "properties": { "id": { - "description": "Deposit revert identifier", + "description": "Deposit identifier", "type": "string", - "example": "10068321", + "example": "tZ0jUmlsV0", "readOnly": true }, "createdAt": { - "description": "Date and time of revert start", + "description": "Deposit start date and time", "type": "string", "format": "date-time", "readOnly": true @@ -2961,7 +1896,7 @@ "example": "107498" }, "body": { - "description": "Amount of funds", + "description": "The amount of funds received", "type": "object", "required": [ "amount", @@ -2982,29 +1917,52 @@ } } }, - "reason": { - "type": "string" + "fee": { + "description": "Fee amount", + "type": "object", + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "The amount of money in minor units, for example, in cents\n", + "type": "integer", + "format": "int64", + "example": 1430000 + }, + "currency": { + "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", + "type": "string", + "pattern": "^[A-Z]{3}$", + "example": "USD" + } + } }, "externalID": { "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", "type": "string", "example": "10036274" + }, + "desc": { + "description": "Deposit information", + "type": "string" } } }, { - "$ref": "#/definitions/DepositRevertStatus" + "$ref": "#/definitions/DepositStatus" } ] }, - "DepositRevertFailure": { + "DepositFailure": { "type": "object", "required": [ "code" ], "properties": { "code": { - "description": "Deposit revert error code", + "description": "Deposit error code", "type": "string" }, "subError": { @@ -3012,16 +1970,16 @@ } } }, - "DepositRevertID": { - "description": "Deposit revert identifier", + "DepositID": { + "description": "Deposit identifier", "type": "string", - "example": "10068321" + "example": "tZ0jUmlsV0" }, - "DepositRevertStatus": { + "DepositStatus": { "type": "object", "properties": { "status": { - "description": "Deposit revert status.\n\n| Meaning | Explanation |\n| ----------- | ------------------------------------------------------- |\n| `Pending` | Deposit revert in progress |\n| `Succeeded` | Deposit revert completed successfully |\n| `Failed` | Deposit revert failed |\n", + "description": "Status of deposit.\n\n| Meaning | Explanation |\n| ----------- | ------------------------------------------------ |\n| `Pending` | Deposit in progress |\n| `Succeeded` | Deposit of funds made successfully |\n| `Failed` | Deposit of funds ended in failure |\n", "type": "string", "enum": [ "Pending", @@ -3039,7 +1997,7 @@ ], "properties": { "code": { - "description": "Deposit revert error code", + "description": "Deposit error code", "type": "string" }, "subError": { @@ -3049,108 +2007,79 @@ } } }, - "DepositStatus": { + "Destination": { + "description": "Destination data", "type": "object", + "required": [ + "name", + "party", + "currency", + "resource", + "realm" + ], "properties": { - "status": { - "description": "Status of deposit.\n\n| Meaning | Explanation |\n| ----------- | ------------------------------------------------ |\n| `Pending` | Deposit in progress |\n| `Succeeded` | Deposit of funds made successfully |\n| `Failed` | Deposit of funds ended in failure |\n", + "id": { + "description": "Destination identifier", + "type": "string", + "example": "107498", + "readOnly": true + }, + "name": { + "description": "A human-readable name for the destination by which it is easily recognizable\n", + "type": "string", + "example": "Squarey plastic thingy" + }, + "realm": { + "description": "Realm of destination.\n", "type": "string", "enum": [ - "Pending", - "Succeeded", - "Failed" - ], + "Live", + "Test" + ] + }, + "createdAt": { + "description": "Date and time of creation of the destination of the funds", + "type": "string", + "format": "date-time", "readOnly": true }, - "failure": { - "description": "> If `status` == `Failed`\n\nExplanation of the reason for failure\n", + "isBlocked": { + "description": "Is the destination blocked?", + "type": "boolean", "readOnly": true, + "example": false + }, + "party": { + "description": "The participant's unique identifier within the system.", + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "currency": { + "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", + "type": "string", + "pattern": "^[A-Z]{3}$", + "example": "USD" + }, + "resource": { + "$ref": "#/definitions/DestinationResource" + }, + "additionalAuthData": { + "$ref": "#/definitions/DestinationAuthData" + }, + "metadata": { + "description": "Some non-transparent for system set of data associated with this destination\n", "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Deposit error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" - } - } - } - } - }, - "Destination": { - "description": "Destination data", - "allOf": [ - { - "type": "object", - "required": [ - "name", - "identity", - "currency", - "resource" - ], - "properties": { - "id": { - "description": "Destination identifier", - "type": "string", - "example": "107498", - "readOnly": true - }, - "name": { - "description": "A human-readable name for the destination by which it is easily recognizable\n", - "type": "string", - "example": "Squarey plastic thingy" - }, - "createdAt": { - "description": "Date and time of creation of the destination of the funds", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "isBlocked": { - "description": "Is the destination blocked?", - "type": "boolean", - "readOnly": true, - "example": false - }, - "identity": { - "description": "Identifier of wallet owner", - "type": "string", - "example": "10036274" - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - }, - "resource": { - "$ref": "#/definitions/DestinationResource" - }, - "additionalAuthData": { - "$ref": "#/definitions/DestinationAuthData" - }, - "metadata": { - "description": "Some non-transparent for system set of data associated with this destination\n", - "type": "object", - "example": { - "color_hint": "olive-green" - } - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - } + "example": { + "color_hint": "olive-green" } }, - { - "$ref": "#/definitions/DestinationStatus" + "externalID": { + "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", + "type": "string", + "example": "10036274" } - ] + } }, "DestinationAuthData": { "description": "Destination auth data to make withdrawals", @@ -3169,28 +2098,6 @@ } } }, - "DestinationGrantRequest": { - "description": "Request for the permission to control the withdrawals to the destination", - "type": "object", - "required": [ - "validUntil" - ], - "properties": { - "token": { - "description": "Token granting the permission to control the withdrawals", - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "readOnly": true - }, - "validUntil": { - "description": "The date and time by which the granted right is valid\n", - "type": "string", - "format": "date-time" - } - } - }, "DestinationID": { "description": "Destination identifier", "type": "string", @@ -3215,27 +2122,6 @@ } } }, - "DestinationStatus": { - "type": "object", - "properties": { - "status": { - "description": "The status of the destination.\n\n| Meaning | Explanation |\n| -------------- | --------------------------------------------- |\n| `Unauthorized` | Not authorized by the owner to withdraw funds |\n| `Authorized` | Authorized by the owner to withdraw funds |\n", - "type": "string", - "enum": [ - "Unauthorized", - "Authorized" - ], - "readOnly": true, - "example": "Authorized" - }, - "validUntil": { - "description": "> If `status` == `Authorized`\n\nDate and time until which authorization is valid\n", - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, "DestinationsTopic": { "description": "A coverage area that includes events by asset destinations within a particular wallet\n", "allOf": [ @@ -3350,81 +2236,20 @@ "expiresAt": { "description": "The date and time by which the link will be valid", "type": "string", - "format": "date-time" - } - } - }, - "GenericProvider": { - "description": "Withdrawal service provider.\n\nThe set of providers available for making withdrawals can be found by calling\ncorresponding [operation](#operation/getWithdrawalMethods).\n", - "type": "string", - "example": "YourBankName" - }, - "GrantToken": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n" - }, - "Identity": { - "description": "Data of the wallet owner", - "type": "object", - "required": [ - "name", - "provider" - ], - "properties": { - "id": { - "description": "Identifier of wallet owner", - "type": "string", - "example": "10036274", - "readOnly": true - }, - "name": { - "description": "Human-readable name of the owner's identity, by which he can be easily identified\n", - "type": "string", - "example": "Keyn Fawkes" - }, - "createdAt": { - "description": "Date and time the owner identity was created", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "provider": { - "description": "Identifier of the service provider", - "type": "string", - "example": "serviceprovider" - }, - "isBlocked": { - "description": "Is the owner's identity blocked?", - "type": "boolean", - "readOnly": true, - "example": false - }, - "metadata": { - "description": "Some non-transparent for system set of data associated with this identity\n", - "type": "object", - "example": { - "lkDisplayName": "James Smith" - } - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - }, - "partyID": { - "description": "The participant's unique identifier within the system.", - "type": "string", - "minLength": 1, - "maxLength": 40 + "format": "date-time" } } }, - "IdentityID": { - "description": "Identifier of wallet owner", + "GenericProvider": { + "description": "Withdrawal service provider.\n\nThe set of providers available for making withdrawals can be found by calling\ncorresponding [operation](#operation/getWithdrawalMethods).\n", "type": "string", - "example": "10036274" + "example": "YourBankName" + }, + "GrantToken": { + "type": "string", + "minLength": 1, + "maxLength": 4000, + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n" }, "BadRequest": { "type": "object", @@ -3519,49 +2344,13 @@ "minLength": 1, "maxLength": 40 }, - "Provider": { - "description": "Service provider data", - "type": "object", - "required": [ - "id", - "name", - "residences" - ], - "properties": { - "id": { - "description": "Identifier of the service provider", - "type": "string", - "example": "serviceprovider" - }, - "name": { - "description": "Human-readable name of the service provider\n", - "type": "string", - "example": "SERVICE PROVIDER LLC" - }, - "residences": { - "type": "array", - "description": "Residences in which the provider can service\n", - "items": { - "description": "Residence symbol code by standard [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "RUS" - } - } - } - }, - "ProviderID": { - "description": "Identifier of the service provider", - "type": "string", - "example": "serviceprovider" - }, "QuoteParameters": { "description": "Quote request parameters", "type": "object", "required": [ "sender", "receiver", - "identityID", + "partyID", "body" ], "properties": { @@ -3571,10 +2360,11 @@ "receiver": { "$ref": "#/definitions/ReceiverResource" }, - "identityID": { - "description": "Identifier of wallet owner", + "partyID": { + "description": "The participant's unique identifier within the system.", "type": "string", - "example": "10036274" + "minLength": 1, + "maxLength": 40 }, "body": { "description": "Transaction amount", @@ -3943,174 +2733,12 @@ } } }, - "W2WTransfer": { - "description": "Transfer data", - "type": "object", - "required": [ - "id", - "createdAt", - "body", - "sender", - "receiver", - "status" - ], - "properties": { - "id": { - "description": "Transfer identifier", - "type": "string", - "example": "10a0b68D3E21", - "maxLength": 40, - "minLength": 1 - }, - "createdAt": { - "description": "Date and time of creation", - "type": "string", - "format": "date-time" - }, - "body": { - "description": "Transaction amount", - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "The amount of money in minor units, for example, in cents\n", - "type": "integer", - "format": "int64", - "example": 1430000 - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - } - } - }, - "sender": { - "$ref": "#/definitions/WalletID" - }, - "receiver": { - "$ref": "#/definitions/WalletID" - }, - "status": { - "$ref": "#/definitions/W2WTransferStatus" - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - } - } - }, - "W2WTransferFailure": { - "description": "[Error occurred during the transfer process](#tag/Error-Codes)\n", - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Main error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" - } - } - }, - "W2WTransferID": { - "description": "Transfer identifier", - "type": "string", - "example": "10a0b68D3E21", - "maxLength": 40, - "minLength": 1 - }, - "W2WTransferParameters": { - "description": "Transfer creation options", - "type": "object", - "required": [ - "sender", - "receiver", - "body" - ], - "properties": { - "sender": { - "$ref": "#/definitions/WalletID" - }, - "receiver": { - "$ref": "#/definitions/WalletID" - }, - "body": { - "description": "Transfer amount", - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "The amount of money in minor units, for example, in cents\n", - "type": "integer", - "format": "int64", - "example": 1430000 - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - } - } - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" - } - } - }, - "W2WTransferStatus": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "description": "The status of the money transfer.\n\n| Meaning | Explanation |\n| ----------- | ------------------------------------ |\n| `Pending` | Transfer in progress |\n| `Succeeded` | Fund transfer completed successfully |\n| `Failed` | Fund transfer failed |\n", - "type": "string", - "enum": [ - "Pending", - "Succeeded", - "Failed" - ] - }, - "failure": { - "description": "[Error occurred during the transfer process](#tag/Error-Codes)\n", - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "description": "Main error code", - "type": "string" - }, - "subError": { - "$ref": "#/definitions/SubFailure" - } - } - } - } - }, "Wallet": { "description": "Wallet details", "type": "object", "required": [ "name", - "identity", + "party", "currency" ], "properties": { @@ -4137,28 +2765,17 @@ "readOnly": true, "example": false }, - "identity": { - "description": "Identifier of wallet owner", + "party": { + "description": "The participant's unique identifier within the system.", "type": "string", - "example": "10036274" + "minLength": 1, + "maxLength": 40 }, "currency": { "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", "type": "string", "pattern": "^[A-Z]{3}$", "example": "USD" - }, - "metadata": { - "description": "Some non-transparent for system set of data associated with this wallet\n", - "type": "object", - "example": { - "client_locale": "en_US" - } - }, - "externalID": { - "description": "The unique identifier of the entity on your side.\n\nWhen specified, will be used to ensure idempotent processing of the operation.\n", - "type": "string", - "example": "10036274" } } }, @@ -4220,51 +2837,6 @@ } } }, - "WalletGrantRequest": { - "description": "Request for a one-time permission to manage funds on the wallet", - "type": "object", - "required": [ - "asset", - "validUntil" - ], - "properties": { - "token": { - "description": "A token that gives the permission to one-time management of funds on the wallet", - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "readOnly": true - }, - "asset": { - "description": "Amount of funds allowed for use", - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "The amount of money in minor units, for example, in cents\n", - "type": "integer", - "format": "int64", - "example": 1430000 - }, - "currency": { - "description": "Currency character code according to \n[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).\n", - "type": "string", - "pattern": "^[A-Z]{3}$", - "example": "USD" - } - } - }, - "validUntil": { - "description": "Date and time until which the granted right is valid\n", - "type": "string", - "format": "date-time" - } - } - }, "WalletID": { "description": "Identifier of the wallet", "type": "string", @@ -4278,7 +2850,7 @@ "Webhook": { "type": "object", "required": [ - "identityID", + "partyID", "scope", "url" ], @@ -4288,10 +2860,11 @@ "type": "string", "readOnly": true }, - "identityID": { - "description": "Identifier of wallet owner", + "partyID": { + "description": "The participant's unique identifier within the system.", "type": "string", - "example": "10036274" + "minLength": 1, + "maxLength": 40 }, "active": { "description": "Is notification delivery currently enabled?\n", @@ -4341,6 +2914,7 @@ "type": "object", "required": [ "wallet", + "party", "destination", "body" ], @@ -4362,6 +2936,12 @@ "type": "string", "example": "10068321" }, + "party": { + "description": "The participant's unique identifier within the system.", + "type": "string", + "minLength": 1, + "maxLength": 40 + }, "destination": { "description": "Destination identifier", "type": "string", @@ -4646,20 +3226,6 @@ { "type": "object", "properties": { - "walletGrant": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "description": "A token that gives the right to withdraw from the wallet to pay for the withdrawal.\n\nMust be provided if withdrawal is made at the expense of _foreign_\nwallet. The owner of said wallet can\n[issue this right](#operation/issueWalletGrant).\n" - }, - "destinationGrant": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "description": "A token that gives the right to withdraw.\n\nMust be provided if the withdrawal is made through a _foreign_ recipient of\nfunds. The owner of the specified recipient can\n[issue this right](#operation/issueDestinationGrant).\n" - }, "quoteToken": { "type": "string", "minLength": 1, @@ -4754,6 +3320,7 @@ "type": "object", "required": [ "walletID", + "partyID", "currencyFrom", "currencyTo", "cash" @@ -4769,6 +3336,12 @@ "type": "string", "example": "10068321" }, + "partyID": { + "description": "The participant's unique identifier within the system.", + "type": "string", + "minLength": 1, + "maxLength": 40 + }, "destinationID": { "description": "Destination identifier", "type": "string", @@ -4807,20 +3380,6 @@ "example": "USD" } } - }, - "walletGrant": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "description": "A token that gives the right to withdraw from the wallet to pay for the withdrawal. It is necessary to provide if the withdrawal is made at the expense of the funds of a _foreign_ wallet. The owner of the specified wallet can [issue this right](#operation/issueWalletGrant)\n" - }, - "destinationGrant": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M\nDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o\n", - "description": "A token that gives the right to withdraw. Must be provided if the withdrawal is made through a _foreign_ fund recipient. The owner of the specified recipient can [grant this right](#operation/issueDestinationGrant)\n" } } }, diff --git a/api/wallet/swagger.yaml b/api/wallet/swagger.yaml index 514198d0..fdee8eb2 100644 --- a/api/wallet/swagger.yaml +++ b/api/wallet/swagger.yaml @@ -41,6 +41,9 @@ info: name: Technical support team email: support@vality.dev url: 'https://api.vality.dev' + license: + name: Apache 2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' host: api.vality.dev basePath: /wallet/v0 schemes: @@ -83,22 +86,6 @@ parameters: type: string maxLength: 32 minLength: 1 - providerID: - name: providerID - in: path - description: Identifier of the provider - required: true - type: string - maxLength: 40 - minLength: 1 - identityID: - name: identityID - in: path - description: Identifier of the owner's identity - required: true - type: string - maxLength: 40 - minLength: 1 walletID: name: walletID in: path @@ -233,22 +220,6 @@ parameters: type: string maxLength: 40 minLength: 1 - queryIdentityID: - name: identityID - in: query - description: Identifier of the owner's identity - required: true - type: string - maxLength: 40 - minLength: 1 - w2wTransferID: - name: w2wTransferID - in: path - description: Identifier of transfer - required: true - type: string - maxLength: 40 - minLength: 1 partyID: name: partyID description: The participant's unique identifier within the system. @@ -258,12 +229,6 @@ parameters: maxLength: 40 minLength: 1 tags: - - name: Providers - x-displayName: Service providers - description: '' - - name: Identities - x-displayName: Identities - description: '' - name: Wallets x-displayName: Wallets description: '' @@ -285,9 +250,6 @@ tags: - name: Downloads x-displayName: File upload description: '' - - name: W2W - x-displayName: Transfers within the system - description: Transfers of funds between wallets within the system - name: Webhooks x-displayName: Webhooks description: | @@ -337,188 +299,6 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - /deposit-adjustments: - get: - operationId: listDepositAdjustments - summary: Finding adjustments - tags: - - Deposits - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/partyID' - - name: walletID - in: query - description: Wallet identifier - type: string - maxLength: 40 - minLength: 1 - required: false - - name: identityID - in: query - description: Identifier of the owner's identity - type: string - maxLength: 40 - minLength: 1 - required: false - - name: depositID - in: query - description: Identifier of the input of funds - type: string - required: false - maxLength: 50 - minLength: 1 - - name: sourceID - in: query - description: Identifier of the fund source - type: string - maxLength: 40 - minLength: 1 - required: false - - name: status - in: query - type: string - enum: - - Pending - - Succeeded - - Failed - required: false - - name: createdAtFrom - in: query - description: Creation date from - type: string - format: date-time - required: false - - name: createdAtTo - in: query - description: Creation date to - type: string - format: date-time - required: false - - $ref: '#/parameters/amountFrom' - - $ref: '#/parameters/amountTo' - - $ref: '#/parameters/currencyID' - - $ref: '#/parameters/limit' - - name: continuationToken - in: query - required: false - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - responses: - '200': - description: Search results - schema: - type: object - properties: - continuationToken: - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - result: - description: Found adjustments - type: array - items: - $ref: '#/definitions/DepositAdjustment' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - /deposit-reverts: - get: - operationId: listDepositReverts - summary: Search for reverts - tags: - - Deposits - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/partyID' - - name: walletID - in: query - description: Identifier of the wallet - type: string - maxLength: 40 - minLength: 1 - required: false - - name: identityID - in: query - description: Identifier of the owner's identity - type: string - maxLength: 40 - minLength: 1 - required: false - - name: depositID - in: query - description: Identifier of the input of funds - type: string - required: false - maxLength: 50 - minLength: 1 - - name: sourceID - in: query - description: Identifier of the source of funds - type: string - maxLength: 40 - minLength: 1 - required: false - - name: status - in: query - type: string - enum: - - Pending - - Succeeded - - Failed - required: false - - name: createdAtFrom - in: query - description: Creation date from - type: string - format: date-time - required: false - - name: createdAtTo - in: query - description: Creation date to - type: string - format: date-time - required: false - - $ref: '#/parameters/amountFrom' - - $ref: '#/parameters/amountTo' - - $ref: '#/parameters/currencyID' - - $ref: '#/parameters/limit' - - name: continuationToken - in: query - required: false - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - responses: - '200': - description: Search result - schema: - type: object - properties: - continuationToken: - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - result: - description: Found reverts - type: array - items: - $ref: '#/definitions/DepositRevert' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' /deposits: get: operationId: listDeposits @@ -536,13 +316,6 @@ paths: maxLength: 40 minLength: 1 required: false - - name: identityID - in: query - description: Identifier of the owner's identity - type: string - maxLength: 40 - minLength: 1 - required: false - name: depositID in: query description: Identifier of the deposit @@ -577,14 +350,6 @@ paths: type: string format: date-time required: false - - name: revertStatus - in: query - type: string - enum: - - None - - Partial - - Full - required: false - $ref: '#/parameters/amountFrom' - $ref: '#/parameters/amountTo' - $ref: '#/parameters/currencyID' @@ -628,13 +393,6 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/partyID' - - name: identityID - description: Identifier of the owner's idenity - in: query - required: false - type: string - maxLength: 40 - minLength: 1 - $ref: '#/parameters/currencyID' - $ref: '#/parameters/limit' - name: continuationToken @@ -721,37 +479,6 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - '/destinations/{destinationID}/grants': - post: - operationId: issueDestinationGrant - summary: Grant the right to manage the destinations - tags: - - Withdrawals - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/destinationID' - - name: request - description: Request for the right to manage the destinations - in: body - required: true - schema: - $ref: '#/definitions/DestinationGrantRequest' - responses: - '201': - description: The right is granted - schema: - $ref: '#/definitions/DestinationGrantRequest' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '404': - $ref: '#/responses/NotFound' - '422': - description: Invalid data for issuance - schema: - $ref: '#/definitions/InvalidOperationParameters' '/external-ids/destinations/{externalID}': get: operationId: getDestinationByExternalID @@ -794,33 +521,6 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - /external/wallets: - get: - summary: Get wallet by specified external identifier - operationId: getWalletByExternalID - tags: - - Wallets - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - name: externalID - description: External wallet identifier - in: query - required: true - type: string - maxLength: 40 - minLength: 1 - responses: - '200': - description: Wallet details - schema: - $ref: '#/definitions/Wallet' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '404': - $ref: '#/responses/NotFound' '/files/{fileID}/download': post: description: Get a link to download a file @@ -842,118 +542,16 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - /identities: - get: - operationId: listIdentities - summary: List the identities of the owners + /reports: + post: + description: Generate a report with the specified type on the identity of the owner for the specified period of time tags: - - Identities + - Reports + operationId: createReport parameters: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/partyID' - - name: providerID - description: Service provider's identifier - in: query - required: false - type: string - maxLength: 40 - minLength: 1 - - name: continuationToken - in: query - required: false - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - responses: - '200': - description: Search result - schema: - type: object - properties: - continuationToken: - description: | - A token signalling that only part of the data has been transmitted in the response. - To retrieve the next part, you need repeat the request to the service again, specifying the same set of conditions and the received token. - If there is no token, the last piece of data is received. - type: string - result: - description: Identities found - type: array - items: - $ref: '#/definitions/Identity' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - post: - operationId: createIdentity - summary: Create owner identity - tags: - - Identities - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - name: identity - description: Data of the identity created - in: body - required: true - schema: - $ref: '#/definitions/Identity' - responses: - '201': - description: Owner identity created - headers: - Location: - description: Created identity URI - type: string - format: uri - schema: - $ref: '#/definitions/Identity' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '409': - $ref: '#/responses/ConflictRequest' - '422': - description: Invalid owner identity data - schema: - $ref: '#/definitions/InvalidOperationParameters' - '/identities/{identityID}': - get: - operationId: getIdentity - summary: Get the owner's identity - tags: - - Identities - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/identityID' - responses: - '200': - description: Owner's identity found - schema: - $ref: '#/definitions/Identity' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '404': - $ref: '#/responses/NotFound' - '/identities/{identityID}/reports': - post: - description: Generate a report with the specified type on the identity of the owner for the specified period of time - tags: - - Reports - operationId: createReport - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/partyID' - - $ref: '#/parameters/identityID' - name: ReportParams in: body description: Report generation options @@ -978,7 +576,6 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/partyID' - - $ref: '#/parameters/identityID' - $ref: '#/parameters/fromTime' - $ref: '#/parameters/toTime' - name: type @@ -999,7 +596,7 @@ paths: $ref: '#/responses/BadRequest' '401': $ref: '#/responses/Unauthorized' - '/identities/{identityID}/reports/{reportID}': + '/reports/{reportID}': get: description: Get a report for a given identifier tags: @@ -1009,7 +606,6 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/partyID' - - $ref: '#/parameters/identityID' - $ref: '#/parameters/reportID' responses: '200': @@ -1022,72 +618,6 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - '/identities/{identityID}/withdrawal-methods': - get: - summary: Get withdrawal methods available by owner identity - tags: - - Identities - operationId: getWithdrawalMethods - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/identityID' - responses: - '200': - description: Methods found - schema: - type: object - properties: - methods: - type: array - items: - $ref: '#/definitions/WithdrawalMethod' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - /providers: - get: - operationId: listProviders - summary: List available providers - tags: - - Providers - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/residence' - responses: - '200': - description: Providers found - schema: - type: array - items: - $ref: '#/definitions/Provider' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '/providers/{providerID}': - get: - operationId: getProvider - summary: Get provider details - tags: - - Providers - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/providerID' - responses: - '200': - description: Provider found - schema: - $ref: '#/definitions/Provider' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '404': - $ref: '#/responses/NotFound' '/residences/{residence}': get: operationId: getResidence @@ -1116,61 +646,6 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - /w2w/transfers: - post: - description: Create a transfer - tags: - - W2W - operationId: createW2WTransfer - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - name: transferParams - in: body - description: Transfer creation options - schema: - $ref: '#/definitions/W2WTransferParameters' - responses: - '202': - description: Transfer started - headers: - Location: - description: URI of the transfer started - type: string - format: uri - schema: - $ref: '#/definitions/W2WTransfer' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '409': - $ref: '#/responses/ConflictRequest' - '422': - description: Invalid transfer input data - schema: - $ref: '#/definitions/InvalidOperationParameters' - '/w2w/transfers/{w2wTransferID}': - get: - description: Get the transfer status. - tags: - - W2W - operationId: getW2WTransfer - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - $ref: '#/parameters/w2wTransferID' - responses: - '200': - description: Transfer found - schema: - $ref: '#/definitions/W2WTransfer' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '404': - $ref: '#/responses/NotFound' /wallets: get: operationId: listWallets @@ -1181,13 +656,6 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/partyID' - - name: identityID - description: Identifier of owner's identity - in: query - required: false - type: string - maxLength: 40 - minLength: 1 - $ref: '#/parameters/currencyID' - $ref: '#/parameters/limit' - name: continuationToken @@ -1219,40 +687,6 @@ paths: $ref: '#/responses/BadRequest' '401': $ref: '#/responses/Unauthorized' - post: - operationId: createWallet - summary: Create a new wallet - tags: - - Wallets - parameters: - - $ref: '#/parameters/requestID' - - $ref: '#/parameters/deadline' - - name: wallet - description: Data of the created wallet - in: body - required: true - schema: - $ref: '#/definitions/Wallet' - responses: - '201': - description: Wallet created - headers: - Location: - description: URI of the wallet created - type: string - format: uri - schema: - $ref: '#/definitions/Wallet' - '400': - $ref: '#/responses/BadRequest' - '401': - $ref: '#/responses/Unauthorized' - '409': - $ref: '#/responses/ConflictRequest' - '422': - description: Invalid data of the wallet - schema: - $ref: '#/definitions/InvalidOperationParameters' '/wallets/{walletID}': get: operationId: getWallet @@ -1262,6 +696,7 @@ paths: parameters: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' + - $ref: '#/parameters/partyID' - $ref: '#/parameters/walletID' responses: '200': @@ -1283,6 +718,7 @@ paths: parameters: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' + - $ref: '#/parameters/partyID' - $ref: '#/parameters/walletID' responses: '200': @@ -1295,37 +731,33 @@ paths: $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - '/wallets/{walletID}/grants': - post: - operationId: issueWalletGrant - summary: Grant the right to manage funds + '/wallets/{walletID}/withdrawal-methods': + get: + summary: Get withdrawal methods available for wallet tags: - Wallets + operationId: getWithdrawalMethods parameters: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' + - $ref: '#/parameters/partyID' - $ref: '#/parameters/walletID' - - name: request - description: Request for the right to manage funds on the wallet - in: body - required: true - schema: - $ref: '#/definitions/WalletGrantRequest' responses: - '201': - description: Single right granted + '200': + description: Methods found schema: - $ref: '#/definitions/WalletGrantRequest' + type: object + properties: + methods: + type: array + items: + $ref: '#/definitions/WithdrawalMethod' '400': $ref: '#/responses/BadRequest' '401': $ref: '#/responses/Unauthorized' '404': $ref: '#/responses/NotFound' - '422': - description: Invalid data for issuance - schema: - $ref: '#/definitions/InvalidOperationParameters' /webhooks: post: description: Create a new webhook. @@ -1362,7 +794,7 @@ paths: parameters: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - - $ref: '#/parameters/queryIdentityID' + - $ref: '#/parameters/partyID' responses: '200': description: A list of webhooks @@ -1388,7 +820,7 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/webhookID' - - $ref: '#/parameters/queryIdentityID' + - $ref: '#/parameters/partyID' responses: '200': description: Webhook's data @@ -1413,7 +845,7 @@ paths: - $ref: '#/parameters/requestID' - $ref: '#/parameters/deadline' - $ref: '#/parameters/webhookID' - - $ref: '#/parameters/queryIdentityID' + - $ref: '#/parameters/partyID' responses: '204': description: Webhook successfully removed @@ -1475,13 +907,6 @@ paths: maxLength: 40 minLength: 1 required: false - - name: identityID - in: query - description: Identifier of the owner's identity - type: string - maxLength: 40 - minLength: 1 - required: false - name: withdrawalID in: query description: Identifier of the funds withdrawal @@ -1952,55 +1377,32 @@ definitions: description: Deposit information type: string - $ref: '#/definitions/DepositStatus' - DepositAdjustment: - description: Deposit adjustment data - allOf: - - type: object - properties: - id: - description: Deposit adjustment identifier - type: string - example: tZ0jUmlsV0 - readOnly: true - createdAt: - description: Date and time the adjustment was started - type: string - format: date-time - readOnly: true - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' - - $ref: '#/definitions/DepositAdjustmentStatus' - DepositAdjustmentFailure: + DepositFailure: type: object required: - code properties: code: - description: Adjustment error code + description: Deposit error code type: string subError: $ref: '#/definitions/SubFailure' - DepositAdjustmentID: - description: Deposit adjustment identifier + DepositID: + description: Deposit identifier type: string example: tZ0jUmlsV0 - DepositAdjustmentStatus: + DepositStatus: type: object properties: status: description: | - Deposit adjustment status. + Status of deposit. - | Meaning | Explanation | - | ----------- | ------------------------------------------------------- | - | `Pending` | Adjustment in progress | - | `Succeeded` | Adjustment completed successfully | - | `Failed` | Adjustment failed | + | Meaning | Explanation | + | ----------- | ------------------------------------------------ | + | `Pending` | Deposit in progress | + | `Succeeded` | Deposit of funds made successfully | + | `Failed` | Deposit of funds ended in failure | type: string enum: - Pending @@ -2018,220 +1420,76 @@ definitions: - code properties: code: - description: Adjustment error code + description: Deposit error code type: string subError: $ref: '#/definitions/SubFailure' - DepositFailure: + Destination: + description: Destination data type: object required: - - code + - name + - party + - currency + - resource + - realm properties: - code: - description: Deposit error code - type: string - subError: - $ref: '#/definitions/SubFailure' - DepositID: - description: Deposit identifier - type: string - example: tZ0jUmlsV0 - DepositRevert: - description: Deposit revert data - allOf: - - type: object - required: - - wallet - - source - - body - properties: - id: - description: Deposit revert identifier - type: string - example: '10068321' - readOnly: true - createdAt: - description: Date and time of revert start - type: string - format: date-time - readOnly: true - wallet: - description: Identifier of the wallet - type: string - example: '10068321' - source: - description: Funds source identifier - type: string - example: '107498' - body: - description: Amount of funds - type: object - required: - - amount - - currency - properties: - amount: - description: | - The amount of money in minor units, for example, in cents - type: integer - format: int64 - example: 1430000 - currency: - description: | - Currency character code according to - [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). - type: string - pattern: '^[A-Z]{3}$' - example: USD - reason: - type: string - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' - - $ref: '#/definitions/DepositRevertStatus' - DepositRevertFailure: - type: object - required: - - code - properties: - code: - description: Deposit revert error code + id: + description: Destination identifier type: string - subError: - $ref: '#/definitions/SubFailure' - DepositRevertID: - description: Deposit revert identifier - type: string - example: '10068321' - DepositRevertStatus: - type: object - properties: - status: + example: '107498' + readOnly: true + name: description: | - Deposit revert status. - - | Meaning | Explanation | - | ----------- | ------------------------------------------------------- | - | `Pending` | Deposit revert in progress | - | `Succeeded` | Deposit revert completed successfully | - | `Failed` | Deposit revert failed | + A human-readable name for the destination by which it is easily recognizable + type: string + example: Squarey plastic thingy + realm: + description: | + Realm of destination. type: string enum: - - Pending - - Succeeded - - Failed + - Live + - Test + createdAt: + description: Date and time of creation of the destination of the funds + type: string + format: date-time readOnly: true - failure: - description: | - > If `status` == `Failed` - - Explanation of the reason for failure + isBlocked: + description: Is the destination blocked? + type: boolean readOnly: true - type: object - required: - - code - properties: - code: - description: Deposit revert error code - type: string - subError: - $ref: '#/definitions/SubFailure' - DepositStatus: - type: object - properties: - status: + example: false + party: + description: The participant's unique identifier within the system. + type: string + minLength: 1 + maxLength: 40 + currency: description: | - Status of deposit. - - | Meaning | Explanation | - | ----------- | ------------------------------------------------ | - | `Pending` | Deposit in progress | - | `Succeeded` | Deposit of funds made successfully | - | `Failed` | Deposit of funds ended in failure | + Currency character code according to + [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). type: string - enum: - - Pending - - Succeeded - - Failed - readOnly: true - failure: + pattern: '^[A-Z]{3}$' + example: USD + resource: + $ref: '#/definitions/DestinationResource' + additionalAuthData: + $ref: '#/definitions/DestinationAuthData' + metadata: description: | - > If `status` == `Failed` - - Explanation of the reason for failure - readOnly: true + Some non-transparent for system set of data associated with this destination type: object - required: - - code - properties: - code: - description: Deposit error code - type: string - subError: - $ref: '#/definitions/SubFailure' - Destination: - description: Destination data - allOf: - - type: object - required: - - name - - identity - - currency - - resource - properties: - id: - description: Destination identifier - type: string - example: '107498' - readOnly: true - name: - description: | - A human-readable name for the destination by which it is easily recognizable - type: string - example: Squarey plastic thingy - createdAt: - description: Date and time of creation of the destination of the funds - type: string - format: date-time - readOnly: true - isBlocked: - description: Is the destination blocked? - type: boolean - readOnly: true - example: false - identity: - description: Identifier of wallet owner - type: string - example: '10036274' - currency: - description: | - Currency character code according to - [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). - type: string - pattern: '^[A-Z]{3}$' - example: USD - resource: - $ref: '#/definitions/DestinationResource' - additionalAuthData: - $ref: '#/definitions/DestinationAuthData' - metadata: - description: | - Some non-transparent for system set of data associated with this destination - type: object - example: - color_hint: olive-green - externalID: - description: | - The unique identifier of the entity on your side. + example: + color_hint: olive-green + externalID: + description: | + The unique identifier of the entity on your side. - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' - - $ref: '#/definitions/DestinationStatus' + When specified, will be used to ensure idempotent processing of the operation. + type: string + example: '10036274' DestinationAuthData: description: Destination auth data to make withdrawals type: object @@ -2245,26 +1503,6 @@ definitions: type: string enum: - SenderReceiverDestinationAuthData - DestinationGrantRequest: - description: Request for the permission to control the withdrawals to the destination - type: object - required: - - validUntil - properties: - token: - description: Token granting the permission to control the withdrawals - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - readOnly: true - validUntil: - description: | - The date and time by which the granted right is valid - type: string - format: date-time DestinationID: description: Destination identifier type: string @@ -2286,31 +1524,6 @@ definitions: - BankCardDestinationResource - CryptoWalletDestinationResource - DigitalWalletDestinationResource - DestinationStatus: - type: object - properties: - status: - description: | - The status of the destination. - - | Meaning | Explanation | - | -------------- | --------------------------------------------- | - | `Unauthorized` | Not authorized by the owner to withdraw funds | - | `Authorized` | Authorized by the owner to withdraw funds | - type: string - enum: - - Unauthorized - - Authorized - readOnly: true - example: Authorized - validUntil: - description: | - > If `status` == `Authorized` - - Date and time until which authorization is valid - type: string - format: date-time - readOnly: true DestinationsTopic: description: | A coverage area that includes events by asset destinations within a particular wallet @@ -2396,85 +1609,32 @@ definitions: example: '10036274' FileDownload: type: object - required: - - url - - expiresAt - properties: - url: - description: URL of the file - type: string - expiresAt: - description: The date and time by which the link will be valid - type: string - format: date-time - GenericProvider: - description: | - Withdrawal service provider. - - The set of providers available for making withdrawals can be found by calling - corresponding [operation](#operation/getWithdrawalMethods). - type: string - example: YourBankName - GrantToken: - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - Identity: - description: Data of the wallet owner - type: object - required: - - name - - provider - properties: - id: - description: Identifier of wallet owner - type: string - example: '10036274' - readOnly: true - name: - description: | - Human-readable name of the owner's identity, by which he can be easily identified - type: string - example: Keyn Fawkes - createdAt: - description: Date and time the owner identity was created - type: string - format: date-time - readOnly: true - provider: - description: Identifier of the service provider - type: string - example: serviceprovider - isBlocked: - description: Is the owner's identity blocked? - type: boolean - readOnly: true - example: false - metadata: - description: | - Some non-transparent for system set of data associated with this identity - type: object - example: - lkDisplayName: James Smith - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. + required: + - url + - expiresAt + properties: + url: + description: URL of the file type: string - example: '10036274' - partyID: - description: The participant's unique identifier within the system. + expiresAt: + description: The date and time by which the link will be valid type: string - minLength: 1 - maxLength: 40 - IdentityID: - description: Identifier of wallet owner + format: date-time + GenericProvider: + description: | + Withdrawal service provider. + + The set of providers available for making withdrawals can be found by calling + corresponding [operation](#operation/getWithdrawalMethods). type: string - example: '10036274' + example: YourBankName + GrantToken: + type: string + minLength: 1 + maxLength: 4000 + example: | + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M + DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o BadRequest: type: object required: @@ -2554,54 +1714,24 @@ definitions: type: string minLength: 1 maxLength: 40 - Provider: - description: Service provider data - type: object - required: - - id - - name - - residences - properties: - id: - description: Identifier of the service provider - type: string - example: serviceprovider - name: - description: | - Human-readable name of the service provider - type: string - example: SERVICE PROVIDER LLC - residences: - type: array - description: | - Residences in which the provider can service - items: - description: | - Residence symbol code by standard [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) - type: string - pattern: '^[A-Z]{3}$' - example: RUS - ProviderID: - description: Identifier of the service provider - type: string - example: serviceprovider QuoteParameters: description: Quote request parameters type: object required: - sender - receiver - - identityID + - partyID - body properties: sender: $ref: '#/definitions/SenderResource' receiver: $ref: '#/definitions/ReceiverResource' - identityID: - description: Identifier of wallet owner + partyID: + description: The participant's unique identifier within the system. type: string - example: '10036274' + minLength: 1 + maxLength: 40 body: description: Transaction amount type: object @@ -2883,154 +2013,12 @@ definitions: The template is presented according to the standard [RFC6570](https://tools.ietf.org/html/rfc6570). type: string - W2WTransfer: - description: Transfer data - type: object - required: - - id - - createdAt - - body - - sender - - receiver - - status - properties: - id: - description: Transfer identifier - type: string - example: 10a0b68D3E21 - maxLength: 40 - minLength: 1 - createdAt: - description: Date and time of creation - type: string - format: date-time - body: - description: Transaction amount - type: object - required: - - amount - - currency - properties: - amount: - description: | - The amount of money in minor units, for example, in cents - type: integer - format: int64 - example: 1430000 - currency: - description: | - Currency character code according to - [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). - type: string - pattern: '^[A-Z]{3}$' - example: USD - sender: - $ref: '#/definitions/WalletID' - receiver: - $ref: '#/definitions/WalletID' - status: - $ref: '#/definitions/W2WTransferStatus' - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' - W2WTransferFailure: - description: | - [Error occurred during the transfer process](#tag/Error-Codes) - type: object - required: - - code - properties: - code: - description: Main error code - type: string - subError: - $ref: '#/definitions/SubFailure' - W2WTransferID: - description: Transfer identifier - type: string - example: 10a0b68D3E21 - maxLength: 40 - minLength: 1 - W2WTransferParameters: - description: Transfer creation options - type: object - required: - - sender - - receiver - - body - properties: - sender: - $ref: '#/definitions/WalletID' - receiver: - $ref: '#/definitions/WalletID' - body: - description: Transfer amount - type: object - required: - - amount - - currency - properties: - amount: - description: | - The amount of money in minor units, for example, in cents - type: integer - format: int64 - example: 1430000 - currency: - description: | - Currency character code according to - [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). - type: string - pattern: '^[A-Z]{3}$' - example: USD - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' - W2WTransferStatus: - type: object - required: - - status - properties: - status: - description: | - The status of the money transfer. - - | Meaning | Explanation | - | ----------- | ------------------------------------ | - | `Pending` | Transfer in progress | - | `Succeeded` | Fund transfer completed successfully | - | `Failed` | Fund transfer failed | - type: string - enum: - - Pending - - Succeeded - - Failed - failure: - description: | - [Error occurred during the transfer process](#tag/Error-Codes) - type: object - required: - - code - properties: - code: - description: Main error code - type: string - subError: - $ref: '#/definitions/SubFailure' Wallet: description: Wallet details type: object required: - name - - identity + - party - currency properties: id: @@ -3052,10 +2040,11 @@ definitions: type: boolean readOnly: true example: false - identity: - description: Identifier of wallet owner + party: + description: The participant's unique identifier within the system. type: string - example: '10036274' + minLength: 1 + maxLength: 40 currency: description: | Currency character code according to @@ -3063,19 +2052,6 @@ definitions: type: string pattern: '^[A-Z]{3}$' example: USD - metadata: - description: | - Some non-transparent for system set of data associated with this wallet - type: object - example: - client_locale: en_US - externalID: - description: | - The unique identifier of the entity on your side. - - When specified, will be used to ensure idempotent processing of the operation. - type: string - example: '10036274' WalletAccount: description: Wallet account status type: object @@ -3129,47 +2105,6 @@ definitions: example: amount: 1200000 currency: USD - WalletGrantRequest: - description: Request for a one-time permission to manage funds on the wallet - type: object - required: - - asset - - validUntil - properties: - token: - description: A token that gives the permission to one-time management of funds on the wallet - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - readOnly: true - asset: - description: Amount of funds allowed for use - type: object - required: - - amount - - currency - properties: - amount: - description: | - The amount of money in minor units, for example, in cents - type: integer - format: int64 - example: 1430000 - currency: - description: | - Currency character code according to - [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm). - type: string - pattern: '^[A-Z]{3}$' - example: USD - validUntil: - description: | - Date and time until which the granted right is valid - type: string - format: date-time WalletID: description: Identifier of the wallet type: string @@ -3181,7 +2116,7 @@ definitions: Webhook: type: object required: - - identityID + - partyID - scope - url properties: @@ -3190,10 +2125,11 @@ definitions: Identifier of the webhook type: string readOnly: true - identityID: - description: Identifier of wallet owner + partyID: + description: The participant's unique identifier within the system. type: string - example: '10036274' + minLength: 1 + maxLength: 40 active: description: | Is notification delivery currently enabled? @@ -3236,6 +2172,7 @@ definitions: - type: object required: - wallet + - party - destination - body properties: @@ -3253,6 +2190,11 @@ definitions: description: Identifier of the wallet type: string example: '10068321' + party: + description: The participant's unique identifier within the system. + type: string + minLength: 1 + maxLength: 40 destination: description: Destination identifier type: string @@ -3463,32 +2405,6 @@ definitions: - $ref: '#/definitions/Withdrawal' - type: object properties: - walletGrant: - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - description: | - A token that gives the right to withdraw from the wallet to pay for the withdrawal. - - Must be provided if withdrawal is made at the expense of _foreign_ - wallet. The owner of said wallet can - [issue this right](#operation/issueWalletGrant). - destinationGrant: - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - description: | - A token that gives the right to withdraw. - - Must be provided if the withdrawal is made through a _foreign_ recipient of - funds. The owner of the specified recipient can - [issue this right](#operation/issueDestinationGrant). quoteToken: type: string minLength: 1 @@ -3577,6 +2493,7 @@ definitions: type: object required: - walletID + - partyID - currencyFrom - currencyTo - cash @@ -3592,6 +2509,11 @@ definitions: description: Identifier of the wallet type: string example: '10068321' + partyID: + description: The participant's unique identifier within the system. + type: string + minLength: 1 + maxLength: 40 destinationID: description: Destination identifier type: string @@ -3626,24 +2548,6 @@ definitions: type: string pattern: '^[A-Z]{3}$' example: USD - walletGrant: - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - description: | - A token that gives the right to withdraw from the wallet to pay for the withdrawal. It is necessary to provide if the withdrawal is made at the expense of the funds of a _foreign_ wallet. The owner of the specified wallet can [issue this right](#operation/issueWalletGrant) - destinationGrant: - type: string - minLength: 1 - maxLength: 4000 - example: | - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M - DIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o - description: | - A token that gives the right to withdraw. Must be provided if the withdrawal is made through a _foreign_ fund recipient. The owner of the specified recipient can [grant this right](#operation/issueDestinationGrant) WithdrawalReadQuote: description: Quote data for withdrawal type: object From 95fc3afbf2ad711dfb82734591636e5730e19e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Fri, 26 Sep 2025 11:27:56 +0300 Subject: [PATCH 2/2] BG-411: Add contact info to withdrawal --- api/wallet/swagger.json | 23 +++++++++++++++++------ api/wallet/swagger.yaml | 20 +++++++++++++++----- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/api/wallet/swagger.json b/api/wallet/swagger.json index e9ebe0f5..1fb0f77f 100644 --- a/api/wallet/swagger.json +++ b/api/wallet/swagger.json @@ -2753,12 +2753,6 @@ "type": "string", "example": "Worldwide PHP Awareness Initiative" }, - "createdAt": { - "description": "Date and time of wallet creation", - "type": "string", - "format": "date-time", - "readOnly": true - }, "isBlocked": { "description": "Is the wallet blocked?", "type": "boolean", @@ -3003,6 +2997,23 @@ "type": "string", "example": "10036274" }, + "contactInfo": { + "description": "Contact details", + "type": "object", + "properties": { + "email": { + "description": "Email address", + "type": "string", + "format": "email", + "maxLength": 100 + }, + "phoneNumber": { + "description": "Mobile phone number with international prefix according to\n[E.164](https://en.wikipedia.org/wiki/E.164).\n", + "type": "string", + "format": "^\\+\\d{4,15}$" + } + } + }, "quote": { "description": "Quote data for withdrawal", "type": "object", diff --git a/api/wallet/swagger.yaml b/api/wallet/swagger.yaml index fdee8eb2..76079e18 100644 --- a/api/wallet/swagger.yaml +++ b/api/wallet/swagger.yaml @@ -2030,11 +2030,6 @@ definitions: description: 'Human-readable name of the wallet, by which it is easy to recognize' type: string example: Worldwide PHP Awareness Initiative - createdAt: - description: Date and time of wallet creation - type: string - format: date-time - readOnly: true isBlocked: description: Is the wallet blocked? type: boolean @@ -2252,6 +2247,21 @@ definitions: When specified, will be used to ensure idempotent processing of the operation. type: string example: '10036274' + contactInfo: + description: Contact details + type: object + properties: + email: + description: Email address + type: string + format: email + maxLength: 100 + phoneNumber: + description: | + Mobile phone number with international prefix according to + [E.164](https://en.wikipedia.org/wiki/E.164). + type: string + format: '^\+\d{4,15}$' quote: description: Quote data for withdrawal type: object