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-2891ty8 #164

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 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
149 changes: 149 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6539,6 +6539,112 @@ components:
description: >
Determines whether this organization has been verified by a
verifier.
statement_mappings_out:
type: object
additionalProperties: false
properties:
id:
allOf:
- $ref: '#/components/schemas/id_string'
example: stmpwownwrng
org_id:
$ref: '#/components/schemas/org_id'
created_at:
$ref: '#/components/schemas/created_at'
updated_at:
$ref: '#/components/schemas/updated_at'
bank_name:
type: string
description: |
Specifies the bank name of the statement.
example: American Express
is_debit_positive:
type: boolean
description: >
Specifies the representation of the the amount in the statement, if
true then the amount represented by

negative sign are credits, and if false then the amount represented
by negative sign are debits.
example: true
transaction_date_column:
type: string
description: >
Specifies the header name of the transaction date column in the
statement.
example: spent date
vendor_column:
type: string
description: |
Specifies the header name of the vendor column in the statement.
example: merchant
transaction_id_column:
type: string
description: >
Specifies the header name of the transaction id / unique id column
in the statement.
nullable: true
example: reference number
amount_column:
type: string
description: |
Specifies the header name of the amount column in the statement.
example: amount
name:
type: string
description: |
Specifies the mapping name.
example: amex_mapping
card_number_column:
type: string
description: >
Specifies the header name of the card number column in the
statement.
example: account number
foreign_amount_column:
type: string
description: >
Specifies the header name of the foreign amount column in the
statement.
nullable: true
example: foreign amount
foreign_currency_column:
type: string
description: >
Specifies the header name of the foreign currency column in the
statement.
nullable: true
example: foreign currency
description_column:
type: string
description: >
Specifies the header name of the description column in the
statement.
nullable: true
example: description
is_auto_created:
type: boolean
description: |
Specifies if the statement mapping got auto created or not.
nullable: false
example: description
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

required:
- id
- org_id
- created_at
- updated_at
- bank_name
- is_debit_positive
- transaction_date_column
- transaction_id_column
- amount_column
- name
- card_number_column
- vendor_column
- foreign_amount_column
- foreign_currency_column
- description_column
- is_auto_created
parameters:
created_at:
in: query
Expand Down Expand Up @@ -6664,6 +6770,10 @@ tags:
- name: Organisations
description: |
These APIs gives you access to manage organisations.
- name: Statement mappings
description: >
These APIs gives you access to manage statement mappings which is used for
statement uploads.
paths:
/admin/projects:
get:
Expand Down Expand Up @@ -9883,3 +9993,42 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/401'
/admin/statement_mappings:
get:
tags:
- Statement mappings
summary: List of statement mappings
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: statement_mappings_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/statement_mappings_out'
'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: Statement mappings
description: >
These APIs gives you access to manage statement mappings which is used for statement uploads.
# - name: Suggestions
# description: |
# This API gives you access to Expense/Card Transactions Suggestions.
Expand Down Expand Up @@ -236,3 +239,5 @@ paths:
$ref: paths/admin@budget_usages.yaml
/admin/orgs:
$ref: paths/admin@orgs.yaml
/admin/statement_mappings:
$ref: paths/admin@statement_mappings.yaml
35 changes: 35 additions & 0 deletions src/admin/paths/admin@statement_mappings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
get:
tags:
- Statement mappings
summary: List of statement mappings
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: statement_mappings_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/statement_mappings.yaml#/statement_mappings_out'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '../../components/schemas/401.yaml'
97 changes: 97 additions & 0 deletions src/components/schemas/statement_mappings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
statement_mappings_out:
type: object
additionalProperties: False
properties:
id:
allOf:
- $ref: './fields.yaml#/id_string'
example: stmpwownwrng
org_id:
$ref: './fields.yaml#/org_id'
created_at:
$ref: './fields.yaml#/created_at'
updated_at:
$ref: './fields.yaml#/updated_at'
bank_name:
type: string
description: |
Specifies the bank name of the statement.
example: American Express
is_debit_positive:
type: boolean
description: |
Specifies the representation of the the amount in the statement, if true then the amount represented by
negative sign are credits, and if false then the amount represented by negative sign are debits.
example: true
transaction_date_column:
type: string
description: |
Specifies the header name of the transaction date column in the statement.
example: spent date
vendor_column:
type: string
description: |
Specifies the header name of the vendor column in the statement.
example: merchant
transaction_id_column:
type: string
description: |
Specifies the header name of the transaction id / unique id column in the statement.
nullable: true
example: reference number
amount_column:
type: string
description: |
Specifies the header name of the amount column in the statement.
example: amount
name:
type: string
description: |
Specifies the mapping name.
example: amex_mapping
card_number_column:
type: string
description: |
Specifies the header name of the card number column in the statement.
example: account number
foreign_amount_column:
type: string
description: |
Specifies the header name of the foreign amount column in the statement.
nullable: true
example: foreign amount
foreign_currency_column:
type: string
description: |
Specifies the header name of the foreign currency column in the statement.
nullable: true
example: foreign currency
description_column:
type: string
description: |
Specifies the header name of the description column in the statement.
nullable: true
example: description
is_auto_created:
type: boolean
description: |
Specifies if the statement mapping got auto created or not.
nullable: false
example: description
required:
- id
- org_id
- created_at
- updated_at
- bank_name
- is_debit_positive
- transaction_date_column
- transaction_id_column
- amount_column
- name
- card_number_column
- vendor_column
- foreign_amount_column
- foreign_currency_column
- description_column
- is_auto_created