Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 87 additions & 14 deletions openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
openapi: 3.0.3
info:
title: Sure API
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -6939,7 +7012,7 @@ paths:
parameters: []
responses:
'201':
description: trade created
description: interest created
content:
application/json:
schema:
Expand All @@ -6957,7 +7030,7 @@ paths:
schema:
"$ref": "#/components/schemas/ErrorResponse"
'422':
description: validation error
description: deposit without amount returns error
content:
application/json:
schema:
Expand Down