From dc5796a4f23d84beb4c9228b907c0f83983e7fd3 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:05:18 +0000 Subject: [PATCH] feat: sync openapi.yaml with merchants import and transfer fee fields --- openapi.yaml | 101 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 14 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 60d6533..e4bfb1f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,3 +1,4 @@ +--- openapi: 3.0.3 info: title: Sure API @@ -1004,6 +1005,23 @@ components: updated_at: type: string format: date-time + MerchantImportResult: + type: object + required: + - imported + - skipped + - merchants + properties: + imported: + type: integer + description: Number of merchants successfully created + skipped: + type: integer + description: Number of rows skipped (duplicates or invalid) + merchants: + type: array + items: + "$ref": "#/components/schemas/MerchantDetail" Tag: type: object required: @@ -1382,15 +1400,11 @@ components: nullable: true description: Average expected amount in currency minor units account: - type: object + "$ref": "#/components/schemas/Account" nullable: true - allOf: - - "$ref": "#/components/schemas/Account" merchant: - type: object + "$ref": "#/components/schemas/Merchant" nullable: true - allOf: - - "$ref": "#/components/schemas/Merchant" created_at: type: string format: date-time @@ -1569,6 +1583,20 @@ components: notes: type: string nullable: true + source_fee_amount: + type: string + nullable: true + description: Fee charged to the source account + source_fee_currency: + type: string + nullable: true + destination_fee_amount: + type: string + nullable: true + description: Fee deducted from the destination account + destination_fee_currency: + type: string + nullable: true inflow_transaction: "$ref": "#/components/schemas/TransferTransactionSide" outflow_transaction: @@ -3647,6 +3675,12 @@ paths: oneOf: - "$ref": "#/components/schemas/ErrorResponse" - "$ref": "#/components/schemas/MfaRequiredResponse" + '403': + description: SSO identity removed by an administrator + content: + application/json: + schema: + "$ref": "#/components/schemas/ErrorResponse" requestBody: content: application/json: @@ -3728,7 +3762,7 @@ paths: schema: "$ref": "#/components/schemas/ErrorResponse" '403': - description: account creation disabled + description: SSO identity removed or account creation disabled content: application/json: schema: @@ -5140,11 +5174,6 @@ paths: description: Raw CSV or Sure NDJSON content as a string. CSV content is limited to 10MB. Required for SureImport unless a multipart file is uploaded. - file: - type: string - format: binary - description: CSV or Sure NDJSON upload when using multipart/form-data. - CSV files are limited to 10MB. type: type: string enum: @@ -5493,6 +5522,11 @@ paths: type: string description: Raw CSV or Sure NDJSON content as a string. CSV content is limited to 10MB. + file: + type: string + format: binary + description: CSV or Sure NDJSON upload when using multipart/form-data. + CSV files are limited to 10MB. type: type: string enum: @@ -5726,6 +5760,45 @@ paths: type: array items: "$ref": "#/components/schemas/MerchantDetail" + post: + summary: Import merchants from CSV + tags: + - Merchants + security: + - apiKeyAuth: [] + parameters: [] + responses: + '201': + description: merchants imported + content: + application/json: + schema: + "$ref": "#/components/schemas/MerchantImportResult" + '401': + description: unauthorized + content: + application/json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + '422': + description: missing file or invalid CSV + content: + application/json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + requestBody: + content: + multipart/form-data: + schema: + type: object + required: + - file + properties: + file: + type: string + format: binary + required: true + description: 'CSV file with columns: name* (required), color, website_url' "/api/v1/merchants/{id}": parameters: - name: id @@ -6939,7 +7012,7 @@ paths: parameters: [] responses: '201': - description: trade created + description: interest created content: application/json: schema: @@ -6957,7 +7030,7 @@ paths: schema: "$ref": "#/components/schemas/ErrorResponse" '422': - description: validation error + description: deposit without amount returns error content: application/json: schema: