Skip to content

Commit

Permalink
feat: GET statements/missing_transactions API
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Sharma committed Oct 3, 2023
1 parent e6aa59e commit 414fac7
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ paths:
/admin/statements/card_stats:
$ref: paths/admin@statements@card_stats.yaml
/admin/statements/missing_transactions:
$ref: paths/admin@statements@post_missing_transactions.yaml
$ref: paths/admin@statements@missing_transactions.yaml
/admin/statements/create_card_transactions:
$ref: paths/admin@statements@create_card_transactions.yaml
/admin/expense_rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ post:
summary: Process RTF Missing Transactions Reconciliation
description: |
This API is used to start processing RTF missing transactions reconciliation of a statement.
operationId: missing_transactions
operationId: post_missing_transactions
requestBody:
required: true
content:
Expand Down Expand Up @@ -42,4 +42,40 @@ post:
content:
application/json:
schema:
$ref: '../../components/schemas/404.yaml'
$ref: '../../components/schemas/404.yaml'


get:
tags:
- Statements
summary: Get RTF Missing Transactions Reconciliation Data
description: |
This API is used to get the data for RTF missing transactions reconciliation of a statement.
operationId: get_missing_transactions
parameters:
- $ref: ../../components/parameters/id.yaml
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
additionalProperties: False
properties:
data:
type: array
items:
$ref: ../../components/schemas/statements.yaml#/rtf_missing_transaction_from_statement_out
'400':
description: Bad Request
content:
application/json:
schema:
$ref: ../../components/schemas/400.yaml
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: ../../components/schemas/401.yaml
112 changes: 112 additions & 0 deletions src/components/schemas/statements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,118 @@ rtf_missing_transaction_from_statement_in:
- ignored_line_item_ids
- reconciliation_method

rtf_missing_transaction_from_statement_out:
type: object
properties:
error:
type: string
description: |
Error message if any error occurred while processing the statement.
example: null
nullable: true
missing_rtf_transactions:
type: array
items:
type: object
properties:
amount:
type: number
description: |
Specifies the amount on the statement.
example: 30
bank_name:
type: string
description: |
Specifies the bank name of the statement
example: American Express
card_number:
type: string
description: |
Specifies the card number on the statement.
example: xxxx-3343
currency:
type: string
description: |
Specifies the currency on the statement.
example: USD
description:
type: string
description: |
Specifies the description of the transaction on the statement.
nullable: true
example: description
foreign_amount:
type: string
description: |
Specifies the foreign amount on the statement.
nullable: true
example: 48
foreign_currency:
type: string
description: |
Specifies the foreign currency on the statement.
nullable: true
example: USD
merchant:
type: string
description: |
Specifies the merchant of the statement
example: Amazon
post_date:
$ref: './fields.yaml#/timestamptz_utc'
description: |
Specifies the post date on the statement.
nullable: true
statement_line_item_id:
type: string
description: |
Specifies the statement line item id of the statement.
example: stliLtfjqvyYGv
transaction_date:
$ref: './fields.yaml#/timestamptz_utc'
description: |
Specifies the transaction date on the statement.
transaction_id:
type: string
description: |
Specifies the transaction id / unique id on the statement.
nullable: true
example: USD
transaction_type:
type: string
description: |
Specifies the transaction type of the transactions on the statement (credit / debit).
example: debit
unique_id:
type: string
description: |
Specifies the unique code / transaction id on the statement.
example: ed0b2aa913c
rtf_confidence:
type: number
description: |
Confidence of the statement being RTF statement.
example: 0.987012987012987
rtf_count:
type: integer
description: |
Number of transactions in the statement that are already existing in Fyle via RTF.
example: 76
status:
type: string
description: |
Status of the statement reconciliation.
example: SUCCESS
enum:
- INITIALIZED
- PROCESSING
- SUCCESS
- FAILED
total_count:
type: integer
description: |
Total number of transactions in the statement.
example: 77

preview_out:
properties:
Expand Down

0 comments on commit 414fac7

Please sign in to comment.