Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FYLE-2891ub0 #169

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
196 changes: 196 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6865,6 +6865,153 @@ components:
description: >
Determines whether this organization has been verified by a
verifier.
statements_out:
type: object
additionalProperties: false
properties:
id:
allOf:
- $ref: '#/components/schemas/id_string'
example: stmtwownwrng
org_id:
$ref: '#/components/schemas/org_id'
creator_user_id:
$ref: '#/components/schemas/user_id'
created_at:
$ref: '#/components/schemas/created_at'
updated_at:
$ref: '#/components/schemas/updated_at'
file_name:
type: string
description: |
Specifies the name of file uploaded by the user.
example: amex.csv
file_size:
type: number
description: >
Specifies the size of file uploaded by the user. (The size is
represented in bytes)
example: 21
no_of_debit:
type: integer
description: |
Number of debit transactions in the statement uploaded by the user.
example: 3
nullable: true
no_of_credit:
type: integer
description: |
Number of credit transactions in the statement uploaded by the user.
example: 3
nullable: true
no_of_transactions:
type: integer
description: |
Number of transactions in the statement uploaded by the user.
example: 6
all_statement_columns:
type: array
items:
type: string
description: |
This specifies headers of the statement uploaded by the user.
example:
- account_number
- amount
start_date:
$ref: '#/components/schemas/timestamptz_utc'
description: |
Start date of the statement period
nullable: true
end_date:
$ref: '#/components/schemas/timestamptz_utc'
description: |
End date of the statement period
nullable: true
has_duplicate_statements:
type: boolean
description: >
This specifies if the statement is complete duplicate of already
uploaded statement or not.
nullable: true
duplicate_statement_ids:
type: array
description: >-
Holds the list of statement_ids which are complete duplicate of the
current statement
items:
$ref: '#/components/schemas/id_string'
example:
- stmtge49ielgel
has_duplicate_statement_line_items:
type: boolean
description: >
Indicates whether there are any line items in this statement are
duplicates.
nullable: true
duplicate_statement_line_items:
type: array
items:
type: object
properties:
ids:
type: array
items:
$ref: '#/components/schemas/id_string'
example:
- stlige49ielgel
description: Ids of the current statement line items which are duplicates
duplicate_line_item_statement_id:
type: string
description: |
Id of the existing duplicate statement
example:
- stmpge49ielgel
nullable: true
unique_id:
type: string
description: |
Unique hash value that is used to identify the statement.
example: 74175aadf22675aa59df28b96d351cfb
file_id:
type: string
description: |
File id of the uploaded statement.
example: fiit3pX9gzzP
nullable: true
are_corporate_card_transactions_created:
type: boolean
description: >
Indicates whether the corporate card transactions are created out of
the statement.
statement_mappings_id:
type: string
example: stmpdfddfd
description: |
Id of the mapping used to extract transaction from the statement.
nullable: true
required:
- id
- org_id
- creator_user_id
- created_at
- updated_at
- file_name
- file_size
- no_of_debit
- no_of_credit
- no_of_transactions
- all_statement_columns
- start_date
- end_date
- has_duplicate_statements
- has_duplicate_statement_line_items
- duplicate_statement_ids
- duplicate_statement_line_items
- unique_id
- file_id
- are_corporate_card_transactions_created
- statement_mappings_id
parameters:
created_at:
in: query
Expand Down Expand Up @@ -7109,6 +7256,10 @@ tags:
- name: Organisations
description: |
These APIs gives you access to manage organisations.
- name: Statements
description: >
These APIs gives you access to add / view a bank statement for
reconciliation.
paths:
/admin/projects:
get:
Expand Down Expand Up @@ -10544,3 +10695,48 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/401'
/admin/statements:
get:
tags:
- Statements
summary: List Statements
description: >
This API supports very rich filtering on all response fields and
pagination via query parameters. To understand how to use these
parameters, please see the [Guide to Data
APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
operationId: statements_list
parameters:
- $ref: '#/components/parameters/created_at'
- $ref: '#/components/parameters/updated_at'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
$ref: '#/components/schemas/count'
offset:
$ref: '#/components/schemas/offset'
data:
type: array
items:
$ref: '#/components/schemas/statements_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
5 changes: 5 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ tags:
- name: Organisations
description: >
These APIs gives you access to manage organisations.
- name: Statements
description: >
These APIs gives you access to add / view a bank statement for reconciliation.
# - name: Suggestions
# description: |
# This API gives you access to Expense/Card Transactions Suggestions.
Expand Down Expand Up @@ -239,3 +242,5 @@ paths:
$ref: paths/admin@budget_usages.yaml
/admin/orgs:
$ref: paths/admin@orgs.yaml
/admin/statements:
$ref: paths/admin@statements.yaml
41 changes: 41 additions & 0 deletions src/admin/paths/admin@statements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
get:
tags:
- Statements
summary: List Statements
description: |
This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
operationId: statements_list
parameters:
- $ref: '../../components/parameters/created_at.yaml'
- $ref: '../../components/parameters/updated_at.yaml'
- $ref: '../../components/parameters/order.yaml'
- $ref: '../../components/parameters/offset.yaml'
- $ref: '../../components/parameters/limit.yaml'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
$ref: '../../components/schemas/count.yaml'
offset:
$ref: '../../components/schemas/offset.yaml'
data:
type: array
items:
$ref: '../../components/schemas/statements.yaml#/statements_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'
Loading