diff --git a/reference/admin.yaml b/reference/admin.yaml index d02b77371..1700aab71 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -4158,7 +4158,36 @@ components: minItems: 0 maxItems: 10 items: - $ref: '#/components/schemas/location' + type: object + nullable: true + properties: + city: + type: string + nullable: true + example: London + state: + type: string + nullable: true + example: London + display: + type: string + nullable: true + country: + type: string + nullable: true + example: United Kingdom + formatted_address: + type: string + nullable: true + example: 221 Baker St, Marylebone, London, United Kingdom + latitude: + type: number + nullable: true + example: 12.971599 + longitude: + type: number + nullable: true + example: 77.594566 admin_expense_in: type: object additionalProperties: false @@ -4210,6 +4239,8 @@ components: - Admins can't assign the expense to self. source: $ref: '#/components/schemas/source' + code: + $ref: '#/components/schemas/code' merchant: $ref: '#/components/schemas/merchant' foreign_currency: @@ -4281,6 +4312,41 @@ components: List of file ids to attach to the expense.
To add new files to the expense, send the list of file ids to be attached.
To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null expenses_in: type: array additionalProperties: false @@ -12328,7 +12394,7 @@ components: - post_date_column - is_auto_created - card_network - card_transaction_from_statement_in: + preview_from_statement_in: type: object properties: id: @@ -12441,6 +12507,11 @@ components: This specifies list of statement line items which are to be created as RTF missing transactions. example: - stlisfdfadssd + statement_card_number: + type: string + description: | + Card number from statement can be passed to get transactions only from specific card + example: xxx5-4543 required: - id - statement_mapping @@ -12549,6 +12620,123 @@ components: - no_of_debit - no_of_credit - no_of_transactions + card_transaction_from_statement_in: + type: object + properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: stmtadfdsdf + statement_mapping: + type: object + properties: + description_column: + type: string + description: | + Specifies the mapping of description column on the statement + nullable: true + example: description + transaction_date_column: + type: string + description: | + Specifies the mapping of transaction date on the statement. + example: txn date + transaction_id_column: + type: string + description: | + Specifies the mapping of transaction id / unique id on the statement. + example: reference number + nullable: true + amount_column: + type: string + description: | + Specifies the mapping of amount on the statement. + example: amount + card_number_column: + type: string + description: | + Specifies the mapping of card number on the statement. + example: account number + merchant_column: + type: string + description: | + Specifies the mapping of merchant on the statement. + example: Amazon + foreign_amount_column: + type: string + description: | + Specifies the mapping of foreign amount on the statement. + example: foreign amount + nullable: true + foreign_currency_column: + type: string + description: | + Specifies the mapping of foreign currency on the statement. + example: foreign currency + nullable: true + post_date_column: + type: string + description: | + Specifies the header name of the post date column in the statement. + example: post date + nullable: true + 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 | + positive sign are debits, and if false then the amount represented by negative sign are debits. + example: true + name: + type: string + description: | + Specifies the mapping name. + example: USD + nullable: true + card_network: + type: string + description: | + Specifies the credit card network used by the card + example: VISA + nullable: true + required: + - description_column + - transaction_date_column + - transaction_id_column + - amount_column + - card_number_column + - merchant_column + - foreign_amount_column + - foreign_currency_column + - post_date_column + - bank_name + - is_debit_positive + - name + - card_network + ignored_line_item_ids: + type: array + items: + type: string + description: | + This specifies list of statement line items to be ignored in the statement. + example: + - stlisfdfadssd + rtf_missing_line_item_ids: + type: array + items: + type: string + description: | + This specifies list of statement line items which are to be created as RTF missing transactions. + example: + - stlisfdfadssd + required: + - id + - statement_mapping + - ignored_line_item_ids card_stats_out: properties: missing_transactions_count: @@ -22844,7 +23032,7 @@ paths: type: object properties: data: - $ref: '#/components/schemas/card_transaction_from_statement_in' + $ref: '#/components/schemas/preview_from_statement_in' required: - data responses: diff --git a/reference/approver.yaml b/reference/approver.yaml index c33fbb91d..fb8a1d458 100644 --- a/reference/approver.yaml +++ b/reference/approver.yaml @@ -2399,7 +2399,36 @@ components: minItems: 0 maxItems: 10 items: - $ref: '#/components/schemas/location' + type: object + nullable: true + properties: + city: + type: string + nullable: true + example: London + state: + type: string + nullable: true + example: London + display: + type: string + nullable: true + country: + type: string + nullable: true + example: United Kingdom + formatted_address: + type: string + nullable: true + example: 221 Baker St, Marylebone, London, United Kingdom + latitude: + type: number + nullable: true + example: 12.971599 + longitude: + type: number + nullable: true + example: 77.594566 custom_fields: type: array description: | @@ -2437,6 +2466,8 @@ components: example: '2020-06-01T01:18:19.292-08:00' source: $ref: '#/components/schemas/source' + code: + $ref: '#/components/schemas/code' merchant: $ref: '#/components/schemas/merchant' foreign_currency: @@ -2499,6 +2530,50 @@ components: $ref: '#/components/schemas/locations' custom_fields: $ref: '#/components/schemas/custom_fields' + file_ids: + type: array + items: + allOf: + - $ref: '#/components/schemas/fk_string' + description: | + List of file ids to attach to the expense.
+ To add new files to the expense, send the list of file ids to be attached.
+ To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null expenses_in: type: array additionalProperties: false diff --git a/reference/spender.yaml b/reference/spender.yaml index 7865e1967..66c614f64 100644 --- a/reference/spender.yaml +++ b/reference/spender.yaml @@ -2244,7 +2244,36 @@ components: minItems: 0 maxItems: 10 items: - $ref: '#/components/schemas/location' + type: object + nullable: true + properties: + city: + type: string + nullable: true + example: London + state: + type: string + nullable: true + example: London + display: + type: string + nullable: true + country: + type: string + nullable: true + example: United Kingdom + formatted_address: + type: string + nullable: true + example: 221 Baker St, Marylebone, London, United Kingdom + latitude: + type: number + nullable: true + example: 12.971599 + longitude: + type: number + nullable: true + example: 77.594566 custom_fields: type: array description: | @@ -2269,6 +2298,8 @@ components: This field is not required for creating Per Diem Expenses source: $ref: '#/components/schemas/source' + code: + $ref: '#/components/schemas/code' merchant: $ref: '#/components/schemas/merchant' foreign_currency: @@ -2379,6 +2410,41 @@ components: List of file ids to attach to the expense.
To add new files to the expense, send the list of file ids to be attached.
To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null expense_add_comment_action_in: type: object required: diff --git a/src/admin/paths/admin@statements@preview.yaml b/src/admin/paths/admin@statements@preview.yaml index 21870f56f..5a21fb962 100644 --- a/src/admin/paths/admin@statements@preview.yaml +++ b/src/admin/paths/admin@statements@preview.yaml @@ -13,7 +13,7 @@ post: type: object properties: data: - $ref: '../../components/schemas/statements.yaml#/card_transaction_from_statement_in' + $ref: '../../components/schemas/statements.yaml#/preview_from_statement_in' required: - data responses: diff --git a/src/components/schemas/expense.yaml b/src/components/schemas/expense.yaml index ae503058e..1129d7af1 100644 --- a/src/components/schemas/expense.yaml +++ b/src/components/schemas/expense.yaml @@ -750,6 +750,8 @@ spender_expense_in: This field is not required for creating Per Diem Expenses source: $ref: './fields.yaml#/source' + code: + $ref: './fields.yaml#/code' merchant: $ref: './fields.yaml#/merchant' foreign_currency: @@ -860,6 +862,41 @@ spender_expense_in: List of file ids to attach to the expense.
To add new files to the expense, send the list of file ids to be attached.
To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: './fields.yaml#/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null expenses_in: type: array @@ -932,6 +969,8 @@ admin_expense_in: - Admins can't assign the expense to self. source: $ref: './fields.yaml#/source' + code: + $ref: './fields.yaml#/code' merchant: $ref: './fields.yaml#/merchant' foreign_currency: @@ -1003,6 +1042,41 @@ admin_expense_in: List of file ids to attach to the expense.
To add new files to the expense, send the list of file ids to be attached.
To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: './fields.yaml#/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null approver_expense_in: type: object @@ -1035,6 +1109,8 @@ approver_expense_in: example: '2020-06-01T01:18:19.292-08:00' source: $ref: './fields.yaml#/source' + code: + $ref: './fields.yaml#/code' merchant: $ref: './fields.yaml#/merchant' foreign_currency: @@ -1097,6 +1173,50 @@ approver_expense_in: $ref: './fields.yaml#/locations' custom_fields: $ref: './fields.yaml#/custom_fields' + file_ids: + type: array + items: + allOf: + - $ref: './fields.yaml#/fk_string' + description: | + List of file ids to attach to the expense.
+ To add new files to the expense, send the list of file ids to be attached.
+ To remove files from the expense, send the list of all file ids except which you want to remove.
+ hotel_is_breakfast_provided: + type: boolean + nullable: true + description: | + This field is applicable for only `Hotel` category. + mileage_rate_id: + allOf: + - $ref: './fields.yaml#/fk_integer' + description: | + Specific to mileage expense. This represents the Mileage's rate id given by Fyle + during creation of mileage rate for which this expense is created. + nullable: true + example: 9080 + mileage_is_round_trip: + type: boolean + nullable: true + description: Flag stating whether this was a round trip or not. + commute_details_id: + type: integer + nullable: true + description: | + Commute details id of the expense. This id is provided by Fyle to identify a commute details. + example: 1234 + commute_deduction: + type: string + nullable: true + maxLength: 12 + description: | + Commute deduction type of the expense. + example: ONE_WAY + enum: + - ONE_WAY + - ROUND_TRIP + - NO_DEDUCTION + - null expense_out_embed: type: object diff --git a/src/components/schemas/fields.yaml b/src/components/schemas/fields.yaml index 20c781ffa..9c57a2e05 100644 --- a/src/components/schemas/fields.yaml +++ b/src/components/schemas/fields.yaml @@ -198,7 +198,36 @@ locations: minItems: 0 maxItems: 10 items: - $ref: './fields.yaml#/location' + type: object + nullable: true + properties: + city: + type: string + nullable: true + example: London + state: + type: string + nullable: true + example: London + display: + type: string + nullable: true + country: + type: string + nullable: true + example: United Kingdom + formatted_address: + type: string + nullable: true + example: '221 Baker St, Marylebone, London, United Kingdom' + latitude: + type: number + nullable: true + example: 12.971599 + longitude: + type: number + nullable: true + example: 77.594566 travel_classes: description: | diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 5a8d08b8f..2aa207e42 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -270,6 +270,129 @@ card_transaction_from_statement_in: - statement_mapping - ignored_line_item_ids +preview_from_statement_in: + type: object + properties: + id: + allOf: + - $ref: './fields.yaml#/id_string' + example: stmtadfdsdf + statement_mapping: + type: object + properties: + description_column: + type: string + description: | + Specifies the mapping of description column on the statement + nullable: true + example: description + transaction_date_column: + type: string + description: | + Specifies the mapping of transaction date on the statement. + example: txn date + transaction_id_column: + type: string + description: | + Specifies the mapping of transaction id / unique id on the statement. + example: reference number + nullable: true + amount_column: + type: string + description: | + Specifies the mapping of amount on the statement. + example: amount + card_number_column: + type: string + description: | + Specifies the mapping of card number on the statement. + example: account number + merchant_column: + type: string + description: | + Specifies the mapping of merchant on the statement. + example: Amazon + foreign_amount_column: + type: string + description: | + Specifies the mapping of foreign amount on the statement. + example: foreign amount + nullable: true + foreign_currency_column: + type: string + description: | + Specifies the mapping of foreign currency on the statement. + example: foreign currency + nullable: true + post_date_column: + type: string + description: | + Specifies the header name of the post date column in the statement. + example: post date + nullable: true + 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 | + positive sign are debits, and if false then the amount represented by negative sign are debits. + example: true + name: + type: string + description: | + Specifies the mapping name. + example: USD + nullable: true + card_network: + type: string + description: | + Specifies the credit card network used by the card + example: VISA + nullable: true + required: + - description_column + - transaction_date_column + - transaction_id_column + - amount_column + - card_number_column + - merchant_column + - foreign_amount_column + - foreign_currency_column + - post_date_column + - bank_name + - is_debit_positive + - name + - card_network + ignored_line_item_ids: + type: array + items: + type: string + description: > + This specifies list of statement line items to be ignored in the statement. + example: + - stlisfdfadssd + rtf_missing_line_item_ids: + type: array + items: + type: string + description: > + This specifies list of statement line items which are to be created as RTF missing transactions. + example: + - stlisfdfadssd + statement_card_number: + type: string + description: | + Card number from statement can be passed to get transactions only from specific card + example: xxx5-4543 + required: + - id + - statement_mapping + - ignored_line_item_ids + rtf_missing_transaction_from_statement_in: type: object properties: