Add API endpoint for transferring amounts between allowances
Some checks failed
Backend Build and Test / build (push) Failing after 5m57s
Some checks failed
Backend Build and Test / build (push) Failing after 5m57s
This commit is contained in:
parent
2dd06d4af3
commit
2aa58f1b65
@ -409,6 +409,59 @@ paths:
|
|||||||
404:
|
404:
|
||||||
description: The task could not be found.
|
description: The task could not be found.
|
||||||
|
|
||||||
|
/api/transfer:
|
||||||
|
post:
|
||||||
|
summary: Transfer amount between allowances
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
from:
|
||||||
|
type: integer
|
||||||
|
description: Source allowance ID
|
||||||
|
to:
|
||||||
|
type: integer
|
||||||
|
description: Destination allowance ID
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
description: Amount to transfer
|
||||||
|
required:
|
||||||
|
- from
|
||||||
|
- to
|
||||||
|
- amount
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Transfer successful
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
description: Invalid request
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
'404':
|
||||||
|
description: Allowance not found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
task:
|
task:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user