From 2aa58f1b651764dc3de1c8af7622b3f20e5e370c Mon Sep 17 00:00:00 2001 From: Sebastiaan de Schaetzen Date: Wed, 1 Oct 2025 20:48:19 +0200 Subject: [PATCH] Add API endpoint for transferring amounts between allowances --- common/api.yaml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/common/api.yaml b/common/api.yaml index e2fddd9..81ccb86 100644 --- a/common/api.yaml +++ b/common/api.yaml @@ -409,6 +409,59 @@ paths: 404: 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: schemas: task: