Skip to content

Commit 5fadd8e

Browse files
committed
docs(api): add pending transfers summary endpoint documentation
Add OpenAPI specification for GET /wallets/{wallet_uuid}/pending-transfers: - Complete endpoint definition with parameters and responses - pendingTransfersSummary schema with detailed properties - Comprehensive examples and error handling documentation - Follows existing API documentation patterns
1 parent 08cf4e7 commit 5fadd8e

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

docs/api/spec/treetracker-wallet-api.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,51 @@ paths:
487487
code: 422
488488
message: '"wallet_id" must be a valid GUID'
489489
deprecated: false
490+
'/wallets/{wallet_uuid}/pending-transfers':
491+
get:
492+
tags:
493+
- Wallet operations
494+
operationId: get-wallets-walletId-pendingTransfers
495+
summary: Get pending transfers summary for a wallet
496+
description: 'Returns a summary of pending token transfers for the specified wallet, including both incoming and outgoing transfers with counts and total amounts.'
497+
parameters:
498+
- $ref: '#/components/parameters/treetrackerApiKeyParam'
499+
- name: wallet_uuid
500+
description: 'ID of wallet to get pending transfers summary for'
501+
in: path
502+
required: true
503+
schema:
504+
type: string
505+
format: uuid
506+
example: 496ffa8e-2fa2-488c-98e1-acf9b57c230b
507+
responses:
508+
'200':
509+
description: 'Pending transfers summary'
510+
content:
511+
application/json:
512+
schema:
513+
$ref: '#/components/schemas/pendingTransfersSummary'
514+
'401':
515+
$ref: '#/components/responses/UnauthorizedError'
516+
'403':
517+
description: 'Access denied - user does not have permission to access this wallet'
518+
content:
519+
application/json:
520+
schema:
521+
$ref: '#/components/schemas/errorResponse'
522+
example:
523+
code: 403
524+
message: 'Have no permission to access this wallet'
525+
'422':
526+
description: 'Invalid wallet UUID parameter'
527+
content:
528+
application/json:
529+
schema:
530+
$ref: '#/components/schemas/errorResponse'
531+
example:
532+
code: 422
533+
message: '"wallet_id" must be a valid GUID'
534+
deprecated: false
490535
/wallets/batch-create-wallet:
491536
post:
492537
tags:
@@ -1934,6 +1979,57 @@ components:
19341979
type: array
19351980
items:
19361981
$ref: '#/components/schemas/walletItem'
1982+
pendingTransfersSummary:
1983+
title: 'Pending Transfers Summary'
1984+
type: object
1985+
properties:
1986+
wallet_id:
1987+
type: string
1988+
format: uuid
1989+
description: 'ID of the wallet'
1990+
example: 482bf306-30c7-4cea-833a-1cdda3d96573
1991+
wallet_name:
1992+
type: string
1993+
description: 'Name of the wallet'
1994+
example: 'test_wallet'
1995+
pending_outgoing:
1996+
type: object
1997+
description: 'Summary of outgoing pending transfers'
1998+
properties:
1999+
total_amount:
2000+
type: integer
2001+
description: 'Total number of tokens in outgoing pending transfers'
2002+
example: 5
2003+
count:
2004+
type: integer
2005+
description: 'Number of outgoing pending transfers'
2006+
example: 2
2007+
pending_incoming:
2008+
type: object
2009+
description: 'Summary of incoming pending transfers'
2010+
properties:
2011+
total_amount:
2012+
type: integer
2013+
description: 'Total number of tokens in incoming pending transfers'
2014+
example: 3
2015+
count:
2016+
type: integer
2017+
description: 'Number of incoming pending transfers'
2018+
example: 1
2019+
net_pending:
2020+
type: integer
2021+
description: 'Net pending amount (incoming - outgoing)'
2022+
example: -2
2023+
example:
2024+
wallet_id: '482bf306-30c7-4cea-833a-1cdda3d96573'
2025+
wallet_name: 'test_wallet'
2026+
pending_outgoing:
2027+
total_amount: 5
2028+
count: 2
2029+
pending_incoming:
2030+
total_amount: 3
2031+
count: 1
2032+
net_pending: -2
19372033
responses:
19382034
InvalidQueryParametersLimit:
19392035
description: 'Invalid query parameters'

0 commit comments

Comments
 (0)