From 3831350793c09d6210baa78978b01a98329e238a Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 10 May 2022 11:06:02 +0530 Subject: [PATCH 1/5] initial commit --- reference/admin.yaml | 174 +++++++++++++++++++++++++ src/admin/openapi.yaml | 5 + src/admin/paths/admin@statements.yaml | 35 +++++ src/components/schemas/statements.yaml | 130 ++++++++++++++++++ 4 files changed, 344 insertions(+) create mode 100644 src/admin/paths/admin@statements.yaml create mode 100644 src/components/schemas/statements.yaml diff --git a/reference/admin.yaml b/reference/admin.yaml index 3f491eb4e..c4dd7fd2c 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6544,6 +6544,137 @@ 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' + 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. + example: 21KB + no_of_debit: + type: integer + description: | + Number of debit transactions in the document uploaded by the user. + example: 3 + no_of_credit: + type: integer + description: | + Number of credit transactions in the document uploaded by the user. + example: 3 + no_of_transactions: + type: integer + description: | + Number of transactions in the document uploaded by the user. + example: 3 + 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 + end_date: + $ref: '#/components/schemas/timestamptz_utc' + description: | + End date of the statement period + has_statement_duplicate: + type: boolean + description: | + Determines whether the statement is completely duplicate or not. + duplicate_statement_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: + - stmtge49ielgel + has_statement_line_items_duplicate: + type: boolean + description: > + Indicates whether there are any line items in this statement are + duplicates. + 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 + unique_id: + type: string + description: | + Unique key that is used to identify the statement. + file_id: + type: string + description: | + Id of the uploaded statement. + is_ccc_created: + type: boolean + description: > + Indicates whether the corporate card transactions are created out of + the statement. + user_id: + $ref: '#/components/schemas/user_id' + statement_mappings_id: + type: string + description: | + Id of the mapping used to extract transaction from the statement. + nullable: true + required: + - id + - org_id + - created_at + - updated_at + - file_name + - file_size + - no_of_debit + - no_of_credit + - no_of_transactions + - statement_columns + - has_statement_duplicate + - has_statement_line_items_duplicate + - unique_id + - file_id + - is_ccc_created + - user_id + - start_date + - end_date + - duplicate_statement_ids + - duplicate_statement_line_items + - statement_mappings_id parameters: created_at: in: query @@ -6669,6 +6800,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: @@ -9888,3 +10023,42 @@ paths: application/json: schema: $ref: '#/components/schemas/401' + /admin/statements/upload: + 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' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' diff --git a/src/admin/openapi.yaml b/src/admin/openapi.yaml index 5b19cea88..0b3bca9e3 100644 --- a/src/admin/openapi.yaml +++ b/src/admin/openapi.yaml @@ -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. @@ -236,3 +239,5 @@ paths: $ref: paths/admin@budget_usages.yaml /admin/orgs: $ref: paths/admin@orgs.yaml + /admin/statements/upload: + $ref: paths/admin@statements.yaml \ No newline at end of file diff --git a/src/admin/paths/admin@statements.yaml b/src/admin/paths/admin@statements.yaml new file mode 100644 index 000000000..f23b9583d --- /dev/null +++ b/src/admin/paths/admin@statements.yaml @@ -0,0 +1,35 @@ +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' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' \ No newline at end of file diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml new file mode 100644 index 000000000..8511479ba --- /dev/null +++ b/src/components/schemas/statements.yaml @@ -0,0 +1,130 @@ +statements_out: + type: object + additionalProperties: False + properties: + id: + allOf: + - $ref: './fields.yaml#/id_string' + example: stmtwownwrng + org_id: + $ref: './fields.yaml#/org_id' + created_at: + $ref: './fields.yaml#/created_at' + updated_at: + $ref: './fields.yaml#/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. + example: 21KB + no_of_debit: + type: integer + description: | + Number of debit transactions in the document uploaded by the user. + example: 3 + no_of_credit: + type: integer + description: | + Number of credit transactions in the document uploaded by the user. + example: 3 + no_of_transactions: + type: integer + description: | + Number of transactions in the document uploaded by the user. + example: 3 + 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: './fields.yaml#/timestamptz_utc' + description: | + Start date of the statement period + end_date: + $ref: './fields.yaml#/timestamptz_utc' + description: | + End date of the statement period + has_statement_duplicate: + type: boolean + description: | + Determines whether the statement is completely duplicate or not. + duplicate_statement_ids: + type: array + items: + $ref: './fields.yaml#/id_string' + example: + - stmtge49ielgel + has_statement_line_items_duplicate: + type: boolean + description: | + Indicates whether there are any line items in this statement are duplicates. + duplicate_statement_line_items: + type: array + items: + type: object + properties: + ids: + type: array + items: + $ref: './fields.yaml#/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 + unique_id: + type: string + description: | + Unique key that is used to identify the statement. + file_id: + type: string + description: | + Id of the uploaded statement. + is_ccc_created: + type: boolean + description: | + Indicates whether the corporate card transactions are created out of the statement. + user_id: + $ref: './fields.yaml#/user_id' + statement_mappings_id: + type: string + description: | + Id of the mapping used to extract transaction from the statement. + nullable: true + required: + - id + - org_id + - created_at + - updated_at + - file_name + - file_size + - no_of_debit + - no_of_credit + - no_of_transactions + - statement_columns + - has_statement_duplicate + - has_statement_line_items_duplicate + - unique_id + - file_id + - is_ccc_created + - user_id + - start_date + - end_date + - duplicate_statement_ids + - duplicate_statement_line_items + - statement_mappings_id \ No newline at end of file From 27f9da60c83c0547ab5a798ac6b989ffa324c43d Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 10 May 2022 17:18:34 +0530 Subject: [PATCH 2/5] resolved minor comments --- reference/admin.yaml | 10 ++++++---- src/admin/openapi.yaml | 2 +- src/components/schemas/statements.yaml | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index c4dd7fd2c..e8fb0399e 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6592,14 +6592,17 @@ components: example: - account_number - amount + nullable: true 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_statement_duplicate: type: boolean description: | @@ -6637,10 +6640,12 @@ components: type: string description: | Unique key that is used to identify the statement. + nullable: true file_id: type: string description: | Id of the uploaded statement. + nullable: true is_ccc_created: type: boolean description: > @@ -6666,14 +6671,11 @@ components: - statement_columns - has_statement_duplicate - has_statement_line_items_duplicate - - unique_id - file_id - is_ccc_created - user_id - start_date - end_date - - duplicate_statement_ids - - duplicate_statement_line_items - statement_mappings_id parameters: created_at: @@ -10023,7 +10025,7 @@ paths: application/json: schema: $ref: '#/components/schemas/401' - /admin/statements/upload: + /admin/statements: get: tags: - Statements diff --git a/src/admin/openapi.yaml b/src/admin/openapi.yaml index 0b3bca9e3..a34aa8e7c 100644 --- a/src/admin/openapi.yaml +++ b/src/admin/openapi.yaml @@ -239,5 +239,5 @@ paths: $ref: paths/admin@budget_usages.yaml /admin/orgs: $ref: paths/admin@orgs.yaml - /admin/statements/upload: + /admin/statements: $ref: paths/admin@statements.yaml \ No newline at end of file diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 8511479ba..6b256658d 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -46,14 +46,17 @@ statements_out: example: - account_number - amount + nullable: true start_date: $ref: './fields.yaml#/timestamptz_utc' description: | Start date of the statement period + nullable: true end_date: $ref: './fields.yaml#/timestamptz_utc' description: | End date of the statement period + nullable: true has_statement_duplicate: type: boolean description: | @@ -91,10 +94,12 @@ statements_out: type: string description: | Unique key that is used to identify the statement. + nullable: true file_id: type: string description: | Id of the uploaded statement. + nullable: true is_ccc_created: type: boolean description: | @@ -119,12 +124,9 @@ statements_out: - statement_columns - has_statement_duplicate - has_statement_line_items_duplicate - - unique_id - file_id - is_ccc_created - user_id - start_date - end_date - - duplicate_statement_ids - - duplicate_statement_line_items - statement_mappings_id \ No newline at end of file From 2b03cd51a3db6f7273f5b20590bc4b106de10c91 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Wed, 25 May 2022 09:26:00 +0530 Subject: [PATCH 3/5] resolved comment --- reference/admin.yaml | 16 ++++++++-------- src/components/schemas/statements.yaml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index e8fb0399e..038b4f54a 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6583,7 +6583,7 @@ components: description: | Number of transactions in the document uploaded by the user. example: 3 - statement_columns: + all_statement_columns: type: array items: type: string @@ -6603,7 +6603,7 @@ components: description: | End date of the statement period nullable: true - has_statement_duplicate: + has_duplicate_statements: type: boolean description: | Determines whether the statement is completely duplicate or not. @@ -6613,7 +6613,7 @@ components: $ref: '#/components/schemas/id_string' example: - stmtge49ielgel - has_statement_line_items_duplicate: + has_duplicate_statement_line_items: type: boolean description: > Indicates whether there are any line items in this statement are @@ -6646,7 +6646,7 @@ components: description: | Id of the uploaded statement. nullable: true - is_ccc_created: + is_corporate_card_transactions_created: type: boolean description: > Indicates whether the corporate card transactions are created out of @@ -6668,11 +6668,11 @@ components: - no_of_debit - no_of_credit - no_of_transactions - - statement_columns - - has_statement_duplicate - - has_statement_line_items_duplicate + - all_statement_columns + - has_duplicate_statements + - has_duplicate_statement_line_items - file_id - - is_ccc_created + - is_corporate_card_transactions_created - user_id - start_date - end_date diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 6b256658d..db48d483c 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -37,7 +37,7 @@ statements_out: description: | Number of transactions in the document uploaded by the user. example: 3 - statement_columns: + all_statement_columns: type: array items: type: string @@ -57,7 +57,7 @@ statements_out: description: | End date of the statement period nullable: true - has_statement_duplicate: + has_duplicate_statements: type: boolean description: | Determines whether the statement is completely duplicate or not. @@ -67,7 +67,7 @@ statements_out: $ref: './fields.yaml#/id_string' example: - stmtge49ielgel - has_statement_line_items_duplicate: + has_duplicate_statement_line_items: type: boolean description: | Indicates whether there are any line items in this statement are duplicates. @@ -100,7 +100,7 @@ statements_out: description: | Id of the uploaded statement. nullable: true - is_ccc_created: + is_corporate_card_transactions_created: type: boolean description: | Indicates whether the corporate card transactions are created out of the statement. @@ -121,11 +121,11 @@ statements_out: - no_of_debit - no_of_credit - no_of_transactions - - statement_columns - - has_statement_duplicate - - has_statement_line_items_duplicate + - all_statement_columns + - has_duplicate_statements + - has_duplicate_statement_line_items - file_id - - is_ccc_created + - is_corporate_card_transactions_created - user_id - start_date - end_date From f1b4a8fe1aa3e0dadf5ba84334392471c1a09c04 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 7 Jun 2022 19:36:56 +0530 Subject: [PATCH 4/5] resolved comments --- reference/admin.yaml | 51 +++++++++++++++++--------- src/components/schemas/statements.yaml | 47 ++++++++++++++++-------- 2 files changed, 65 insertions(+), 33 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 038b4f54a..d08e854e2 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6554,6 +6554,8 @@ components: 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: @@ -6565,24 +6567,27 @@ components: example: amex.csv file_size: type: number - description: | - Specifies the size of file uploaded by the user. - example: 21KB + 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 document uploaded by the user. + 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 document uploaded by the user. + 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 document uploaded by the user. - example: 3 + Number of transactions in the statement uploaded by the user. + example: 6 all_statement_columns: type: array items: @@ -6592,7 +6597,7 @@ components: example: - account_number - amount - nullable: true + nullable: false start_date: $ref: '#/components/schemas/timestamptz_utc' description: | @@ -6606,18 +6611,24 @@ components: has_duplicate_statements: type: boolean description: | - Determines whether the statement is completely duplicate or not. + This specifies if the statement is completely duplicate 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 + nullable: false 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: @@ -6630,37 +6641,41 @@ components: example: - stlige49ielgel description: Ids of the current statement line items which are duplicates + nullable: false duplicate_line_item_statement_id: type: string description: | Id of the existing duplicate statement example: - stmpge49ielgel + nullable: true unique_id: type: string description: | - Unique key that is used to identify the statement. - nullable: true + Unique hash value that is used to identify the statement. + example: 74175aadf22675aa59df28b96d351cfb + nullable: false file_id: type: string description: | - Id of the uploaded statement. + File id of the uploaded statement. + example: fiit3pX9gzzP nullable: true is_corporate_card_transactions_created: type: boolean description: > Indicates whether the corporate card transactions are created out of the statement. - user_id: - $ref: '#/components/schemas/user_id' 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 @@ -6669,13 +6684,15 @@ components: - 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 - is_corporate_card_transactions_created - - user_id - - start_date - - end_date - statement_mappings_id parameters: created_at: diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index db48d483c..2f99546a5 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -8,6 +8,8 @@ statements_out: example: stmtwownwrng org_id: $ref: './fields.yaml#/org_id' + creator_user_id: + $ref: './fields.yaml#/user_id' created_at: $ref: './fields.yaml#/created_at' updated_at: @@ -20,23 +22,25 @@ statements_out: file_size: type: number description: | - Specifies the size of file uploaded by the user. - example: 21KB + 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 document uploaded by the user. + 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 document uploaded by the user. + 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 document uploaded by the user. - example: 3 + Number of transactions in the statement uploaded by the user. + example: 6 all_statement_columns: type: array items: @@ -46,7 +50,7 @@ statements_out: example: - account_number - amount - nullable: true + nullable: false start_date: $ref: './fields.yaml#/timestamptz_utc' description: | @@ -60,17 +64,22 @@ statements_out: has_duplicate_statements: type: boolean description: | - Determines whether the statement is completely duplicate or not. + This specifies if the statement is completely duplicate 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: './fields.yaml#/id_string' example: - stmtge49ielgel + nullable: false 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: @@ -84,36 +93,40 @@ statements_out: - stlige49ielgel description: Ids of the current statement line items which are duplicates + nullable: false duplicate_line_item_statement_id: type: string description: | Id of the existing duplicate statement example: - stmpge49ielgel + nullable: true unique_id: type: string description: | - Unique key that is used to identify the statement. - nullable: true + Unique hash value that is used to identify the statement. + example: 74175aadf22675aa59df28b96d351cfb + nullable: false file_id: type: string description: | - Id of the uploaded statement. + File id of the uploaded statement. + example: fiit3pX9gzzP nullable: true is_corporate_card_transactions_created: type: boolean description: | Indicates whether the corporate card transactions are created out of the statement. - user_id: - $ref: './fields.yaml#/user_id' 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 @@ -122,11 +135,13 @@ statements_out: - 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 - is_corporate_card_transactions_created - - user_id - - start_date - - end_date - statement_mappings_id \ No newline at end of file From d14f4989920539936ba78aa1b1c0f6fd5d203bd7 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 14 Jun 2022 10:11:03 +0530 Subject: [PATCH 5/5] resolved comment --- reference/admin.yaml | 19 +++++++++++-------- src/admin/paths/admin@statements.yaml | 6 ++++++ src/components/schemas/statements.yaml | 10 +++------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index d5d2199ad..da43dde97 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6918,7 +6918,6 @@ components: example: - account_number - amount - nullable: false start_date: $ref: '#/components/schemas/timestamptz_utc' description: | @@ -6931,8 +6930,9 @@ components: nullable: true has_duplicate_statements: type: boolean - description: | - This specifies if the statement is completely duplicate or not. + description: > + This specifies if the statement is complete duplicate of already + uploaded statement or not. nullable: true duplicate_statement_ids: type: array @@ -6943,7 +6943,6 @@ components: $ref: '#/components/schemas/id_string' example: - stmtge49ielgel - nullable: false has_duplicate_statement_line_items: type: boolean description: > @@ -6962,7 +6961,6 @@ components: example: - stlige49ielgel description: Ids of the current statement line items which are duplicates - nullable: false duplicate_line_item_statement_id: type: string description: | @@ -6975,14 +6973,13 @@ components: description: | Unique hash value that is used to identify the statement. example: 74175aadf22675aa59df28b96d351cfb - nullable: false file_id: type: string description: | File id of the uploaded statement. example: fiit3pX9gzzP nullable: true - is_corporate_card_transactions_created: + are_corporate_card_transactions_created: type: boolean description: > Indicates whether the corporate card transactions are created out of @@ -7013,7 +7010,7 @@ components: - duplicate_statement_line_items - unique_id - file_id - - is_corporate_card_transactions_created + - are_corporate_card_transactions_created - statement_mappings_id parameters: created_at: @@ -10731,6 +10728,12 @@ paths: 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: diff --git a/src/admin/paths/admin@statements.yaml b/src/admin/paths/admin@statements.yaml index f23b9583d..67ae9c7a9 100644 --- a/src/admin/paths/admin@statements.yaml +++ b/src/admin/paths/admin@statements.yaml @@ -27,6 +27,12 @@ get: 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: diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 2f99546a5..6b10f58b0 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -50,7 +50,6 @@ statements_out: example: - account_number - amount - nullable: false start_date: $ref: './fields.yaml#/timestamptz_utc' description: | @@ -64,7 +63,7 @@ statements_out: has_duplicate_statements: type: boolean description: | - This specifies if the statement is completely duplicate or not. + This specifies if the statement is complete duplicate of already uploaded statement or not. nullable: true duplicate_statement_ids: type: array @@ -74,7 +73,6 @@ statements_out: $ref: './fields.yaml#/id_string' example: - stmtge49ielgel - nullable: false has_duplicate_statement_line_items: type: boolean description: | @@ -93,7 +91,6 @@ statements_out: - stlige49ielgel description: Ids of the current statement line items which are duplicates - nullable: false duplicate_line_item_statement_id: type: string description: | @@ -106,14 +103,13 @@ statements_out: description: | Unique hash value that is used to identify the statement. example: 74175aadf22675aa59df28b96d351cfb - nullable: false file_id: type: string description: | File id of the uploaded statement. example: fiit3pX9gzzP nullable: true - is_corporate_card_transactions_created: + are_corporate_card_transactions_created: type: boolean description: | Indicates whether the corporate card transactions are created out of the statement. @@ -143,5 +139,5 @@ statements_out: - duplicate_statement_line_items - unique_id - file_id - - is_corporate_card_transactions_created + - are_corporate_card_transactions_created - statement_mappings_id \ No newline at end of file