diff --git a/reference/admin.yaml b/reference/admin.yaml index 9f941060f..222a38b52 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -2,8 +2,9 @@ openapi: 3.0.3 info: version: '1.0' title: Admin APIs - description: | - These APIs are generally used to integrate Fyle with accounting or HRMS systems. + description: > + These APIs are generally used to integrate Fyle with accounting or HRMS + systems. contact: name: Platform Beta email: support@fylehq.com @@ -12,11878 +13,392 @@ servers: description: US Region Server - url: https://in1.fylehq.com/platform/v1 description: India Region Server -tags: - - name: Accounting Exports - description: | - This API allows you to record export of Fyle resources to an external accounting exports - - name: Accounts - description: | - This APIs gives access to your Employees's accounts data. - - name: Advances - description: | - This API gives you access to manage your organisation's Advances data. - - name: Automations - description: | - This API gives you access to automate your organisation's manual work. - - name: Budgets - description: | - This API gives you access to Budgets. - - name: Categories - description: | - These APIs gives you access to manage your organisation's Categories - - name: Corporate Cards - description: | - This API gives you access to manage your organisation's Corporate Cards data. - - name: Corporate Card Transactions - description: | - This API gives you access to manage your organisation's Corporate Card Transaction data. - - name: Cost Centers - description: | - These APIs gives you access to manage your organisation's Cost Centers data. - - name: Departments - description: | - These APIs gives you access to manage your organisation's Departments - - name: Employees - description: | - These APIs gives you access to manage your organisation's Employees - - name: Expenses - description: | - This API gives you access to your organisation's Expenses - - name: Expense Policies - description: | - This API gives you access to your organisation's Expense Policies - - name: Expense Rules - description: | - This API gives you access to your organisation's Expense Rules - - name: Files - description: | - This API gives you access to creates a file in Fyle - - name: Levels - description: | - These APIs gives you access to manage your organisation's Employee levels. - - name: Mileage Rates - description: | - These APIs gives you access to manage your organisation's Mileage Rates - - name: Per Diem Rates - description: | - These APIs gives you access to manage your organisation's Per Diem Rates - - name: Projects - description: | - These APIs gives you access to manage your organisation's Projects - - name: Reimbursements - description: | - These APIs gives you access to manage your organisation's Reimbursements - data - - name: Reminders - description: | - These APIs gives you access to manage your organisation's Reminders data - - name: Reports - description: | - These APIs gives you access to manage your organisation's Reports data - - name: Schedules - description: | - This API gives you access to manage Scheduled jobs. - - name: Settlements - description: | - This API gives you access to manage your organisation's Settlements data. - - name: Tax Groups - description: | - These APIs gives you access to manage your organisation's Tax Groups data. - - 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: Statement mappings - description: | - These APIs gives you access to manage statement mappings which is used for statement uploads. - - name: Feature Configs - description: | - These APIs gives you access to manage feature configs. - - name: Merchants - description: | - This API gives you access to merchants, primarily to help with autocomplete. - - name: Reconciliation - description: | - These APIs give you access to view reconciliation entries for corporate card statement reconciliations. - - name: Expense Policy Comments - description: | - This API gives you access to manage expense policy comments. -paths: - /admin/projects: - get: - tags: - - Projects - summary: List projects - operationId: projects_list +components: + securitySchemes: + oauth2: + type: oauth2 + flows: + authorizationCode: + authorizationUrl: https://app.fylehq.com/app/developers/#/oauth/authorize + tokenUrl: https://accounts.fylehq.com/oauth/token + scopes: + '*': Grant all actions + schemas: + '202': + type: object + properties: + message: + type: string + description: > + Request has been accepted and is being processed, Please try again + in sometime. + '400': + type: object + properties: + message: + type: string + nullable: true + description: | + Message describing why the request is invalid + '401': + type: object + properties: + message: + enum: + - invalid token + type: string + description: > + This error means that the input access token is either not issued by + Fyle or has expired. + + You need to generate a new access token. + '403': + type: object + properties: + message: + enum: + - Forbidden + type: string + description: > + This error means current user does not have enough permissions to + perform this operation. + '404': + type: object + properties: + message: + enum: + - Resource not found + type: string + description: > + This error means the requested resource was not found or the + requester doesn't have sufficient access. + '500': + type: object + properties: + message: + type: string + description: > + API server hit an internal error and could not process request. This + is likely a bug. + ExpenseActionDeleteId: + type: object + properties: + id: + type: string + description: The unique identifier of the expense to be deleted. + example: txm3L9soGEt2 + required: + - id + count: + type: integer 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/admin_approver_project_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' - post: - operationId: projects_post - tags: - - Projects - summary: Create or update a project + The total number of objects that can be requested. + example: 10000 + offset: + description: > + offset is used to skip that many number of objects before counting.
+ + For example, if there are 2000 objects,
+ + The first request will have offset as 0 and limit as 200 to return first + 200 objects.
+ + The second request will have offset as 200 and limit as 200 to return + next 200 objects.
+ type: integer + example: 10 + id_integer: + type: integer description: | - Create or update a project. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/project_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_approver_project_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/projects/bulk: - post: - operationId: projects_bulk_post - tags: - - Projects - summary: Create or update projects in bulk + This id is provided by Fyle to identify an object. + example: 1234 + org_id: + type: string description: | - Create or update projects in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/project_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/projects/delete/bulk: - post: - tags: - - Projects - summary: Deletes projects + The unique id of the Organization to which the object is associated. + readOnly: true + example: orwruogwnngg + created_at: + type: string + format: date-time + description: > + Signifies when this object was created in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + example: '2020-06-01T13:14:54.804+00:00' + updated_at: + type: string + format: date-time + description: > + Signifies when this object was updated in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + example: '2020-06-11T13:14:55.201598+00:00' + code: + type: string + nullable: true + maxLength: 255 + description: > + This represents a code that is typically used for syncing with other + systems. + example: C1234 + description: + type: string + nullable: true + maxLength: 255 description: | - Deletes unused projects. If any of the project in input is used in other resources then validation error is raised. - operationId: projects_delete_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/project_in_only_id' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - '400': - description: Bad request - content: - application/json: - schema: - type: object - properties: - message: - type: string - nullable: true - example: | - Can not delete project(s) used in other resources like expense, expense policy, expense rules, budgets, dependent fields. - data: - type: object - example: null - error: - type: string - example: InvalidUsage - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/projects/delete_summary/bulk: - post: - tags: - - Projects - summary: Create delete summary for projects + This represents the description of the resource. + example: Win the trophy + is_enabled: + type: boolean + description: > + This indicates if the resource is enabled for use within the + organisation. + example: true + restricted_spender_user_ids: + type: array + nullable: true + items: + type: string + nullable: true + maxLength: 15 + description: | + This id is provided by Fyle to identify an object. + example: uswoirwlwwg + example: + - uswoirwlwwg + - uswlgwkgw42 description: | - Delete summary tells that how many projects could be deleted from given projects, it also - returns projects that could be deleted. - operationId: projects_delete_summary_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/project_in_only_id' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/project_delete_summary_out' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/cost_centers: - get: - operationId: cost_centers_list - tags: - - Cost Centers - summary: List cost centers + List of IDs of users who can access this object. + approver_user_ids: + type: array + nullable: false + maxItems: 2 + items: + type: string + nullable: true + maxLength: 15 + description: | + This id is provided by Fyle to identify an object. + example: uswoirwlwwg + example: + - uswoirwlwwg + - uswlgwkgw42 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/admin_cost_center_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - post: - operationId: cost_centers_post - tags: - - Cost Centers - summary: Create or update a cost center + List of IDs of users who are approvers of the project. + id_string: + type: string + maxLength: 15 description: | - Create or update a cost center. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/cost_center_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_cost_center_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/cost_centers/bulk: - post: - operationId: cost_centers_bulk_post - tags: - - Cost Centers - summary: Create or update cost centers in bulk - description: | - Create or update cost centers in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/cost_center_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/categories: - get: - tags: - - Categories - summary: List categories - operationId: categories_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/admin_approver_category_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' - post: - tags: - - Categories - summary: Create or update a category - description: | - Create or update a category. - operationId: categories_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/category_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_approver_category_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/categories/bulk: - post: - tags: - - Categories - summary: Create or update categories in bulk - description: | - Create or update categories in bulk. - operationId: categories_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/category_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: string - nullable: true - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/categories/delete/bulk: - post: - tags: - - Categories - summary: Deletes categories - description: | - Deletes unused categories. If any of the category in input is used in other resources or it is a mileage/per diem - category then validation error is raised. - operationId: categories_delete_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/category_in_only_id' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - '400': - description: Bad request - content: - application/json: - schema: - type: object - properties: - message: - type: string - nullable: true - example: | - Can not delete per diem and mileage categorie(s) or categorie(s) used in other resources like expense, expense policy, expense rules, budgets. - data: - type: object - example: null - error: - type: string - example: InvalidUsage - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/categories/delete_summary/bulk: - post: - tags: - - Categories - summary: Create delete summary for categories - description: | - Delete summary tells that how many categories could be deleted from given categories, it also - returns categories that could be deleted. - operationId: categories_delete_summary_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/category_in_only_id' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/category_delete_summary_out' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/categories/system_categories: - get: - tags: - - Categories - summary: List system categories - operationId: system_categories_list - description: | - This APIs gives you the list of system categories. Note that this API does not support any query params like order, limit, offset or name. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - data: - type: array - items: - $ref: '#/components/schemas/system_category_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' - /admin/expense_fields: - get: - tags: - - Expenses - summary: List expense fields - operationId: expense_fields_list - 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) - 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/expense_field_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' - post: - tags: - - Expenses - summary: Create or update an expense fields - operationId: expense_fields_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_field_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - url: - type: string - data: - $ref: '#/components/schemas/expense_field_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/dependent_expense_field_values: - get: - tags: - - Expenses - summary: List dependent expense field values - operationId: dependent_expense_field_values_list - 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) - parameters: - - in: query - name: limit - description: | - A limit on the number of objects to be returned. Allowed values are from 1 to 200. - schema: - type: integer - example: 10 - default: 100 - maximum: 200 - - in: query - name: is_enabled - schema: - type: string - default: eq.true - - in: query - name: parent_expense_field_id - required: true - schema: - type: string - example: eq.123 - - in: query - name: expense_field_id - required: true - schema: - type: string - example: eq.123 - - in: query - name: parent_expense_field_value - required: true - schema: - type: string - example: ilike.abc% - - in: query - name: expense_field_value - schema: - type: string - example: ilike.abc% - 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/dependent_expense_field_values_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' - /admin/dependent_expense_field_values/bulk: - post: - tags: - - Expenses - summary: Create or update dependent expense field values - operationId: dependent_expense_field_values_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/dependent_expense_field_values_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/dependent_expense_field_values/preview: - get: - tags: - - Expenses - summary: List dependent expense field values preview - operationId: dependent_expense_field_values_preview_list - 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) - parameters: - - in: query - name: limit - description: | - A limit on the number of objects to be returned. Allowed values are from 1 to 10. - schema: - type: integer - example: 10 - default: 10 - maximum: 10 - - in: query - name: parent_expense_field_id - required: true - schema: - type: string - example: eq.123 - - in: query - name: expense_field_id - required: true - schema: - type: string - example: eq.123 - - in: query - name: parent_expense_field_value - required: true - schema: - type: string - example: ilike.abc% - 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/dependent_expense_field_values_preview_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' - /admin/dependent_expense_field_values/uploads: - get: - tags: - - Expenses - summary: List dependent expense field values upload requests - operationId: dependent_expense_field_values_uploads_list - 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) - 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/dependent_expense_field_values_upload_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' - post: - tags: - - Expenses - summary: Create an upload excel file request for dependent expense field values - description: | - Create a request to upload excel file containing dependent expense field values mappings - operationId: dependent_expense_field_values_uploads_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/dependent_expense_field_values_upload_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/dependent_expense_field_values_upload_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/dependent_expense_field_values/downloads: - get: - tags: - - Expenses - summary: List dependent expense field values download requests - operationId: dependent_expense_field_values_downloads_list - 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) - 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/dependent_expense_field_values_download_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' - post: - tags: - - Expenses - summary: Create a request to download an excel file for dependent expense field values - description: | - Create a request to download an excel file containing dependent expense field values mappings - operationId: dependent_expense_field_values_downloads_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/dependent_expense_field_values_download_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/dependent_expense_field_values_download_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employee_fields: - get: - tags: - - Employees - summary: List employee fields - operationId: employee_fields_list - 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) - 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/employee_field_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' - post: - tags: - - Employees - summary: Create or update an employee fields - operationId: employee_fields_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employee_field_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - url: - type: string - data: - $ref: '#/components/schemas/employee_field_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/per_diem_rates: - get: - tags: - - Per Diem Rates - summary: List per diem rates - operationId: per_diem_rates_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/per_diem_rate_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' - post: - operationId: per_diem_rates_post - tags: - - Per Diem Rates - summary: Create or update a per_diem_rate - description: | - Create or update a per_diem_rate - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/per_diem_rate_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/per_diem_rate_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/per_diem_rates/bulk: - post: - operationId: per_diem_rates_bulk_post - tags: - - Per Diem Rates - summary: Create or update a per_diem_rates in bulk. - description: | - Create or update a per_diem_rates in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/per_diem_rate_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/departments: - get: - tags: - - Departments - summary: List departments - operationId: departments_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/department_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' - post: - operationId: departments_post - tags: - - Departments - summary: Create or update a department - description: | - Create or update a department. - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/department_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/department_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/mileage_rates: - get: - tags: - - Mileage Rates - summary: List mileage rates - operationId: mileage_rates_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/mileage_rate_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' - post: - tags: - - Mileage Rates - summary: Create or update a mileage rate - description: | - Create or update a mileage rate. - operationId: mileage_rates_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/mileage_rate_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/mileage_rate_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/levels: - get: - tags: - - Levels - summary: List Levels - operationId: levels_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/level_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' - post: - operationId: levels_post - tags: - - Levels - summary: Create or update a level - description: | - Create or update a level. - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/level_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/level_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employees: - get: - tags: - - Employees - summary: List employees - operationId: employees_list - 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) - parameters: - - $ref: '#/components/parameters/q' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/employee_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' - /admin/employees/potential_duplicate_expenses: - get: - tags: - - Employees - summary: List employees and potential duplicate expenses - operationId: employees_and_potential_duplicate_expenses_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/employee_out_potential_duplicate_expenses' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/employees/business_units: - get: - tags: - - Employees - summary: List employees business units - operationId: employees_business_units_list - description: | - This API returns the list of business units of employees based on the query parameters. - parameters: - - $ref: '#/components/parameters/q' - - $ref: '#/components/parameters/limit' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - business_units: - type: array - items: - type: string - example: - - Marketing - - Management - description: | - List of business units of the employees based on the query parameters. - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/employees/exports: - post: - tags: - - Employees - summary: | - Export employees data in the specified format with customizable columns and notification options - description: | - Create Employees Export Request. - operationId: employees_exports_create - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employees_exports_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employees_exports_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/employees/titles: - get: - tags: - - Employees - summary: List employees titles - operationId: employees_titles_list - description: | - This API returns the list of titles of employees based on the query parameters. - parameters: - - $ref: '#/components/parameters/q' - - $ref: '#/components/parameters/limit' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - titles: - type: array - items: - type: string - example: - - Branch Manager - - Branch Head - description: | - List of titles of the employees based on the query parameters. - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/employees/locations: - get: - tags: - - Employees - summary: List employees locations - operationId: employees_locations_list - description: | - This API returns the list of locations of employees based on the query parameters. - parameters: - - $ref: '#/components/parameters/q' - - $ref: '#/components/parameters/limit' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - locations: - type: array - items: - type: string - example: - - India - - Indonesia - description: | - List of locations of the employees based on the query parameters. - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/employees/invite/bulk: - post: - tags: - - Employees - summary: Create or update employees - description: | - Create or update employees - operationId: invitations_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/invitation_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/employees/reinvite/bulk: - post: - tags: - - Employees - summary: Reinvite employees - description: | - Reinvite employees - operationId: reinvitations_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/reinvitation_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/employees/filters: - post: - tags: - - Employees - summary: Create Employees saved filters - description: | - Save employees filters for personal use or share with other admins. - operationId: employees_filters_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employee_filters_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employee_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Employees - summary: List Employees saved filters - operationId: employees_filters_get - description: | - List filters saved by the admin or shared with the admin. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/employee_filters_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' - /admin/employees/filters/delete: - post: - tags: - - Employees - summary: Delete Employees saved filter - description: | - Delete Employees saved filter having the provided id. - operationId: employees_filters_post_action_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employee_filters_delete_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employee_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employees/uploads: - get: - tags: - - Employees - summary: List Employees upload requests - operationId: employees_upload_list - description: | - You can check the status of the Employees upload requests.
- 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) - 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/employees_upload_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' - post: - tags: - - Employees - summary: Upload Employees data via excel file. - description: | - Upload Employees data via excel file to Fyle system. - operationId: employees_upload_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employees_upload_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employees_upload_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employees/downloads: - get: - tags: - - Employees - summary: List Employees download requests - operationId: employees_download_list - description: | - Check the status of the Employees download requests. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/employees_download_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' - post: - tags: - - Employees - summary: Create a request to download an excel file for employees - description: | - Create a request to download an excel file containing employees columns. - operationId: employees_download_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: object - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/employees_download_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employees/summaries: - get: - tags: - - Employees - summary: List employee summaries - operationId: employee_summaries_list - 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) - parameters: - - $ref: '#/components/parameters/q' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/employee_summary_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' - /admin/files: - post: - operationId: files_post - tags: - - Files - summary: Create a file - description: | - Create a file. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/admin_file_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/file_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/files/bulk: - post: - operationId: files_post_bulk - tags: - - Files - summary: Bulk create files - description: | - Create files in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/admin_file_in' - additionalProperties: false - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/file_out' - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/files/generate_urls/bulk: - post: - operationId: files_generate_urls_bulk_post - tags: - - Files - summary: Bulk generate download and upload URLs - description: | - Once a file is created, its contents may need to be uploaded (or downloaded). To upload (or download) contents, you'll - need to generate a temporary signed URL. This API accomplishes that. The signed URL is valid for 5 mins. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/file_generate_urls_action_in' - example: - - id: fi123819sa - - id: fi876833tu - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/file_generate_urls_action_out' - example: - - id: sdfd2391 - name: uber_expenses_vmrpw.pdf - content_type: application/pdf - download_url: https://aaa.bbb.cc/x232sds - upload_url: https://aaa.bbb.cc/x232sds - - id: sdfd2392 - name: lyft_expenses_vmrpw.pdf - content_type: application/pdf - download_url: https://aaa.bbb.cc/x22ddsds - upload_url: https://aaa.bbb.cc/x2sdssds - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/files/delete/bulk: - post: - operationId: files_delete - tags: - - Files - summary: Delete files bulk - description: | - Delete files bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/file_delete_action_in' - example: - - id: fi123819sa - - id: fi876833tu - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/files/download: - get: - operationId: files_download_get - tags: - - Files - summary: Download a file - description: | - Generates a download URL for a file and redirects client to that URL. - parameters: - - in: query - name: id - required: true - schema: - type: string - example: fiNhunGsCQJb - responses: - '302': - description: Redirect to file download URL - headers: - Location: - schema: - type: string - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/automations/report_submissions: - post: - tags: - - Automations - summary: Create or update Report Submission Automations - description: | - Create or update Report Submission Automations - operationId: report_submission_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/automate_report_submission_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/automate_report_submission_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - get: - tags: - - Automations - summary: List Report Submission Automations - operationId: report_submission_get - description: | - List Report Submission Automations - 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/automate_report_submission_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' - /admin/automations/report_submissions/delete: - post: - tags: - - Automations - summary: Delete Report Submission Automation - description: | - Delete Report Submission Automation - operationId: report_submission_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/delete_automate_report_submission_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/automate_report_submission_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/accounting_exports: - get: - tags: - - Accounting Exports - summary: List accounting exports - 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: accounting_exports_list - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/accounting_export_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' - post: - tags: - - Accounting Exports - summary: Create or update an accounting export - operationId: accounting_export_post - description: | - Create or update an accounting export. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/accounting_export_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/accounting_export_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/accounting_export_lineitems: - get: - tags: - - Accounting Exports - summary: List accounting exports lineitems - 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: accounting_export_lineitems_list - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/accounting_export_lineitem_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' - post: - operationId: accounting_export_lineitems_post - tags: - - Accounting Exports - summary: Create or update an accounting export lineitem - description: | - Create or update an accounting export lineitem. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/accounting_export_lineitem_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/accounting_export_lineitem_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/accounting_export_lineitems/bulk: - post: - operationId: accounting_export_lineitems_bulk_post - tags: - - Accounting Exports - summary: Create or update accounting export lineitems in bulk - description: | - Create or update accounting export lineitems in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/accounting_export_lineitem_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses: - get: - tags: - - Expenses - summary: List expenses - description: | - This API gets you expenses submitted by any employee in the current organization. - - 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: expenses_list - 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/expense_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' - post: - tags: - - Expenses - summary: Create or update an expense - description: | - Create or update an expense. - operationId: expenses_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_expense_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/attach_files/bulk: - post: - tags: - - Expenses - summary: Attach files to an expense in bulk - description: | - This API attaches files to an expense in bulk - operationId: attach_files_to_expense_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/attach_files_to_expense_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/accounting_export_summary/bulk: - post: - operationId: expenses_accounting_export_summary_bulk_post - tags: - - Expenses - summary: Create or update accounting export summary in bulk - description: | - Create or update accounting export summary in bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/accounting_export_summary_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses/filters: - post: - tags: - - Expenses - summary: Create Expenses saved filters - description: | - Save expenses filters for personal use or share with other admins. - operationId: expenses_filters_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_filters_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Expenses - summary: List Expenses saved filters - operationId: expenses_filters_get - description: | - List filters saved by the admin or shared with the admin. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/expense_filters_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' - /admin/expenses/filters/delete: - post: - tags: - - Expenses - summary: Delete Expenses saved filter - description: | - Delete Expenses saved filter having the provided id. - operationId: expenses_filters_post_action_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_filters_delete_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/verify/bulk: - post: - tags: - - Expenses - - Verify - - Verify expenses - - Bulk - summary: Verify expenses in bulk - description: | - Verify expenses in bulk. - operationId: expenses_verify_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/expenses_verify_bulk_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/stats: - post: - tags: - - Expenses - summary: Expenses Stats - description: | - Expenses Stats - operationId: expenses_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expenses_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expenses_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/exports: - post: - tags: - - Expenses - summary: Create Expenses Export - description: | - Create Expenses Export Request. - operationId: expenses_exports_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expenses_exports_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expenses_exports_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses/permissions: - post: - tags: - - Expenses - - Expense permissions - - Permissions - summary: Expense Permissions - description: | - Expense Permissions for the user - operationId: expense_permissions - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_permissions_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expense_permissions_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/merge: - post: - tags: - - Expenses - summary: Merge expenses - description: | - Merge expenses. - operationId: merge_expenses_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expenses_merge_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests: - get: - tags: - - Advances - summary: List advance requests - 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: advance_requests_list - 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/advance_request_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - post: - tags: - - Advances - summary: Update an advance request - description: | - Update an advance requests. - operationId: advance_requests_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_request_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/stats: - post: - tags: - - Advances - summary: Advances Requests Stats - description: | - Advances Requests Stats - operationId: advance_requests_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_requests_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_requests_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/permissions: - post: - tags: - - Advances - summary: Advance Request Permissions - description: | - Returns a list of all possible actions that can be performed on an advance request by the current user. - operationId: advance_requests_permissions_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_request_permissions_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_request_permissions_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/comments: - post: - summary: Add comment to advance request - operationId: advance_requests_comments_post - description: | - This API allows admins to add comments to an advance request. - tags: - - Advances - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_comments_in' - responses: - '200': - description: Comment added successfully - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_comments_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/remove_approver: - post: - summary: Remove approver from advance request - operationId: advance_requests_remove_approver_post - description: | - This API allows admins to disable/remove an approver from an advance request. - tags: - - Advances - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_remove_approver_in' - example: - data: - id: areq5F9xIaMURI - approver_email: approver@example.com - responses: - '200': - description: Approver removed successfully and returns the updated advance request - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - /admin/advances: - get: - tags: - - Advances - summary: List advances - operationId: advances_list - 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) - 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/advance_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - post: - tags: - - Advances - summary: Create advances - description: | - Create advances. - operationId: advances_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advances/bulk: - post: - tags: - - Advances - summary: Create advances in bulk - description: | - Create advances in bulk. - operationId: advances_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/advance_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/advances/stats: - post: - tags: - - Advances - summary: Advances Stats - description: | - Advances Stats - operationId: advances_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advances_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advances_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_wallets: - get: - tags: - - Advances - summary: List advance wallets - operationId: advance_wallets_list - 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) - 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/advance_wallet_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - post: - tags: - - Advance wallets - summary: Create advance wallets - description: | - Create advance wallets. - operationId: advance_wallets_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_wallet_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_wallet_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_refunds: - get: - tags: - - Advances - summary: List advance refunds - 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: advance_refunds_list - 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/advance_refund_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - post: - tags: - - Advances - summary: Create an advance refund - description: | - Create an advance refund. - operationId: advance_refunds_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_refund_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_refund_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_refunds/bulk: - post: - tags: - - Advances - summary: Create advance refund in bulk - description: | - Create advance refund in bulk. - operationId: advance_refunds_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/advance_refund_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/advance_refunds/stats: - post: - tags: - - Advances - summary: Advances Refunds Stats - description: | - Advances Refunds Stats - operationId: advance_refunds_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_refunds_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_refunds_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reminders: - get: - tags: - - Reminders - summary: List Reminders - operationId: reminders_list - 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) - 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/reminder_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' - post: - operationId: reminders_post - tags: - - Reminders - summary: Create or update a reminder - description: | - Create or update a reminder. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/reminder_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/reminder_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reminders/delete: - post: - tags: - - Reminders - summary: Delete a reminder - description: | - Delete a reminder. - operationId: reminders_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/reminder_delete_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/reminder_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports: - get: - tags: - - Reports - summary: List reports - operationId: reports_list - 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) - parameters: - - $ref: '#/components/parameters/q' - 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/admin_report_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' - post: - tags: - - Reports - summary: Update Purpose - operationId: update_purpose - description: | - This API is used to update the the purpose of an report by Admin. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/admin_report_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/admin_report_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reports/eject_expenses: - post: - tags: - - Reports - summary: Eject expenses from a report - description: Eject expenses from a report - operationId: report_eject_expenses_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/report_action_with_expenses_ids_to_eject' - reason: - type: string - description: | - Reason for ejecting the expense \ - Note: When ejecting own expense, reason is not required. However, if another spender's expense are ejected reason is mandatory. - example: All bills are in order - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_report_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/filters: - post: - tags: - - Reports - summary: Create Report saved filters - description: | - Save report filters for personal use or share them among other admins. - operationId: report_filters_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/report_filters_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/report_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Reports - summary: List Report saved filters - operationId: report_filters_get - description: | - List filters saved by the admin or share them among other admins. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/report_filters_out' - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/reports/filters/delete: - post: - tags: - - Reports - summary: Delete Report saved filter - description: | - Delete Report saved filter having the provided id. - operationId: report_filters_post_action_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/report_filters_delete_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/report_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/comments: - post: - tags: - - Reports - summary: Comments on a report - description: Comments on a report - operationId: report_comments_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/report_comments_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/report_comments_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/add_approver: - post: - tags: - - Reports - summary: Add Approver - description: | - Add Approver to the report - operationId: report_add_approver - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/add_approver_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_report_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/remove_approver: - post: - tags: - - Reports - summary: Remove an approver from a report - description: | - Remove an approver from a report using their email. - operationId: report_approvers_remove - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/report_action_remove_approver_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_report_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reports/approve/bulk: - post: - tags: - - Reports - summary: Admin approve reports in bulk - description: | - Admin approve reports in bulk - operationId: report_admin_approve - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/report_action_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/send_back: - post: - tags: - - Reports - summary: Send back report - description: | - Send back report to the employee - operationId: report_send_back - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/send_back_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_report_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/process_ach/bulk: - post: - tags: - - Reports - summary: Process ACH - description: | - Process ACH - operationId: reports_process_ach - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/process_ach_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/mark_paid/bulk: - post: - tags: - - Reports - summary: Mark reports as Paid - description: | - Mark reports as Paid. - operationId: reports_mark_paid - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/mark_paid_bulk_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/process_manual/bulk: - post: - tags: - - Reports - summary: Process Manual - description: | - Process reports manually - operationId: reports_process_manual - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/process_manual_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/process_summary/bulk: - post: - tags: - - Reports - summary: Reimbursable amount summary - description: | - Reimbursable amount summary - operationId: reports_process_summary - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/process_summary_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/process_summary_out' - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/accounting_export_summary/bulk: - post: - tags: - - Reports - summary: Update accounting export summary and initiate export - description: | - Update accounting export summary and initiate export - operationId: reports_accounting_export_summary_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/report_accounting_export_summary_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/stats: - post: - tags: - - Reports - summary: Reports Stats - description: | - Reports Stats - operationId: reports_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/reports_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/reports_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/create_and_submit: - post: - tags: - - Reports - summary: Create and submit reports for employees - description: Create and submit reports for employees - operationId: report_create_and_submit - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/report_create_and_submit_expenses' - responses: - '200': - description: OK - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/permissions: - post: - tags: - - Reports - summary: Reports Permissions - description: | - Reports Permissions for a user - operationId: reports_permissions - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/report_permissions_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/report_permissions_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/apply_advance_wallets: - post: - tags: - - Reports - summary: Settle report with advance wallets - description: Settle report with advance wallets - operationId: report_apply_advance_wallets - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/apply_advance_wallets_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_report_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/remove_advance_wallets: - post: - tags: - - Reports - summary: Undo settling of report with advance wallets - description: | - This will undo the settling of the report with advance wallets - operationId: report_remove_advance_wallets - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/remove_advance_wallets_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_report_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/reports/round_off_amount: - post: - tags: - - Reports - summary: Round off report amount - description: | - Round off report amount. This API first rounds of expenses and then rounds off the total amount of the report. - operationId: report_round_off_amount - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/round_off_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_report_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reports/exports: - get: - tags: - - Reports - summary: Get Reports Export - description: | - Get reports export request details. 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: reports_exports_get - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/reports_exports_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' - post: - tags: - - Reports - summary: Create Reports Export - description: | - Create Reports Export Request. - operationId: reports_exports_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/reports_exports_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/reports_exports_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_cards: - get: - tags: - - Corporate Cards - summary: List corporate cards - 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: corporate_cards_list - parameters: - - $ref: '#/components/parameters/q' - - $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/corporate_card_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' - post: - tags: - - Corporate Cards - summary: Create or update an corporate card - description: | - Create or update an corporate card. - operationId: corporate_cards_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_cards/bulk: - post: - tags: - - Corporate Cards - summary: Create or update corporate cards in bulk - description: | - Create or update corporate cards in bulk - operationId: corporate_cards_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_cards/bank_names: - get: - tags: - - Corporate Cards - summary: List corporate card bank names - description: | - This API just returns all the bank names associated with the corporate cards in the org - operationId: corporate_cards_bank_names_list - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - bank_names: - type: array - items: - type: string - example: - - Amex - - Bank of America - description: | - Holds the bank names of all the corporate cards present in the org - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/corporate_cards/masked_card_numbers: - get: - tags: - - Corporate Cards - summary: List corporate card masked card numbers - description: | - This API just returns all the masked card numbers (last 4 digits) associated with the corporate cards in the org, based on the query parameters. - operationId: corporate_cards_masked_card_numbers_list - parameters: - - $ref: '#/components/parameters/q_integer' - - $ref: '#/components/parameters/limit' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - masked_card_numbers: - type: array - items: - type: string - example: - - 1234 - - 5678 - description: | - Holds the masked card numbers (last 4 digits) of all the corporate cards present in the org. - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/corporate_cards/stats: - post: - tags: - - Corporate Cards - summary: Corporate Cards Stats - description: | - Stats for Corporate Cards - operationId: corporate_cards_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/corporate_card_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_cards/assign: - post: - tags: - - Corporate Cards - summary: Assign corporate card to user - description: | - Assign a corporate card to a user - operationId: corporate_cards_assign - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_assign_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_cards/unassign: - post: - tags: - - Corporate Cards - summary: Unassign corporate card from user - description: | - Unassign a corporate card from a user - operationId: corporate_cards_unassign - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_id_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_unassign_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_cards/reassign: - post: - tags: - - Corporate Cards - summary: Reassign corporate card to another user - description: | - Reassign a corporate card to another user - operationId: corporate_cards_reassign - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_reassign_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_cards/delete: - post: - tags: - - Corporate Cards - summary: Delete corporate card - description: | - Delete a corporate card and all its associated transactions - operationId: corporate_cards_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_id_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions: - get: - tags: - - Corporate Card Transactions - summary: List corporate card transactions - 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: corporate_card_transactions_list - parameters: - - $ref: '#/components/parameters/created_at' - - $ref: '#/components/parameters/updated_at' - - $ref: '#/components/parameters/order' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/q' - 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/corporate_card_transaction_list_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' - post: - tags: - - Corporate Card Transactions - summary: Create or update corporate card transaction - description: | - Create or update an corporate card transactions. - operationId: corporate_card_transactions_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_post_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/bulk: - post: - tags: - - Corporate Card Transactions - summary: Bulk create or update corporate card transactions - description: | - Create or update corporate card transactions in bulk. - operationId: corporate_card_transactions_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_card_transactions/stats: - post: - tags: - - Corporate Card Transactions - summary: Corporate Card Transaction Stats - description: | - Corporate Card Transaction Stats - operationId: corporate_card_transactions_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/corporate_card_transactions_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/corporate_card_transactions_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/delete_summary/bulk: - post: - tags: - - Corporate Card Transactions - summary: Corporate Card Transaction Delete Summary - description: | - Corporate Card Transaction Delete Summary - operationId: corporate_card_transactions_delete_summary - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transactions_delete_summary_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/corporate_card_transactions_delete_summary_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/delete: - post: - tags: - - Corporate Card Transactions - summary: Corporate Card Transaction Delete - description: | - Corporate Card Transaction Delete - operationId: corporate_card_transactions_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transactions_delete_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_list_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/filters: - post: - tags: - - Corporate Card Transactions - summary: Corporate card transactions saved filters - description: | - Save Corporate Card Transaction filters for personal use or share with other admins. - operationId: corporate_card_transaction_filters_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_filters_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Corporate Card Transactions - summary: List Corporate Card Transactions saved filters - operationId: corporate_card_transaction_filters_get - description: | - List filters saved by the admin or shared with the admin. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_filters_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' - /admin/corporate_card_transactions/filters/delete: - post: - tags: - - Corporate Card Transactions - summary: Delete Corporate Card Transactions saved filter - description: | - Delete Corporate Card Transactions saved filter having the provided id. - operationId: corporate_card_transaction_filters_post_action_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_filters_delete_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_filters_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/assign: - post: - tags: - - Corporate Card Transactions - summary: Assign a corporate card transaction - description: | - Assign corporate card transaction to a user. - operationId: corporate_card_transactions_assign - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_assign_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_assign_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/assign/bulk: - post: - tags: - - Corporate Card Transactions - summary: Bulk assign corporate card transactions - description: | - Assign corporate card transactions to users in bulk. - operationId: corporate_card_transactions_assign_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_assign_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_card_transactions/reassign/bulk: - post: - tags: - - Corporate Card Transactions - summary: Bulk reassign corporate card transactions - description: | - Reassign corporate card transactions to users in bulk. - operationId: corporate_card_transactions_reassign_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_reassign_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_card_transactions/unassign: - post: - tags: - - Corporate Card Transactions - summary: Unassign corporate card transaction - description: | - Unassign a corporate card transaction from a user. - operationId: corporate_card_transactions_unassign - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_unassign_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/mark_personal: - post: - tags: - - Corporate Card Transactions - summary: Mark a corporate card transaction as personal - description: | - Mark a corporate card transaction as personal - operationId: corporate_card_transactions_mark_personal - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_mark_personal_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/mark_personal/bulk: - post: - tags: - - Corporate Card Transactions - summary: Bulk mark personal corporate card transactions - description: | - Mark corporate card transactions as personal in bulk. - operationId: corporate_card_transactions_mark_personal_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_card_transactions/unmark_personal: - post: - tags: - - Corporate Card Transactions - summary: Unmark a corporate card transaction which is marked as personal - description: | - Unmark a corporate card transaction which is marked as personal - operationId: corporate_card_transactions_unmark_personal - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_unmark_personal_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/ignore: - post: - tags: - - Corporate Card Transactions - summary: Ignore a corporate card transaction - description: | - Ignore a corporate card transaction - operationId: corporate_card_transactions_ignore - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_ignore_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/ignore/bulk: - post: - tags: - - Corporate Card Transactions - summary: Bulk ignore corporate card transactions - description: | - Ignore corporate card transactions in bulk. - operationId: corporate_card_transactions_ignore_bulk - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/corporate_card_transactions/undo_ignore: - post: - tags: - - Corporate Card Transactions - summary: Undo an ignored corporate card transaction - description: | - Undo an ignored corporate card transaction - operationId: corporate_card_transactions_undo_ignore - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_id_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_undo_ignore_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/match: - post: - tags: - - Corporate Card Transactions - summary: Match corporate card transaction - description: | - Match corporate card transaction to expenses - operationId: corporate_card_transactions_match - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_match_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_match_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/unmatch: - post: - tags: - - Corporate Card Transactions - summary: Unmatch corporate card transaction - description: | - Unmatch a matched corporate card transaction - operationId: corporate_card_transactions_unmatch - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_unmatch_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transaction_unmatch_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/corporate_card_transactions/exports: - post: - tags: - - Corporate Card Transactions - summary: Create Corproate Card Transactions Export - description: | - Create Corporate Card Transactions Export Request. - operationId: corporate_card_transactions_exports_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transactions_exports_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/corporate_card_transactions_exports_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/virtual_cards: - get: - tags: - - Virtual Cards - summary: List virtual cards - 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: virtual_cards_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/virtual_card_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' - /admin/virtual_cards/get_current_amount: - post: - tags: - - Virtual Cards - summary: Get current balance amount of the virtual card - description: | - To get the current balance amount of the virtual card - operationId: virtual_cards_get_current_balance - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_cards_id_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_cards_get_current_balance_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/virtual_cards/show_card_details: - post: - tags: - - Virtual Cards - summary: Show full card details - description: | - To get the card details of the virtual card - operationId: virtual_cards_show_card_details - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_cards_id_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_cards_show_card_details_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/virtual_cards/delete: - post: - tags: - - Virtual Cards - summary: Delete a virtual card - description: | - To delete a virtual card - operationId: virtual_cards_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_cards_id_in' - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/virtual_card_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/subscriptions: - post: - tags: - - Subscriptions - summary: Create a subscription - description: subscribe to different events using this API - operationId: admin_subscriptions_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_subscriptions_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/admin_subscriptions_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - callbacks: - REPORT.*: - '{$request.body#/data/webhook_url}': - post: - operationId: report_subscriptions_callback - summary: Object that will be sent to the callback url - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/report_out_subscriptions_admin' - responses: - '200': - description: OK - get: - tags: - - Subscriptions - summary: List Admin Subscriptions - operationId: subscriptions_list - 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) - 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/admin_subscriptions_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reimbursements: - get: - tags: - - Reimbursements - summary: List reimbursements - operationId: reimbursements_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/reimbursement_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reimbursements/mark_paid/bulk: - post: - tags: - - Reimbursements - summary: Bulk mark paid reimbursements - operationId: mark_paid_reimbursements_bulk - description: | - Marks reimbursement as paid and move reports to paid state. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/reimbursement_in_minimal' - responses: - '200': - description: OK - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/employee_account_summaries: - get: - tags: - - Settlements - summary: List employee accounts summaries - operationId: employee_account_summaries_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/employee_account_summary_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/schedules: - post: - tags: - - Schedules - summary: Create or update a Schedule - description: | - Create or update a Schedule. - operationId: schedules_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/schedule_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/schedule_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - get: - tags: - - Schedules - summary: List Schedule - operationId: schedules_list - 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) - 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/schedule_out' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/scheduled_callbacks: - post: - tags: - - Scheduled Callbacks - summary: Create or update a Scheduled Callback - description: | - Create or update a Scheduled Callback. - operationId: scheduled_callbacks_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/scheduled_callback_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/scheduled_callback_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - get: - tags: - - Scheduled Callbacks - summary: List Scheduled Callback - operationId: scheduled_callbacks_list - 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) - 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/scheduled_callback_out' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/spend_overview/summary: - get: - tags: - - Spend Overview - summary: Spend Overview Summary - operationId: spend_overview_summary - description: | - API to return spend overview summary data. Data returned by this API can be used to plot a time series graph depicting amount of spend over a period of time.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_granularity' - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/is_card_spend' - - $ref: '#/components/parameters/is_reimbursable' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/user_id' - - $ref: '#/components/parameters/corporate_card_id' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - time_interval_granularity: - $ref: '#/components/schemas/time_interval_granularity' - total_amount: - $ref: '#/components/schemas/total_amount' - data: - type: array - items: - $ref: '#/components/schemas/spend_overview_summary_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_merchant: - get: - tags: - - Spend Overview - summary: Spend Overview By Merchant - operationId: spend_overview_by_merchant - description: | - API to return spend overview data grouped by merchant.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/user_id' - - $ref: '#/components/parameters/corporate_card_id' - 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/spend_overview_by_merchant_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_project: - get: - tags: - - Spend Overview - summary: Spend Overview By Project - operationId: spend_overview_by_project - description: | - API to return spend overview data grouped by project.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/user_id' - - $ref: '#/components/parameters/corporate_card_id' - 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/spend_overview_by_project_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_category: - get: - tags: - - Spend Overview - summary: Spend Overview By Category - operationId: spend_overview_by_category - description: | - API to return spend overview data grouped by category.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/user_id' - - $ref: '#/components/parameters/corporate_card_id' - 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/spend_overview_by_category_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_department: - get: - tags: - - Spend Overview - summary: Spend Overview By Department - operationId: spend_overview_by_department - description: | - API to return spend overview data grouped by department.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/user_id' - - $ref: '#/components/parameters/corporate_card_id' - 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/spend_overview_by_department_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_user: - get: - tags: - - Spend Overview - summary: Spend Overview By User - operationId: spend_overview_by_user - description: | - API to return spend overview data grouped by user of an org.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/corporate_card_id' - 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/spend_overview_by_user_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/spend_overview/by_corporate_card: - get: - tags: - - Spend Overview - summary: Spend Overview By Corporate Card - operationId: spend_overview_by_corporate_card - description: | - API to return spend overview data grouped by corporate cards being used in an org.
- 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) - parameters: - - $ref: '#/components/parameters/time_interval_preset' - - $ref: '#/components/parameters/time_interval_start' - - $ref: '#/components/parameters/time_interval_end' - - $ref: '#/components/parameters/merchant' - - $ref: '#/components/parameters/project_id' - - $ref: '#/components/parameters/category_id' - - $ref: '#/components/parameters/department_id' - - $ref: '#/components/parameters/user_id' - 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/spend_overview_by_corporate_card_data_out' - '202': - description: Request Accepted - content: - application/json: - schema: - $ref: '#/components/schemas/202' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '500': - description: API Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/accounts: - get: - tags: - - Accounts - summary: List accounts - 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: accounts_list - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/account_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - post: - operationId: accounts_post - tags: - - Accounts - summary: Create an account - description: | - Create an account - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/account_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/account_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/tax_groups: - get: - tags: - - Tax Groups - summary: List tax groups - operationId: tax_groups_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/tax_group_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' - post: - operationId: tax_groups_post - tags: - - Tax Groups - summary: Create or update a tax group - description: | - Create or update a tax group. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/tax_group_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/tax_group_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/tax_groups/bulk: - post: - operationId: tax_groups_bulk_post - tags: - - Tax Groups - summary: Create or update tax groups in bulk - description: | - Create or update tax groups in bulk. - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/tax_group_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/budgets: - post: - tags: - - Budgets - summary: Create or update a Budget - description: | - Create or update a Budget - operationId: budgets_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/budget_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/budget_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - get: - tags: - - Budgets - summary: List Budgets - operationId: budgets_list - 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) - 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/budget_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' - /admin/budget_usages: - get: - tags: - - Budgets - summary: List Budget Usages - operationId: budget_usages_list - parameters: - - $ref: '#/components/parameters/created_at' - - $ref: '#/components/parameters/updated_at' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/order' - 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/budget_usage_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' - /admin/orgs: - get: - tags: - - Organisations - summary: List Organisations - operationId: orgs_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/org_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' - /admin/expense_policy_rules: - post: - tags: - - Expense Policies - summary: Create or Update Expense Policy Rules - description: | - Create or Update Expense Policy Rules
- **Apart from the required fields mentioned below, the request body should contain the following:** - - You should choose at least one condition from **expense_*** or **employee_***. - - You should choose at least one action from **action_***.

- _When multiple conditions are provided, then there will AND operation in between them and the policy rule - will only be applicable on expenses if all of the conditions match.
- Similarly, for actions, if multiple actions are provided then all of the actions will be applied when conditions satisfy._ - operationId: expense_policy_rules_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_policy_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expense_policy_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Expense Policies - summary: Get Expense Policy Rules - operationId: expense_policy_rules_get - parameters: - - in: query - name: id - description: | - The id of the expense policy rule.
- Supported operators are `eq`, `in`, `neq`, `not_in`.
- id=eq."id"
- id=in.("id1","id2","id3")
- id=neq."id"
- id=not_in.("id1","id2","id3") - > If no id is passed then all the expense policy rules of the org will be returned. - schema: - type: string - example: eq."tprmdNPsd" - - in: query - name: is_enabled - description: | - Whether to fetch only active expense policy rule.
- Supported operators are `eq`.
- is_enabled=eq.true
- is_enabled=eq.false - schema: - type: string - example: eq.true - - in: query - name: is_retired - description: | - Whether to fetch retired expense policy rule.
- Supported operators are `eq`.
- is_retired=eq.true
- is_retired=eq.false - schema: - type: string - example: eq.true - - in: query - name: is_approver_policy - description: | - Whether to fetch expense policy rules that add an approver to an expense on violation.
- Supported operators are `eq`.
- is_approver_policy=eq.true
- is_approver_policy=eq.false - schema: - type: string - example: eq.true - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/expense_policy_out' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/expense_policy_rules/enable: - post: - tags: - - Expense Policies - summary: Enable an Expense Policy Rule - description: | - Enable an Expense Policy Rule - operationId: expense_policy_rules_enable - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_policy_state_change_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expense_policy_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Object Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expense_policy_rules/disable: - post: - tags: - - Expense Policies - summary: Disable an Expense Policy Rule - description: | - Disable an Expense Policy Rule - operationId: expense_policy_rules_disable - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_policy_state_change_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expense_policy_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Object Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expense_policy_rules/reorder: - post: - tags: - - Expense Policies - summary: Reorder approver policies - description: | - Reorder the enabled approver policies of an org. - - An **approver policy** is a policy that adds an approver to an expense on violation. - - All **enabled** approver policy IDs must be provided in the request body. - operationId: expense_policy_rules_reorder - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_policy_state_change_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expense_policy_states: - get: - tags: - - Expense Policies - summary: Get policy states of Expenses - description: | - Get policy states of Expenses - operationId: expense_policy_states_get - parameters: - - in: query - name: expense_id - description: | - The id of the expense for which you are querying the policy states.
- Supported operators are `eq`, `in`, `neq`, `not_in`.
- expense_id=eq."id"
- expense_id=in.("id1","id2","id3")
- expense_id=neq."id"
- expense_id=not_in.("id1","id2","id3") - schema: - type: string - example: eq."txSdfsytrqw" - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/expense_policy_states_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Object Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /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' - /admin/statements/upload: - post: - tags: - - Statements - summary: Upload a statement - description: | - Upload a corporate card statement(csv or excel) to Fyle for reconciliation. - operationId: statements_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/statements_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /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' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - /admin/statements/suggest_mappings: - post: - tags: - - Statements - summary: Statement mapping suggestion - 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_suggest - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - statement_id: - type: string - description: | - The id of the uploaded statement. - required: - - id - required: - - data - additionalProperties: false - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: object - items: - $ref: '#/components/schemas/statement_mappings_suggest_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/statements/preview: - post: - tags: - - Statements - summary: Preview of the uploaded statement - description: | - This API helps in converting the statement with the mapping chosed and helps the user to preview it, this doesn't save the statement - operationId: statements_preview - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/preview_from_statement_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/preview_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/statements/card_stats: - post: - tags: - - Statements - summary: RTF Card Stats of a Statement - description: | - This API helps in getting all the card stats of a statement during RTF missing transactions upload. Stats include information such as if Card exists in Fyle, RTF enrollment of card etc. - operationId: card_stats - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/card_transaction_from_statement_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/card_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/statements/matching_cards: - post: - tags: - - Statements - summary: Matching cards present in Fyle - description: | - Returns matching cards present in Fyle for cards in Statement - operationId: matching_cards - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/card_transaction_from_statement_in' - required: - - data - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/matching_cards_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/statements/missing_transactions: - post: - tags: - - Statements - summary: Process RTF Missing Transactions Reconciliation - description: | - This API is used to start processing RTF missing transactions reconciliation of a statement. - operationId: post_missing_transactions - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/rtf_missing_transaction_from_statement_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - 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' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: object - items: - $ref: '#/components/schemas/rtf_missing_transaction_from_statement_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' - /admin/statements/create_card_transactions: - post: - tags: - - Statements - summary: Create corporate card transactions out of the uploaded statement - description: | - This API helps in converting the statement with the mapping chosed and create card transactions out of the statement. - operationId: statements_create_card_transactions - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/card_transaction_from_statement_in' - required: - - data - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/statements/rtf_stats: - get: - tags: - - Statements - summary: Get RTF Stats of the last uploaded statement - description: | - This API is used to get the RTF stats of the last uploaded statement for an organization. - operationId: get_rtf_stats - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: object - items: - $ref: '#/components/schemas/rtf_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expense_rules: - post: - tags: - - Expense Rules - summary: Create or Update expense rules - description: | - Create or Update expense rules - operationId: expense_rules_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - get: - tags: - - Expense Rules - summary: List expense rules - operationId: expense_rules_list - 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) - 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/expense_rule_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' - /admin/expense_rules/dismiss_suggestion: - post: - tags: - - Expense Rules - summary: Dismiss an expense rule suggestion - description: | - Dismiss an expense rule suggestion. - operationId: expense_rules_dismiss_suggestion - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_dismiss_suggestion_in' - responses: - '200': - description: The expense rule suggestion was dismissed successfully - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expense_rules/delete: - post: - tags: - - Expense Rules - summary: Delete an expense rule - description: | - Delete an expense rule. - operationId: expense_rules_delete - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_delete_in' - responses: - '200': - description: The expense was deleted successfully - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_rule_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/check_mandatory_fields: - post: - tags: - - Expenses - summary: Check expense for missing mandatory fields - description: | - Before updating employee's expense object - into Fyle, based on the business requirements, you might want to check if you have added all the mandatory fields set up by your organization. - You can easily do that by passing the same expense object with some extra optional fields documented below. - operationId: check_mandatory_fields_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_check_mandatory_fields_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expense_check_mandatory_fields_out' - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/comments: - get: - tags: - - Expenses - summary: List expense comments - description: List all the comments of an expense - operationId: expense_comments_get - parameters: - - $ref: '#/components/parameters/expense_id' - 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/expense_comments_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/comments/bulk: - post: - tags: - - Expenses - - Expense comments - - Comments - summary: Bulk comment on expenses - description: | - Bulk comment on expenses as an admin. The API allows you to add comments to multiple expenses at once. - operationId: expense_comments_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/expense_comments_bulk_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_comments_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/dismiss_duplicates/bulk: - post: - tags: - - Expenses - summary: Dismiss Duplicate expenses - description: | - This API helps dismissing similar expenses as a duplicates. - operationId: dismiss_duplicates_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_dismiss_duplicates_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: string - nullable: true - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses/duplicate_sets: - get: - tags: - - Expenses - summary: List expense duplicate sets - operationId: expense_duplicate_sets - description: | - This API provides the sets of the duplicate expenses for a particular employee. - parameters: - - in: query - name: expense_id - description: An expense_id for what we need to fetch the duplicate expenses. - schema: - type: string - example: txdsjkF453kh - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_duplicate_sets_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' - /admin/expenses/duplicate_sets/stats: - get: - tags: - - Expenses - summary: Expense duplicate sets stats - operationId: expense_duplicate_sets_stats - description: | - This API returns count of expenses duplicate set present in org across all employees. - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/expenses_duplicate_sets_stats_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/expenses_duplicate_sets_stats_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/feature_configs: - get: - tags: - - Feature Configs - summary: List feature configs. - operationId: feature_configs_list - 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) - 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/feature_config_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' - /admin/feature_configs/bulk: - post: - tags: - - Feature Configs - summary: Create or update feature configs. - description: | - This API allows you to create or update feature configs. - operationId: feature_configs_bulk_post - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/feature_config_in' - responses: - '200': - description: OK - '400': - description: Bad request - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/bulk_error' - - type: object - properties: - error: - type: string - nullable: true - message: - type: string - nullable: true - data: - type: object - nullable: true - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses/split: - post: - tags: - - Expenses - summary: Split an expense - description: | - Admin can split an expense created by spender which is not yet paid out. - operationId: expenses_split_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_split_expense_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/split/check_mandatory_fields: - post: - tags: - - Expenses - summary: Check mandatory fields before splitting an expense - description: | - Before splitting an employee's expense object - into Fyle, based on the business requirements, you might want to check if you have added all the mandatory fields set up by your organization. - You can easily do that by passing the same expense split object documented below. - operationId: expenses_split_check_mandatory_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_split_expense_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_check_mandatory_fields_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expenses/split/check_policies: - post: - tags: - - Expenses - summary: Check for policy violations before splitting an expense - description: | - Before splitting an [expense object](https://docs.fylehq.com/docs/fyle-platform-docs/7a3407a5ef184-split-an-expense) - into Fyle, based on the business requirements, you might want to check the resulting - expenses against the policy rules set up by your organization. You can easily do that by passing the same split expense object - to this API. - operationId: expenses_split_check_policies_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/admin_split_expense_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/expense_check_policies_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/orgs/bank_details: - get: - tags: - - Organisations - summary: List Bank Account Details of Organisations - operationId: orgs_bank_details_list - 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) - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/org_bank_details_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' - /admin/merchants: - get: - tags: - - Merchants - summary: List merchants - operationId: merchants_list - parameters: - - $ref: '#/components/parameters/id' - - $ref: '#/components/parameters/created_at' - - $ref: '#/components/parameters/updated_at' - - $ref: '#/components/parameters/display_name' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/order' - 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/merchant_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' - /admin/reconciliation_entries: - get: - tags: - - Reconciliation - summary: List reconciliation entries - description: | - Retrieve reconciliation entries for corporate card statement reconciliations. - - Use this endpoint to fetch entries with period, status and totals, and filter across all fields using the `q` parameter. Pagination is supported via `offset` and `limit`, and sorting via `order`. - - To understand filtering, ordering and pagination, see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) - operationId: reconciliation_entries_list - parameters: - - $ref: '#/components/parameters/q' - - $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/reconciliation_entry' - '400': - description: Bad request - content: - application/json: - schema: - type: object - properties: - message: - type: string - nullable: true - example: | - Can not delete project(s) used in other resources like expense, expense policy, expense rules, budgets, dependent fields. - data: - type: object - example: null - error: - type: string - example: InvalidUsage - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/reconciliation_entries/transactions: - get: - tags: - - Reconciliation - summary: List reconciliation transactions - description: | - Retrieve reconciliation transactions for corporate card statement reconciliations. - - Use this endpoint to fetch transactions with statement details and matched expenses. Filter across fields using the `q` parameter and structured filters. Pagination is supported via `offset` and `limit`, and sorting via `order`. - - To understand filtering, ordering and pagination, see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) - operationId: reconciliation_transactions_list - parameters: - - $ref: '#/components/parameters/q' - - $ref: '#/components/parameters/order' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - in: query - name: statement_amount - schema: - type: string - description: Filter by statement amount using operators like eq., gt., lt., etc. - - in: query - name: statement_merchant - schema: - type: string - description: Filter by statement merchant using operators like eq., ilike., etc. - - in: query - name: statement_transaction_date - schema: - type: string - description: Filter by transaction date using timestamp operators like gte., lte., etc. - - in: query - name: statement_post_date - schema: - type: string - description: Filter by post date using timestamp operators like gte., lte., etc. - - in: query - name: is_ignored - schema: - type: string - description: Filter by ignored flag using eq.true/eq.false - - in: query - name: is_reconciled - schema: - type: string - description: Filter by reconciled flag using eq.true/eq.false - 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/reconciliation_transaction_out' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/expenses/delete/bulk: - post: - summary: Bulk delete expenses - description: Deletes multiple expenses based on the provided list of IDs, with access limited to the user's own expenses. - tags: - - Expenses - security: - - oauth2: - - '*' - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/ExpenseActionDeleteId' - responses: - '200': - description: Expenses successfully processed for deletion. - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/500' - /admin/employee_settings: - get: - tags: - - Employee Settings - summary: Get Employee Settings - operationId: admin_employee_settings_get - description: | - Get employee settings for a given employee. - parameters: - - in: query - name: employee_id - schema: - type: string - required: true - description: The employee ID for user whom we need to fetch settings - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - - count - - offset - properties: - count: - $ref: '#/components/schemas/count' - offset: - $ref: '#/components/schemas/offset' - data: - type: array - items: - $ref: '#/components/schemas/spender_employee_settings_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - /admin/advance_requests/attach_files/bulk: - post: - tags: - - Advances - summary: Bulk attach files to advance requests - description: | - Bulk attach files to advance requests - operationId: advance_requests_bulk_attach_files - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/attach_files_to_advance_request_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/approve/bulk: - post: - tags: - - Advances - summary: Bulk approve advance requests - description: | - This API allows admins to approve multiple advance requests in a single operation. - operationId: advance_requests_bulk_approve - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/advance_request_bulk_approve_in' - responses: - '200': - description: OK - All advance requests have been processed successfully - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/403' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/expense_policy_comments: - post: - tags: - - Expense Policy Comments - summary: Add expense policy comment - description: | - This API adds or updates expense policy comments. - - **Note:** - - If the specified `comment_type` already exists for the expense, the API will update the existing comment's `comment_text` with the new value provided, rather than creating a new comment entry. - - If the `comment_type` is specified and the `comment_text` is null or an empty string, the comment will be deleted for that expense. - operationId: add_expense_policy_comment - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - expense_id: - type: string - description: The expense ID - expense_policy_comments: - type: array - items: - type: object - properties: - comment_type: - type: string - description: The comment type - comment_text: - type: string - description: The comment text - nullable: true - required: - - expense_id - - expense_policy_comments - additionalProperties: false - required: - - data - additionalProperties: false - example: - data: - expense_id: txGCcvnhUbrP - expense_policy_comments: - - comment_type: MISSING_FIELDS - comment_text: Reason for missing fields - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - type: object - properties: - expense_id: - type: string - description: The expense ID - expense_policy_comments: - type: array - items: - type: object - properties: - comment_type: - type: string - description: The comment type - comment_text: - type: string - description: The comment text - required: - - expense_id - - expense_policy_comments - additionalProperties: false - example: - data: - expense_id: txGCcvnhUbrP - expense_policy_comments: - - comment_type: MISSING_FIELDS - comment_text: Reason for missing fields - '400': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorised request - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '404': - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/404' - /admin/advance_requests/add_approver: - post: - summary: Add approver to advance request - operationId: advance_requests_add_approver_post - description: | - This API allows admins to add an approver to an advance request. - tags: - - Advances - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_add_approver_in' - example: - data: - id: areq5F9xIaMURI - approver_email: approver@example.com - comment: Need your review on this advance - responses: - '200': - description: Approver added successfully - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - /admin/advance_requests/reject: - post: - tags: - - Advances - summary: Reject advance request - description: | - This API allows admins to reject an advance request. - operationId: advance_requests_reject - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_request_reject_in' - example: - data: - id: areq5F9xIaMURI - comment: Budget exceeded - responses: - '200': - description: Advance request has been rejected successfully - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - /admin/advance_requests/inquire: - post: - tags: - - Advances - summary: Inquire about advance request - description: | - This API allows admins to inquire about an advance request, sending it back to the spender for clarification or modifications. - operationId: advance_requests_inquire - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_inquire_in' - required: - - data - responses: - '200': - description: Advance request has been sent back successfully - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_out' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - /admin/advance_requests/submit: - post: - tags: - - Advances - summary: Submit an advance request - description: | - Submit an advance request. - operationId: advance_requests_submit - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - data - properties: - data: - $ref: '#/components/schemas/advance_request_in' - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/advance_request_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' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - /admin/advance_requests/custom_fields: - get: - tags: - - Advances - summary: Get advance request custom fields - description: | - This API allows admins to retrieve all active custom fields for advance requests in their organization. - operationId: advance_requests_custom_fields_get - responses: - '200': - description: Successfully retrieved custom fields - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_custom_fields_out' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - post: - tags: - - Advances - summary: Create or update advance request custom fields - description: | - This API allows admins to create and update custom fields for advance requests. - operationId: advance_requests_custom_fields_post - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_custom_field_in' - required: - - data - responses: - '200': - description: Custom field created or updated successfully - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/advance_request_custom_field_out' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/400' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/401' - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - description: Not Found - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. -components: - securitySchemes: - oauth2: - type: oauth2 - flows: - authorizationCode: - authorizationUrl: https://app.fylehq.com/app/developers/#/oauth/authorize - tokenUrl: https://accounts.fylehq.com/oauth/token - scopes: - '*': Grant all actions - schemas: - '202': - type: object - properties: - message: - type: string - description: | - Request has been accepted and is being processed, Please try again in sometime. - '400': - type: object - properties: - message: - type: string - nullable: true - description: | - Message describing why the request is invalid - '401': - type: object - properties: - message: - enum: - - invalid token - type: string - description: | - This error means that the input access token is either not issued by Fyle or has expired. - You need to generate a new access token. - '403': - type: object - properties: - message: - enum: - - Forbidden - type: string - description: | - This error means current user does not have enough permissions to perform this operation. - '404': - type: object - properties: - message: - enum: - - Resource not found - type: string - description: | - This error means the requested resource was not found or the requester doesn't have sufficient access. - '500': - type: object - properties: - message: - type: string - description: | - API server hit an internal error and could not process request. This is likely a bug. - ExpenseActionDeleteId: - type: object - properties: - id: - type: string - description: The unique identifier of the expense to be deleted. - example: txm3L9soGEt2 - required: - - id - count: - type: integer - description: | - The total number of objects that can be requested. - example: 10000 - offset: - description: | - offset is used to skip that many number of objects before counting.
- For example, if there are 2000 objects,
- The first request will have offset as 0 and limit as 200 to return first 200 objects.
- The second request will have offset as 200 and limit as 200 to return next 200 objects.
- type: integer - example: 10 - id_integer: - type: integer - description: | - This id is provided by Fyle to identify an object. - example: 1234 - org_id: - type: string - description: | - The unique id of the Organization to which the object is associated. - readOnly: true - example: orwruogwnngg - created_at: - type: string - format: date-time - description: | - Signifies when this object was created in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). - example: '2020-06-01T13:14:54.804+00:00' - updated_at: - type: string - format: date-time - description: | - Signifies when this object was updated in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). - example: '2020-06-11T13:14:55.201598+00:00' - code: - type: string - nullable: true - maxLength: 255 - description: | - This represents a code that is typically used for syncing with other systems. - example: C1234 - description: - type: string - nullable: true - maxLength: 255 - description: | - This represents the description of the resource. - example: Win the trophy - is_enabled: - type: boolean - description: | - This indicates if the resource is enabled for use within the organisation. - example: true - restricted_spender_user_ids: - type: array - nullable: true - items: - type: string - nullable: true - maxLength: 15 - description: | - This id is provided by Fyle to identify an object. - example: uswoirwlwwg - example: - - uswoirwlwwg - - uswlgwkgw42 - description: | - List of IDs of users who can access this object. - approver_user_ids: - type: array - nullable: false - maxItems: 2 - items: - type: string - nullable: true - maxLength: 15 - description: | - This id is provided by Fyle to identify an object. - example: uswoirwlwwg - example: - - uswoirwlwwg - - uswlgwkgw42 - description: | - List of IDs of users who are approvers of the project. - id_string: - type: string - maxLength: 15 - description: | - This id is provided by Fyle to identify an object. - example: sdfd2391 - email: - type: string - maxLength: 127 - example: john.doe@example.com - description: | - An immutable field that represents the email address of the employee. - Must be compliant with RFC 822. - user_out_embed: - type: object - additionalProperties: false - properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' - example: uswjwgnwwgo - email: - $ref: '#/components/schemas/email' - full_name: - type: string - maxLength: 255 - description: | - Represents the full name of the Employee. Must be at least 3 characters. - example: John Doe - admin_approver_project_out: - type: object - additionalProperties: false - properties: - id: - $ref: '#/components/schemas/id_integer' - org_id: - $ref: '#/components/schemas/org_id' - created_at: - $ref: '#/components/schemas/created_at' - updated_at: - $ref: '#/components/schemas/updated_at' - name: - type: string - maxLength: 255 - description: Represents the name of the project. - example: Fast and Furious - sub_project: - type: string - nullable: true - maxLength: 255 - description: Represents the name of the sub_project. - example: Formula One - code: - $ref: '#/components/schemas/code' - display_name: - type: string - maxLength: 513 - description: | - This is a combination of name and sub_project separated by a / and spaces. - In case if no sub_project is present it is same as name of the project. - example: Fast and Furious / Formula One - description: - $ref: '#/components/schemas/description' - is_enabled: - $ref: '#/components/schemas/is_enabled' - restricted_spender_user_ids: - $ref: '#/components/schemas/restricted_spender_user_ids' - approver_user_ids: - $ref: '#/components/schemas/approver_user_ids' - approver_users: - type: array - nullable: true - items: - $ref: '#/components/schemas/user_out_embed' - description: | - List of users who are approvers for this project. - category_ids: - type: array - nullable: true - items: - type: integer - example: 16570 - description: List of categories that are applicable for the project. - project_in: - type: object - additionalProperties: false - required: - - name - properties: - id: - $ref: '#/components/schemas/id_integer' - name: - type: string - maxLength: 255 - description: Represents the name of the project. - example: Fast and Furious - sub_project: - nullable: true - type: string - maxLength: 255 - description: Represents the name of the sub_project. - example: Formula One - code: - $ref: '#/components/schemas/code' - description: - $ref: '#/components/schemas/description' - is_enabled: - $ref: '#/components/schemas/is_enabled' - restricted_spender_user_ids: - type: array - nullable: true - items: - type: string - nullable: false - maxLength: 15 - description: | - This id is provided by Fyle to identify an object. - example: uswoirwlwwg - example: - - uswoirwlwwg - - uswlgwkgw42 - description: | - - List of IDs of users who can access this object. - - `null` value indicates that all users in the org can access this object. - - `[]` value indicates that no users in the org can access this object. - - **Note:** - - **_When the `restrict employee to their own projects` feature is disabled, only `null` value is accepted._** - - _If the `restrict employee to their own projects` feature is **disabled**, then the default value while creating project is `null`._ - - _If the `restrict employee to their own projects` feature is **enabled**, then the default value while creating project is `[]`._ - approver_user_ids: - allOf: - - $ref: '#/components/schemas/approver_user_ids' - description: | - - List of IDs of users who are approvers of the project. - - Either `approver_user_ids` or `approver_emails` can be used but not both. - - The default value for approver_user_ids is `[]` and it is applicable only when creating the project. - approver_emails: - type: array - maxItems: 2 - nullable: false - items: - type: string - maxLength: 127 - nullable: true - example: john.doe@example.com - description: | - An immutable field that represents the email address of the employee. - Must be compliant with RFC 822. - example: - - approver1@example.com - - approver2@example.com - description: | - - List of emails of employees that are approvers for the project. - - Either `approver_user_ids` or `approver_emails` can be used but not both. - - The default value for approver_emails is `[]` and it is applicable only when creating the project. - category_ids: - type: array - nullable: true - items: - $ref: '#/components/schemas/id_integer' - example: - - 87291 - - 78322 - - 492 - description: | - - List of IDs of categories which can be used with the project. - - `null` value indicates that all categories in the org are applicable for the project. - - `[]` value indicates that no category in the org is applicable for the project. - - The default value of `category_ids` is `null` - bulk_error: - type: object - properties: - error: - type: string - example: BulkError - message: - type: string - nullable: true - data: - type: array - items: - type: object - properties: - row: - type: integer - description: | - This holds the info of which row contains bad data. - key: + This id is provided by Fyle to identify an object. + example: sdfd2391 + email: + type: string + maxLength: 127 + example: john.doe@example.com + description: > + An immutable field that represents the email address of the employee. + + Must be compliant with RFC + 822. + user_out_embed: + type: object + additionalProperties: false + properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: uswjwgnwwgo + email: + $ref: '#/components/schemas/email' + full_name: + type: string + maxLength: 255 + description: > + Represents the full name of the Employee. Must be at least 3 + characters. + example: John Doe + admin_approver_project_out: + type: object + additionalProperties: false + properties: + id: + $ref: '#/components/schemas/id_integer' + org_id: + $ref: '#/components/schemas/org_id' + created_at: + $ref: '#/components/schemas/created_at' + updated_at: + $ref: '#/components/schemas/updated_at' + name: + type: string + maxLength: 255 + description: Represents the name of the project. + example: Fast and Furious + sub_project: + type: string + nullable: true + maxLength: 255 + description: Represents the name of the sub_project. + example: Formula One + code: + $ref: '#/components/schemas/code' + display_name: + type: string + maxLength: 513 + description: > + This is a combination of name and sub_project separated by a / and + spaces. + + In case if no sub_project is present it is same as name of the + project. + example: Fast and Furious / Formula One + description: + $ref: '#/components/schemas/description' + is_enabled: + $ref: '#/components/schemas/is_enabled' + restricted_spender_user_ids: + $ref: '#/components/schemas/restricted_spender_user_ids' + approver_user_ids: + $ref: '#/components/schemas/approver_user_ids' + approver_users: + type: array + nullable: true + items: + $ref: '#/components/schemas/user_out_embed' + description: | + List of users who are approvers for this project. + category_ids: + type: array + nullable: true + items: + type: integer + example: 16570 + description: List of categories that are applicable for the project. + project_in: + type: object + additionalProperties: false + required: + - name + properties: + id: + $ref: '#/components/schemas/id_integer' + name: + type: string + maxLength: 255 + description: Represents the name of the project. + example: Fast and Furious + sub_project: + nullable: true + type: string + maxLength: 255 + description: Represents the name of the sub_project. + example: Formula One + code: + $ref: '#/components/schemas/code' + description: + $ref: '#/components/schemas/description' + is_enabled: + $ref: '#/components/schemas/is_enabled' + restricted_spender_user_ids: + type: array + nullable: true + items: + type: string + nullable: false + maxLength: 15 + description: | + This id is provided by Fyle to identify an object. + example: uswoirwlwwg + example: + - uswoirwlwwg + - uswlgwkgw42 + description: > + - List of IDs of users who can access this object. + + - `null` value indicates that all users in the org can access this + object. + + - `[]` value indicates that no users in the org can access this + object. + + - **Note:** + - **_When the `restrict employee to their own projects` feature is disabled, only `null` value is accepted._** + - _If the `restrict employee to their own projects` feature is **disabled**, then the default value while creating project is `null`._ + - _If the `restrict employee to their own projects` feature is **enabled**, then the default value while creating project is `[]`._ + approver_user_ids: + allOf: + - $ref: '#/components/schemas/approver_user_ids' + description: > + - List of IDs of users who are approvers of the project. + + - Either `approver_user_ids` or `approver_emails` can be used but + not both. + + - The default value for approver_user_ids is `[]` and it is + applicable only when creating the project. + approver_emails: + type: array + maxItems: 2 + nullable: false + items: + type: string + maxLength: 127 + nullable: true + example: john.doe@example.com + description: > + An immutable field that represents the email address of the + employee. + + Must be compliant with RFC 822. + example: + - approver1@example.com + - approver2@example.com + description: > + - List of emails of employees that are approvers for the project. + + - Either `approver_user_ids` or `approver_emails` can be used but + not both. + + - The default value for approver_emails is `[]` and it is applicable + only when creating the project. + category_ids: + type: array + nullable: true + items: + $ref: '#/components/schemas/id_integer' + example: + - 87291 + - 78322 + - 492 + description: > + - List of IDs of categories which can be used with the project. + + - `null` value indicates that all categories in the org are + applicable for the project. + + - `[]` value indicates that no category in the org is applicable for + the project. + + - The default value of `category_ids` is `null` + bulk_error: + type: object + properties: + error: + type: string + example: BulkError + message: + type: string + nullable: true + data: + type: array + items: + type: object + properties: + row: + type: integer + description: | + This holds the info of which row contains bad data. + key: oneOf: - type: string - type: integer @@ -11979,10 +494,15 @@ components: example: - uswoirwlwwg - uswlgwkgw42 - description: | + description: > - List of IDs of users who can access this object. - - `null` value indicates that all users in the org can access this object. - - `[]` value indicates that no users in the org can access this object. + + - `null` value indicates that all users in the org can access this + object. + + - `[]` value indicates that no users in the org can access this + object. + - **Note:** - _Either `restricted_spender_user_ids` or `restricted_spender_user_group` key can be used to set restrictions. Both the keys can't be used together._ - _While creating cost_centers, if both `restricted_spender_user_ids` and `restricted_spender_user_group` keys are not set, restrictions defaults to `"restricted_spender_user_group": {"with_no_cost_center_restrictions": "true"}`_ @@ -11995,8 +515,9 @@ components: properties: with_no_cost_center_restrictions: type: boolean - description: | - - If you want the cost_center to be visible to all the users in the org with no cost center restrictions, + description: > + - If you want the cost_center to be visible to all the users in + the org with no cost center restrictions, you can set this key to True.
**Note:** - _Either `restricted_spender_user_ids` or `restricted_spender_user_group` key can be used to set restrictions. Both the keys can't be used together._ @@ -12032,8 +553,10 @@ components: type: string maxLength: 255 example: Engine / Turbo charged - description: | - This is a combination of name and sub_category separated by a / and spaces. In case if no sub_category is present it is same as name of the category. + description: > + This is a combination of name and sub_category separated by a / and + spaces. In case if no sub_category is present it is same as name of + the category. system_category: nullable: true type: string @@ -12050,8 +573,9 @@ components: example: - 2222 - 1221 - description: | - List of project ids for which this category can be used. If project_ids is null, then this category can be used for any project. + description: > + List of project ids for which this category can be used. If + project_ids is null, then this category can be used for any project. restricted_spender_user_ids: $ref: '#/components/schemas/restricted_spender_user_ids' category_in: @@ -12072,7 +596,9 @@ components: type: string maxLength: 255 example: Turbo charged - description: Represents the sub category of the category. Note that the name and sub category cannot be same. + description: >- + Represents the sub category of the category. Note that the name and + sub category cannot be same. is_enabled: $ref: '#/components/schemas/is_enabled' system_category: @@ -12091,8 +617,9 @@ components: example: - 2222 - 1221 - description: | - List of project ids for which this category can be used. If project_ids is null, then this category can be used for any project + description: > + List of project ids for which this category can be used. If + project_ids is null, then this category can be used for any project restricted_spender_user_ids: type: array nullable: true @@ -12106,10 +633,15 @@ components: example: - uswoirwlwwg - uswlgwkgw42 - description: | - - List of IDs of users who can access this category. Default value is `[]`. - - `null` value indicates that all users in the org can access this category. - - `[]` value indicates that no users in the org can access this category. + description: > + - List of IDs of users who can access this category. Default value + is `[]`. + + - `null` value indicates that all users in the org can access this + category. + + - `[]` value indicates that no users in the org can access this + category. category_in_only_id: type: object required: @@ -12175,8 +707,9 @@ components: example: Vendor description column_name: type: string - description: | - This specifies the name of column to which this expense field mapped to. + description: > + This specifies the name of column to which this expense field mapped + to. example: Purpose type: type: string @@ -12187,8 +720,9 @@ components: type: array items: type: string - description: | - This specifies the option values of the expense field in case on SELECT or MULTI_SELECT type. + description: > + This specifies the option values of the expense field in case on + SELECT or MULTI_SELECT type. example: - Chai - Coffee @@ -12223,8 +757,10 @@ components: parent_field_id: type: integer nullable: true - description: | - This specifies the `id` of the parent expense field and denotes that the expense field is a dependent custom field. NOTE: `type` must be `DEPENDENT_SELECT`. + description: > + This specifies the `id` of the parent expense field and denotes that + the expense field is a dependent custom field. NOTE: `type` must be + `DEPENDENT_SELECT`. example: 1234 expense_field_in: type: object @@ -12262,8 +798,10 @@ components: items: type: string nullable: true - description: | - This specifies the option values of the expense field in case on SELECT or MULTI_SELECT type. Sets to empty array by default if null is passed. + description: > + This specifies the option values of the expense field in case on + SELECT or MULTI_SELECT type. Sets to empty array by default if null + is passed. example: - Chai - Coffee @@ -12276,13 +814,17 @@ components: placeholder: type: string nullable: true - description: | - This specifies the placeholder of the expense field. Sets to empty string by default if null is passed. + description: > + This specifies the placeholder of the expense field. Sets to empty + string by default if null is passed. example: Enter vendor category_ids: type: array nullable: true - description: List of category ids for which this expense field is applicable. If null is passed, the default value is all category ids of the org as array. + description: >- + List of category ids for which this expense field is applicable. If + null is passed, the default value is all category ids of the org as + array. items: type: integer example: 16570 @@ -12298,8 +840,10 @@ components: parent_field_id: type: integer nullable: true - description: | - This specifies the `id` of the parent expense field and denotes that the expense field is a dependent custom field. NOTE: `type` must be `DEPENDENT_SELECT`. + description: > + This specifies the `id` of the parent expense field and denotes that + the expense field is a dependent custom field. NOTE: `type` must be + `DEPENDENT_SELECT`. example: 1234 dependent_expense_field_values_out: type: object @@ -12398,8 +942,9 @@ components: expense_field_values: type: array nullable: false - description: | - This specifies the text values of the dependent expense field upto 20 items. + description: > + This specifies the text values of the dependent expense field upto + 20 items. items: type: string nullable: false @@ -12439,8 +984,9 @@ components: error_file_id: type: string nullable: true - description: | - File `id` of the error excel file generated after processing the uploaded file. + description: > + File `id` of the error excel file generated after processing the + uploaded file. example: fiit3pX9gzzQ state: type: string @@ -12553,8 +1099,9 @@ components: type: array items: type: string - description: | - This specifies the option values of the employee field in case on SELECT or MULTI_SELECT type. + description: > + This specifies the option values of the employee field in case on + SELECT or MULTI_SELECT type. example: - Mr - Mrs @@ -12592,8 +1139,9 @@ components: type: array items: type: string - description: | - This specifies the option values of the employee field in case on SELECT or MULTI_SELECT type. + description: > + This specifies the option values of the employee field in case on + SELECT or MULTI_SELECT type. example: - Mr - Ms @@ -12621,8 +1169,9 @@ components: name: type: string maxLength: 255 - description: | - This represents the name of the resource. This should be unique in an organization + description: > + This represents the name of the resource. This should be unique in an + organization example: foo123 per_diem_rate_out: type: object @@ -12738,8 +1287,10 @@ components: display_name: type: string example: Sales / Outbound Sales - description: | - This is a combination of name and sub_department separated by a / and spaces. In case if no sub_department is present it is same as name of the department. + description: > + This is a combination of name and sub_department separated by a / + and spaces. In case if no sub_department is present it is same as + name of the department. doc_url: type: string nullable: true @@ -12877,8 +1428,9 @@ components: band: type: string nullable: true - description: | - Band in which this level belongs to, you can group multiple levels into a single band. + description: > + Band in which this level belongs to, you can group multiple levels + into a single band. example: Associate code: $ref: '#/components/schemas/code' @@ -12913,8 +1465,9 @@ components: band: type: string nullable: true - description: | - Band in which this level belongs to, you can group multiple levels into a single band. + description: > + Band in which this level belongs to, you can group multiple levels + into a single band. example: Associate code: $ref: '#/components/schemas/code' @@ -12956,8 +1509,10 @@ components: display_name: type: string example: Sales / Outbound Sales - description: | - This is a combination of name and sub_department separated by a / and spaces. In case if no sub_department is present it is same as name of the department. + description: > + This is a combination of name and sub_department separated by a / + and spaces. In case if no sub_department is present it is same as + name of the department. null_field: type: string nullable: true @@ -12965,15 +1520,19 @@ components: type: string format: date-time nullable: true - description: Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: >- + Date-time in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2020-06-01T13:14:54.804+00:00' joined_at: anyOf: - $ref: '#/components/schemas/null_field' - $ref: '#/components/schemas/timestamptz_utc' nullable: true - description: | - Date and time when the user joined the organization. Date-time will be in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: > + Date and time when the user joined the organization. Date-time will be + in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). level_out_embed: type: object additionalProperties: false @@ -12989,8 +1548,9 @@ components: band: type: string nullable: true - description: | - Band in which this level belongs to, you can group multiple levels into a single band. + description: > + Band in which this level belongs to, you can group multiple levels + into a single band. example: Associate required: - id @@ -13083,12 +1643,18 @@ components: $ref: '#/components/schemas/custom_field' flattened_custom_field: type: object - description: | - Custom fields in object format with keys as the name of the custom field and value as the value of the custom field. This is done to make it easier to query the custom fields. + description: > + Custom fields in object format with keys as the name of the custom field + and value as the value of the custom field. This is done to make it + easier to query the custom fields. + - Example: `[{"name": "Custom Field 1", "value": "Value 1"}]` is flattened to `{"custom_field_1": "Value 1"}` + Example: `[{"name": "Custom Field 1", "value": "Value 1"}]` is flattened + to `{"custom_field_1": "Value 1"}` - NOTE: Key name is converted to snake case and spaces are replaced with underscores. + + NOTE: Key name is converted to snake case and spaces are replaced with + underscores. nullable: false additionalProperties: true properties: @@ -13134,9 +1700,12 @@ components: display_name: type: string example: Fast and Furious / Formula One - description: | - This is a combination of name and sub_project separated by a / and spaces. - In case if no sub_project is present it is same as name of the project. + description: > + This is a combination of name and sub_project separated by a / and + spaces. + + In case if no sub_project is present it is same as name of the + project. cost_center_out_embed: type: object nullable: true @@ -13179,8 +1748,9 @@ components: $ref: '#/components/schemas/code' has_accepted_invite: type: boolean - description: | - This boolean field represents whether the employee has accepted the current org's invite by verifying his/her email or not. + description: > + This boolean field represents whether the employee has accepted the + current org's invite by verifying his/her email or not. example: true bank_ifsc: type: string @@ -13193,8 +1763,10 @@ components: type: string example: '+12131234567' maxLength: 16 - description: | - phone number is represented by +CC MMMMMM... where CC is the country code, and is one to three digits, and MMMMMM... is the area code (where applicable) and subscriber number Max 12 digits + description: > + phone number is represented by +CC MMMMMM... where CC is the country + code, and is one to three digits, and MMMMMM... is the area code (where + applicable) and subscriber number Max 12 digits pattern: /^(\+\d{1,3}[- ]?)?\d{10}$/ locale: type: object @@ -13298,8 +1870,9 @@ components: end_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' - description: | - Date and time till which the delegation is active. If null, delegation is active indefinitely. + description: > + Date and time till which the delegation is active. If null, + delegation is active indefinitely. nullable: true category_out_embed: type: object @@ -13330,8 +1903,10 @@ components: display_name: type: string example: Engine / Turbo charged - description: | - This is a combination of name and sub_category separated by a / and spaces. In case if no sub_category is present it is same as name of the category. + description: > + This is a combination of name and sub_category separated by a / and + spaces. In case if no sub_category is present it is same as name of + the category. employee_out: type: object additionalProperties: false @@ -13358,9 +1933,12 @@ components: maxLength: 255 nullable: true example: E84122 - description: | - This field refers to any string that the client programs can use to refer to an employee's unique id. - This could be any field such as an UUID from an Active Directory server or employee id in a HRMS system. + description: > + This field refers to any string that the client programs can use to + refer to an employee's unique id. + + This could be any field such as an UUID from an Active Directory + server or employee id in a HRMS system. department_id: $ref: '#/components/schemas/fk_string' department: @@ -13423,15 +2001,17 @@ components: example: - 2222 - 1221 - description: | - List of cost center ids that this employee is allowed to access. [] (empty array) means access to all cost centers. + description: > + List of cost center ids that this employee is allowed to access. [] + (empty array) means access to all cost centers. cost_centers: type: array nullable: false items: $ref: '#/components/schemas/cost_center_out_embed' - description: | - List of cost_ enters that this employee is allowed to access. [] (empty array) means access to all cost centers. + description: > + List of cost_ enters that this employee is allowed to access. [] + (empty array) means access to all cost centers. per_diem_rate_ids: type: array nullable: false @@ -13500,8 +2080,9 @@ components: items: $ref: '#/components/schemas/bank_ifsc' example: null - description: | - IFSC code of the bank account of the Employee. Must be a 11 digit alphanumeric code. + description: > + IFSC code of the bank account of the Employee. Must be a 11 digit + alphanumeric code. mobile: type: string nullable: true @@ -13528,18 +2109,21 @@ components: added: nullable: true type: boolean - description: | - This field indicates whether employee has added a bank account to receive ACH reimbursements. + description: > + This field indicates whether employee has added a bank account + to receive ACH reimbursements. verified: nullable: true type: boolean - description: | - This field indicates whether employee's bank account, added to receive ACH reimbursements, is verified. + description: > + This field indicates whether employee's bank account, added to + receive ACH reimbursements, is verified. suspended: nullable: true type: boolean - description: | - This field indicates whether employee's ACH account is suspended. + description: > + This field indicates whether employee's ACH account is + suspended. description: | ACH account details of the employee. delegatees: @@ -13591,8 +2175,9 @@ components: full_name: type: string maxLength: 255 - description: | - Represents the full name of the Employee. Must be at least 3 characters. + description: > + Represents the full name of the Employee. Must be at least 3 + characters. example: John Doe potential_duplicate_expenses: type: array @@ -13622,8 +2207,9 @@ components: - yyyy-MM-dd'T'HH:mm:ss - dd-MM-yyyy - error in date formatting - description: | - Export column formula is used to specify which field to export and any transformations needed. + description: > + Export column formula is used to specify which field to export and any + transformations needed. employees_export_config: type: object additionalProperties: false @@ -13689,7 +2275,8 @@ components: example: Name formula: allOf: - - $ref: '#/components/schemas/employees_export_config_column_formula' + - $ref: >- + #/components/schemas/employees_export_config_column_formula description: | Formula specifying which field to export. employees_exports_in: @@ -13777,14 +2364,17 @@ components: type: string maxLength: 255 nullable: true - description: | - This represents the name of the resource. This should be unique in an organization + description: > + This represents the name of the resource. This should be unique in an + organization example: foo123 timestamptz_pst: type: string format: date-time nullable: true - description: Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: >- + Date-time in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2020-06-01T01:18:19.292-08:00' delegatee: type: object @@ -13804,8 +2394,9 @@ components: end_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' - description: | - Date and time till which the delegation is active. If null, delegation is active indefinitely. + description: > + Date and time till which the delegation is active. If null, + delegation is active indefinitely. nullable: true invitation_in: type: object @@ -13818,8 +2409,10 @@ components: user_full_name: type: string maxLength: 255 - description: | - Represents the full name of the Employee. Must be at least 3 characters. + description: > + Represents the full name of the Employee. Must be at least 3 + characters. + Is required when creating a new employee example: John Doe business_unit: @@ -13832,9 +2425,12 @@ components: maxLength: 255 nullable: true example: E84122 - description: | - This field refers to any string that the client programs can use to refer to an employee's unique id. - This could be any field such as an UUID from an Active Directory server or employee id in a HRMS system. + description: > + This field refers to any string that the client programs can use to + refer to an employee's unique id. + + This could be any field such as an UUID from an Active Directory + server or employee id in a HRMS system. department_name: $ref: '#/components/schemas/name_nullable' sub_department: @@ -13867,8 +2463,9 @@ components: - approver1@example.com - approver2@example.com - null - description: | - List of emails of employees that are approvers for this employee. Use null in case of no approver or to remove the approver. + description: > + List of emails of employees that are approvers for this employee. + Use null in case of no approver or to remove the approver. project_names: type: array nullable: false @@ -13877,9 +2474,13 @@ components: example: - Project / Sub Project - Only Project - description: | - List of project names that this employee is allowed to access. If null, then there are no restrictions. - Individual list item should be in the format of `project_name / sub_project`. If there is no sub project, then simply pass `project_name`. + description: > + List of project names that this employee is allowed to access. If + null, then there are no restrictions. + + Individual list item should be in the format of `project_name / + sub_project`. If there is no sub project, then simply pass + `project_name`. cost_center_names: type: array nullable: false @@ -13887,8 +2488,9 @@ components: $ref: '#/components/schemas/name' example: - Sales - description: | - List of cost center names that this employee is allowed to access. [] (empty array) means access to all cost centers. + description: > + List of cost center names that this employee is allowed to access. + [] (empty array) means access to all cost centers. per_diem_rate_names: type: array nullable: false @@ -13916,8 +2518,9 @@ components: example: - two_wheeler - four_wheeler_1 - description: | - List of mileage rate's vehicle types that this employee is allowed to access. If null, then there are no restrictions + description: > + List of mileage rate's vehicle types that this employee is allowed + to access. If null, then there are no restrictions branch_account: type: string nullable: true @@ -13932,8 +2535,9 @@ components: items: $ref: '#/components/schemas/bank_ifsc' example: null - description: | - IFSC code of the bank account of the Employee. Must be a 11 digit alphanumeric code. + description: > + IFSC code of the bank account of the Employee. Must be a 11 digit + alphanumeric code. mobile: type: string nullable: true @@ -13953,8 +2557,9 @@ components: $ref: '#/components/schemas/email' example: - delegatee@example.com - description: | - This key is in the process of being deprecated. It is recommended to use `delegatees` key instead. + description: > + This key is in the process of being deprecated. It is recommended to + use `delegatees` key instead. deprecated: true delegatees: type: array @@ -13967,8 +2572,10 @@ components: employee_id: type: string maxLength: 255 - description: | - This id provided by Fyle to uniquely identify an employee within an organization. + description: > + This id provided by Fyle to uniquely identify an employee within an + organization. + This id is always prefixed with `ou`. example: outGt9ju6qP reinvitation_in: @@ -14077,8 +2684,9 @@ components: error_file_id: type: string nullable: true - description: | - File `id` of the error excel file generated after processing the uploaded file. + description: > + File `id` of the error excel file generated after processing the + uploaded file. example: fi1yut1owo3 employees_upload_in: type: object @@ -14106,8 +2714,9 @@ components: file_id: type: string nullable: true - description: | - File `id` of the excel file generated after processing the download request. + description: > + File `id` of the excel file generated after processing the download + request. example: fi3ou3hg3l state: type: string @@ -14132,8 +2741,9 @@ components: full_name: type: string maxLength: 255 - description: | - Represents the full name of the Employee. Must be at least 3 characters. + description: > + Represents the full name of the Employee. Must be at least 3 + characters. example: John Doe employee_summary_out: type: object @@ -14211,8 +2821,9 @@ components: enum: - INTEGRATION - RECEIPT - description: | - Indicates whether this file original size or encrypted or its thumbnail image. + description: > + Indicates whether this file original size or encrypted or its + thumbnail image. example: RECEIPT password: type: string @@ -14254,8 +2865,9 @@ components: enum: - INTEGRATION - RECEIPT - description: | - Indicates whether this file original size or encrypted or its thumbnail image. + description: > + Indicates whether this file original size or encrypted or its + thumbnail image. example: RECEIPT content_type: type: string @@ -14409,7 +3021,9 @@ components: type: string description: | A human readable identifier for the automate report submission - example: Expense Reports will be submitted automatically for approval on the Last Day, 7th and 24th of every month. + example: >- + Expense Reports will be submitted automatically for approval on the + Last Day, 7th and 24th of every month. schedule_config: $ref: '#/components/schemas/schedule_config' org_id: @@ -14431,7 +3045,9 @@ components: type: string description: | A human readable identifier for the automate report submission - example: Expense Reports will be submitted automatically for approval on the Last Day, 7th and 24th of every month. + example: >- + Expense Reports will be submitted automatically for approval on the + Last Day, 7th and 24th of every month. schedule_config: $ref: '#/components/schemas/schedule_config' delete_automate_report_submission_in: @@ -14543,8 +3159,9 @@ components: type: string nullable: true maxLength: 255 - description: | - Optional metadata about the Export operation. For example, newly created Accounting Entry numbers in Quickbooks. + description: > + Optional metadata about the Export operation. For example, newly + created Accounting Entry numbers in Quickbooks. accounting_export_id: $ref: '#/components/schemas/fk_string' org_id: @@ -14573,27 +3190,31 @@ components: type: string nullable: true maxLength: 255 - description: | - Optional metadata about the Export operation. For example, newly created Accounting Entry numbers in Quickbooks. + description: > + Optional metadata about the Export operation. For example, newly + created Accounting Entry numbers in Quickbooks. accounting_export_id: $ref: '#/components/schemas/fk_string' currency: type: string - description: | - The three-letter currency code following ISO standard ISO 4217. + description: > + The three-letter currency code following ISO standard ISO 4217. example: USD pattern: ([A-Z]{3}) foreign_currency: type: string nullable: true - description: | - The three-letter currency code following ISO standard ISO 4217. + description: > + The three-letter currency code following ISO standard ISO 4217. example: GBP foreign_amount: type: number nullable: true - description: | - Amount value of the object, in original currency i.e the currency in which the object was initially created. + description: > + Amount value of the object, in original currency i.e the currency in + which the object was initially created. example: 3768 fk_integer: type: integer @@ -14642,10 +3263,12 @@ components: properties: id: type: integer - description: | + description: > Expense field ID of the custom field. - NOTE: This field may not be present for older expense custom fields created without the "id" field. + + NOTE: This field may not be present for older expense custom fields + created without the "id" field. example: 1337 name: type: string @@ -14719,9 +3342,12 @@ components: State of this report_approval approver_order: type: integer - description: | - This number inidicates the order of the approver in the approval sequence for the report. - The approver with the lowest approver_order is the first approver in the sequence. + description: > + This number inidicates the order of the approver in the approval + sequence for the report. + + The approver with the lowest approver_order is the first approver in + the sequence. example: 1 report_out_embed: type: object @@ -14812,8 +3438,10 @@ components: reimbursement_seq_num: type: string nullable: true - description: | - A unique, organization wide identifier for a particular reimbursement.
+ description: > + A unique, organization wide identifier for a particular + reimbursement.
+ This id is always prefixed with `P/`. example: P/2020/11/29 approvals: @@ -14840,8 +3468,9 @@ components: enum: - INTEGRATION - RECEIPT - description: | - Indicates whether this file original size or encrypted or its thumbnail image. + description: > + Indicates whether this file original size or encrypted or its + thumbnail image. example: RECEIPT content_type: type: string @@ -14877,8 +3506,9 @@ components: org_name: type: string maxLength: 255 - description: | - This represents the name of the organization. This should be unique for all organizations + description: > + This represents the name of the organization. This should be unique for + all organizations example: foo123 department_id: type: string @@ -14901,9 +3531,12 @@ components: maxLength: 255 nullable: true example: E84122 - description: | - This field refers to any string that the client programs can use to refer to an employee's unique id. - This could be any field such as an UUID from an Active Directory server or employee id in a HRMS system. + description: > + This field refers to any string that the client programs can use to + refer to an employee's unique id. + + This could be any field such as an UUID from an Active Directory + server or employee id in a HRMS system. org_id: $ref: '#/components/schemas/org_id' org_name: @@ -14957,8 +3590,9 @@ components: Mobile number of the employee joined_at: $ref: '#/components/schemas/joined_at' - description: | - NOTE: The data of this field is not realtime. It will get updated later even if `employee_id` is already up-to-date. + description: > + NOTE: The data of this field is not realtime. It will get updated later + even if `employee_id` is already up-to-date. card_number: type: string description: | @@ -15079,22 +3713,28 @@ components: nullable: true allOf: - $ref: '#/components/schemas/merchant' - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel matched_by: type: string nullable: true - description: | - String denoting the email of the user who matched the card transaction to an expense. + description: > + String denoting the email of the user who matched the card + transaction to an expense. example: john.ooe@fyle.in missing_mandatory_fields: type: object @@ -15117,15 +3757,18 @@ components: amount: type: boolean nullable: false - description: | - This field shows whether the amount field is present in the expense or not + description: > + This field shows whether the amount field is present in the expense + or not currency: type: boolean nullable: false - description: | - This field shows whether the currency field is present in the expense or not - description: | - This object contains all the fields which are mandatory bu tare missing in the expense. + description: > + This field shows whether the currency field is present in the + expense or not + description: > + This object contains all the fields which are mandatory bu tare missing + in the expense. activity_details: type: object nullable: true @@ -15224,8 +3867,9 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the merchant to which the Expense was made. + description: > + String denoting the name of the merchant to which the Expense was + made. example: Amazon is_billable: $ref: '#/components/schemas/is_billable' @@ -15279,24 +3923,29 @@ components: example: 5 policy_checks: type: object - description: | + description: > Policy checks details. - NOTE: The data of this field is not realtime. It will get updated later even if rest of fields are already up-to-date. + + NOTE: The data of this field is not realtime. It will get updated later + even if rest of fields are already up-to-date. properties: is_amount_limit_applied: type: boolean - description: | - A true value here means, that as per policy calculation this expense amount is capped based on the policy calculation. + description: > + A true value here means, that as per policy calculation this expense + amount is capped based on the policy calculation. example: true are_approvers_added: type: boolean - description: | - A true value here means, approvers are added to the expense based on the policy calculation. + description: > + A true value here means, approvers are added to the expense based on + the policy calculation. example: true is_flagged_ever: type: boolean - description: | - A true value here means, that as per policy calculation this expense is flagged. + description: > + A true value here means, that as per policy calculation this expense + is flagged. example: true violations: type: array @@ -15348,8 +3997,9 @@ components: commute_details: type: object nullable: true - description: | - Commute details of the employee. This is used to deduct daily commute from the employee's mileage expenses. + description: > + Commute details of the employee. This is used to deduct daily commute + from the employee's mileage expenses. properties: id: allOf: @@ -15488,32 +4138,46 @@ components: This date cannot be in future. source: type: string - description: | + description: > The name of the client app which is creating the expense. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: SLACK_APP merchant: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the merchant to which the Expense was made. + description: > + String denoting the name of the merchant to which the Expense was + made. example: Uber currency: $ref: '#/components/schemas/currency' amount: type: number nullable: true - description: | + description: > The amount for which the expense was/will-be fyled. - The amount will be in the currency that the organization's home currency.
- Note that, this field is calculated from admin_amount, policy_amount, claim_amount. + The amount will be in the currency that the organization's home + currency.
+ + + Note that, this field is calculated from admin_amount, + policy_amount, claim_amount. + + + if admin_amount is present then this value will be same + admin_amount. + + if policy_amount is present then this value will be same + policy_amount. - if admin_amount is present then this value will be same admin_amount. - if policy_amount is present then this value will be same policy_amount. else this should be same as claim_amount. example: 1500 claim_amount: @@ -15637,17 +4301,21 @@ components: per_diem_num_days: type: number nullable: true - description: | - Specific to per diem related expenses, number of days for which per diem claim is made. + description: > + Specific to per diem related expenses, number of days for which per + diem claim is made. example: 2 started_at: $ref: '#/components/schemas/timestamptz_utc' ended_at: $ref: '#/components/schemas/timestamptz_utc' travel_classes: - description: | - This field is applicable only for `Flight`, `Train`, `Bus`, `Taxi` category. - index 0 holds onward journey class, index 1 holds return journey travel class. + description: > + This field is applicable only for `Flight`, `Train`, `Bus`, `Taxi` + category. + + index 0 holds onward journey class, index 1 holds return journey + travel class. type: array minItems: 0 maxItems: 2 @@ -15662,9 +4330,13 @@ components: description: | This field is applicable for only `Hotel` category. locations: - description: | + description: > This field will be present for travel related categories. - For travel between Place A to Place B, this array will contain two items, From location at array index 0 and To location at array index 1. + + For travel between Place A to Place B, this array will contain two + items, From location at array index 0 and To location at array index + 1. + For travel between Place A to Place c and stopping at Place B, this type: array minItems: 0 @@ -15678,8 +4350,10 @@ components: code: type: string nullable: true - description: | - Id given by external systems like Gmail. To identify whether that entity + description: > + Id given by external systems like Gmail. To identify whether that + entity + has been already added to Fyle or not. example: wgjwgo3ihwljnlsww state: @@ -15735,18 +4409,22 @@ components: is_receipt_mandatory: type: boolean nullable: true - description: | - Determines whether a receipt is missing for this expense when it is required. + description: > + Determines whether a receipt is missing for this expense when it is + required. is_exported: type: boolean nullable: true - description: | - Determines whether this expense has been exported to external accounting system or not. + description: > + Determines whether this expense has been exported to external + accounting system or not. last_exported_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' nullable: true - description: signifies when this expense was exported to an external accounting system. + description: >- + signifies when this expense was exported to an external accounting + system. file_ids: type: array items: @@ -15789,17 +4467,22 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the corporate card transaction ids which are matched to this expense + description: > + Holds the corporate card transaction ids which are matched to this + expense example: - btxnwownwrng matched_corporate_card_transactions: type: array items: $ref: '#/components/schemas/matched_corporate_card_transaction_out_embed' - description: | - Holds the corporate card transactions which are matched to this expense. - NOTE: The data of this field is not realtime. It will get updated later even if `matched_corporate_card_transaction_ids` is already up-to-date. + description: > + Holds the corporate card transactions which are matched to this + expense. + + NOTE: The data of this field is not realtime. It will get updated + later even if `matched_corporate_card_transaction_ids` is already + up-to-date. last_settled_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -15817,12 +4500,16 @@ components: is_manually_flagged: type: boolean nullable: true - description: This fields marks whether a given expense is manually flagged or not. + description: >- + This fields marks whether a given expense is manually flagged or + not. example: true is_policy_flagged: type: boolean nullable: true - description: This fields marks whether a given expense is flagged by policy or not. + description: >- + This fields marks whether a given expense is flagged by policy or + not. example: true split_group_id: type: string @@ -15836,15 +4523,17 @@ components: is_physical_bill_submitted: type: boolean nullable: true - description: | - This fields marks if physical has been collected for the given expense. + description: > + This fields marks if physical has been collected for the given + expense. example: true physical_bill_submitted_at: type: string format: date-time example: '2020-06-11T13:14:55.201598+00:00' - description: | - Signifies if and when the physical bill for this report was submitted. + description: > + Signifies if and when the physical bill for this report was + submitted. nullable: true expense_rule_id: type: string @@ -15865,18 +4554,22 @@ components: $ref: '#/components/schemas/tax_group' approver_comments: type: array - description: | + description: > Comments added by approvers. - NOTE: The data of this field is not realtime. It will get updated later even if rest of fields are already up-to-date. + + NOTE: The data of this field is not realtime. It will get updated + later even if rest of fields are already up-to-date. items: type: string example: - This is a comment by approver verifier_comments: type: array - description: | + description: > Comments added by verifiers. - NOTE: The data of this field is not realtime. It will get updated later even if rest of fields are already up-to-date. + + NOTE: The data of this field is not realtime. It will get updated + later even if rest of fields are already up-to-date. items: type: string example: @@ -15951,8 +4644,9 @@ components: 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. + description: > + Commute details id of the expense. This id is provided by Fyle to + identify a commute details. example: 1234 commute_details: $ref: '#/components/schemas/commute_details' @@ -15985,9 +4679,11 @@ components: - MILES example: MILES travel_classes: - description: | + description: > This field is applicable only for `Flight`, `Train`, `Bus` category. - Index 0 holds onward journey travel class, index 1 holds return journey travel class. + + Index 0 holds onward journey travel class, index 1 holds return journey + travel class. type: array minItems: 0 maxItems: 2 @@ -15998,9 +4694,12 @@ components: - ECONOMY - BUSINESS locations: - description: | + description: > This field will be present for travel related categories. - For travel between Place A to Place B, this array will contain two items. From location at array index i and To location at array index i+1. + + For travel between Place A to Place B, this array will contain two + items. From location at array index i and To location at array index + i+1. type: array nullable: true minItems: 0 @@ -16075,10 +4774,15 @@ components: assignee_user_email: allOf: - $ref: '#/components/schemas/email' - description: | - An immutable field that represents the email address of the employee. - Must be compliant with RFC + description: > + An immutable field that represents the email address of the + employee. + + Must be compliant with RFC + 822. + - **Note:** - The expense will be assigned/re-assigned to this particular `employee`. - This field is required while creating an expense. @@ -16155,10 +4859,14 @@ components: items: allOf: - $ref: '#/components/schemas/fk_string' - description: | + 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.
+ + 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 @@ -16167,8 +4875,10 @@ components: mileage_rate_id: allOf: - $ref: '#/components/schemas/fk_integer' - description: | - Specific to mileage expense. This represents the Mileage's rate id given by Fyle + 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 @@ -16187,8 +4897,9 @@ components: 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. + description: > + Commute details id of the expense. This id is provided by Fyle to + identify a commute details. example: 1234 commute_deduction: type: string @@ -16207,16 +4918,22 @@ components: - $ref: '#/components/schemas/fk_integer' nullable: true example: 583 - description: | - Specific to per diem expense. This represents the per diem's rate id given by Fyle - during creation of per diem rate for which this expense is created.
+ description: > + Specific to per diem expense. This represents the per diem's rate id + given by Fyle + + during creation of per diem rate for which this expense is created. +
+ This field is required for creating Per Diem Expenses. per_diem_num_days: type: number nullable: true example: 2 - description: | - Specific to per diem related expenses, number of days for which per diem claim is made.
+ description: > + Specific to per diem related expenses, number of days for which per + diem claim is made.
+ This field is required for creating Per Diem Expenses. attach_files_to_expense_in: type: object @@ -16268,10 +4985,15 @@ components: example: https://app.example.com/expense/txwownwrng sub_feature: type: string - description: | - This field can be used to setup a collection of filters. For example, if you have multiple filters - for a single page, this can be used as an identifier to fetch all the filters for that page.
- **Note: Only combination of alphabets, numbers and _(underscore) is allowed** + description: > + This field can be used to setup a collection of filters. For example, if + you have multiple filters + + for a single page, this can be used as an identifier to fetch all the + filters for that page.
+ + **Note: Only combination of alphabets, numbers and _(underscore) is + allowed** nullable: true example: flagged_expenses expense_filters_out: @@ -16339,8 +5061,9 @@ components: query_params: nullable: false type: string - description: | - Query param string similar to expenses GET call. Use group_by_state=eq.true to get state-wise grouping of stats. + description: > + Query param string similar to expenses GET call. Use + group_by_state=eq.true to get state-wise grouping of stats. example: id=in.('tx1263', 'tx1569')&group_by_state=eq.true expenses_stats_out: oneOf: @@ -16420,8 +5143,9 @@ components: total_amount: 0 query_params: type: string - description: | - This field contains the query param string similar to the query params passed in GET call for displaying data in the list view. + description: > + This field contains the query param string similar to the query params + passed in GET call for displaying data in the list view. example: state=eq.PAID expenses_export_config_column_formula: type: object @@ -16445,8 +5169,11 @@ components: - yyyy-MM-dd'T'HH:mm:ss - dd-MM-yyyy - error in date formatting - description: | - Export column formula is a expression that is used to transform the data. Refer https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas for more details. + description: > + Export column formula is a expression that is used to transform the + data. Refer + https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas + for more details. expenses_export_config: type: object additionalProperties: true @@ -16469,8 +5196,9 @@ components: properties: enabled: type: boolean - description: | - Whether to show the double rows for each line item in the export file. + description: > + Whether to show the double rows for each line item in the export + file. example: false debit_entries_only: type: array @@ -16488,8 +5216,9 @@ components: Configure which columns to show for credit entries. example: - credit_amount - description: | - Configure how to show the double rows for each line item in the export file, if enabled. + description: > + Configure how to show the double rows for each line item in the + export file, if enabled. columns: type: array items: @@ -16616,18 +5345,21 @@ components: example: true can_remove_from_report: type: boolean - description: | - Indicates whether the user has permission to remove this expense from a report. + description: > + Indicates whether the user has permission to remove this expense + from a report. example: false can_assign: type: boolean - description: | - Indicates whether the user has permission to assign this expense to another user. + description: > + Indicates whether the user has permission to assign this expense to + another user. example: false can_add_to_report: type: boolean - description: | - Indicates whether the user has permission to add this expense to a report. + description: > + Indicates whether the user has permission to add this expense to a + report. example: true target_expense_fields: type: object @@ -16680,10 +5412,14 @@ components: category_id: allOf: - $ref: '#/components/schemas/fk_integer' - description: | - This represents the category's id given by Fyle during creation of category + description: > + This represents the category's id given by Fyle during creation of + category + for which this expense is created. - Null is not allowed for category_id field instead pass Unspecified category Id + + Null is not allowed for category_id field instead pass Unspecified + category Id example: 49058 cost_center_id: allOf: @@ -16853,9 +5589,12 @@ components: maxLength: 255 nullable: true example: E84122 - description: | - This field refers to any string that the client programs can use to refer to an employee's unique id. - This could be any field such as an UUID from an Active Directory server or employee id in a HRMS system. + description: > + This field refers to any string that the client programs can use to + refer to an employee's unique id. + + This could be any field such as an UUID from an Active Directory + server or employee id in a HRMS system. org_id: $ref: '#/components/schemas/org_id' department_id: @@ -16957,10 +5696,14 @@ components: source: type: string nullable: true - description: | + description: > The name of the client app from which this advance was created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP state: @@ -16997,8 +5740,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this advance request has been exported to external accounting system or not. + description: > + Determines whether this advance request has been exported to + external accounting system or not. employee_id: $ref: '#/components/schemas/employee_id' employee: @@ -17047,10 +5791,14 @@ components: source: type: string nullable: true - description: | + description: > The name of the client app from which this advance was created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP project_id: @@ -17060,8 +5808,9 @@ components: advance_requests_stats_in: properties: query_params: - description: | - Query param string similar to advance_requests GET call. Use group_by_state=eq.true to get state-wise grouping of stats. + description: > + Query param string similar to advance_requests GET call. Use + group_by_state=eq.true to get state-wise grouping of stats. nullable: false example: id=in.('adr1263','adr1569')&group_by_state=eq.true advance_requests_stats_out: @@ -17320,10 +6069,14 @@ components: source: type: string nullable: true - description: | + description: > The name of the client app from which this advance was created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP project_id: @@ -17345,13 +6098,16 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this advance has been exported to external accounting system or not. + description: > + Determines whether this advance has been exported to external + accounting system or not. last_exported_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' nullable: true - description: signifies when this advance was exported to an external accounting system. + description: >- + signifies when this advance was exported to an external accounting + system. custom_fields: $ref: '#/components/schemas/custom_fields' employee_id: @@ -17414,10 +6170,14 @@ components: source: type: string nullable: true - description: | + description: > The name of the client app from which this advance was created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP project_id: @@ -17434,8 +6194,10 @@ components: properties: query_params: type: string - description: | - This field contains the query param string similar to the query params passed in advances GET call for displaying advances in the list view. + description: > + This field contains the query param string similar to the query + params passed in advances GET call for displaying advances in the + list view. nullable: false example: id=in.('adv1263', 'adv1569') advances_stats_out: @@ -17443,15 +6205,19 @@ components: properties: count: type: integer - description: | - This field represents the total number of advances that match the criteria specified in the query_params within the body of the request. + description: > + This field represents the total number of advances that match the + criteria specified in the query_params within the body of the + request. nullable: false example: 1 total_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the sum of amount of advances that match the criteria specified in the query_params within the body of the request. + description: > + This field indicates the sum of amount of advances that match the + criteria specified in the query_params within the body of the + request. example: 100 advance_wallet_out: type: object @@ -17545,10 +6311,15 @@ components: source: type: string nullable: true - description: | - The name of the client app from which this advance refund was created. + description: > + The name of the client app from which this advance refund was + created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP card_number: @@ -17601,10 +6372,15 @@ components: source: type: string nullable: true - description: | - The name of the client app from which this advance refund was created. + description: > + The name of the client app from which this advance refund was + created. + if its a thrid party app, it prefixed with TPA_. - Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If not + + Ex - If you pass SLACK_APP, it will be saved as TPA_SLACK_APP. If + not + passed, source is saved as TPA. example: WEBAPP card_number: @@ -17619,8 +6395,10 @@ components: properties: query_params: type: string - description: | - This field contains the query param string similar to the query params passed in advance_refunds GET call for displaying advance_refunds in the list view. + description: > + This field contains the query param string similar to the query + params passed in advance_refunds GET call for displaying + advance_refunds in the list view. nullable: false example: id=in.('adr1263', 'adr1569') advance_refunds_stats_out: @@ -17628,15 +6406,19 @@ components: properties: count: type: integer - description: | - This field represents the total number of advance_refunds that match the criteria specified in the query_params within the body of the refund. + description: > + This field represents the total number of advance_refunds that match + the criteria specified in the query_params within the body of the + refund. nullable: false example: 1 total_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the sum of amount of advance_refunds that match the criteria specified in the query_params within the body of the refund. + description: > + This field indicates the sum of amount of advance_refunds that match + the criteria specified in the query_params within the body of the + refund. example: 100 reminder_type: type: string @@ -17753,8 +6535,9 @@ components: $ref: '#/components/schemas/reminder_type' message: type: string - description: | - The custom message which the admin wants to send alongside the reminder + description: > + The custom message which the admin wants to send alongside the + reminder example: Please fyle your expenses before 25th of this month schedule_config: $ref: '#/components/schemas/reminder_schedule_config' @@ -17762,20 +6545,29 @@ components: type: string format: date-time nullable: true - description: Signifies the time when this reminder was sent. In case of scheduled reminders, signifies when the last reminder was sent. Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: >- + Signifies the time when this reminder was sent. In case of scheduled + reminders, signifies when the last reminder was sent. Date-time in + [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2021-06-01T13:14:54.804+00:00' next_reminder_at: type: string format: date-time nullable: true - description: Only valid for scheduled reminders. Signifies the time when the next reminder will be sent according to the schedule_config. Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: >- + Only valid for scheduled reminders. Signifies the time when the next + reminder will be sent according to the schedule_config. Date-time in + [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2021-06-01T13:14:54.804+00:00' add_to_calendar: type: boolean nullable: false default: false - description: | - Determines whether this reminder will be added as an event in the google calendar of receiver. + description: > + Determines whether this reminder will be added as an event in the + google calendar of receiver. example: true receiver_user_ids: $ref: '#/components/schemas/reminder_receiver_user_ids' @@ -17802,8 +6594,9 @@ components: type: boolean nullable: false default: false - description: | - Determines whether this reminder will be added as an event in the google calendar of receiver. + description: > + Determines whether this reminder will be added as an event in the + google calendar of receiver. example: true receiver_user_ids: $ref: '#/components/schemas/reminder_receiver_user_ids' @@ -17833,9 +6626,12 @@ components: maxLength: 255 nullable: true example: E84122 - description: | - This field refers to any string that the client programs can use to refer to an employee's unique id. - This could be any field such as an UUID from an Active Directory server or employee id in a HRMS system. + description: > + This field refers to any string that the client programs can use to + refer to an employee's unique id. + + This could be any field such as an UUID from an Active Directory + server or employee id in a HRMS system. org_id: $ref: '#/components/schemas/org_id' org_name: @@ -17855,18 +6651,21 @@ components: added: nullable: true type: boolean - description: | - This field indicates whether employee has added a bank account to receive ACH reimbursements. + description: > + This field indicates whether employee has added a bank account + to receive ACH reimbursements. verified: nullable: true type: boolean - description: | - This field indicates whether employee's bank account, added to receive ACH reimbursements, is verified. + description: > + This field indicates whether employee's bank account, added to + receive ACH reimbursements, is verified. suspended: nullable: true type: boolean - description: | - This field indicates whether employee's ACH account is suspended. + description: > + This field indicates whether employee's ACH account is + suspended. business_unit: type: string maxLength: 255 @@ -17929,7 +6728,10 @@ components: type: string description: | Description of current status of the payment. - example: Kindly ask the employee to add a valid bank account in their Settings. You'll then be able to see the bank icon next to the payment number, after which you can retry the payment. + example: >- + Kindly ask the employee to add a valid bank account in their + Settings. You'll then be able to see the bank icon next to the + payment number, after which you can retry the payment. nullable: true initiated_at: nullable: true @@ -18107,8 +6909,9 @@ components: type: string format: date-time example: '2020-06-11T13:14:55.201598+00:00' - description: | - Signifies if and when the physical bill for this report was submitted. + description: > + Signifies if and when the physical bill for this report was + submitted. nullable: true is_manually_flagged: type: boolean @@ -18121,8 +6924,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this expense has been exported to external accounting system or not. + description: > + Determines whether this expense has been exported to external + accounting system or not. last_paid_at: type: string format: date-time @@ -18265,8 +7069,10 @@ components: $ref: '#/components/schemas/id_string' purpose: type: string - description: | - Indicates purpose of the reports. It can only be updated for an existing report when the report is in `APPROVER_PENDING` or `APPROVED` state. + description: > + Indicates purpose of the reports. It can only be updated for an + existing report when the report is in `APPROVER_PENDING` or + `APPROVED` state. example: '#1: Jun 2020' report_action_with_expenses_ids_to_eject: type: object @@ -18457,8 +7263,9 @@ components: paid_notify_at: type: string format: date-time - description: | - This field indicates when should user receive notification regarding reimbursement + description: > + This field indicates when should user receive notification regarding + reimbursement example: '2022-12-02T17:58:21.406Z' code: $ref: '#/components/schemas/code' @@ -18508,19 +7315,22 @@ components: example: 100 missing_bank_details_count: type: integer - description: | - This field indicates the count of reports with missing users bank account details. + description: > + This field indicates the count of reports with missing users bank + account details. example: 2 missing_bank_details_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the total amount of reports with missing users bank account details. + description: > + This field indicates the total amount of reports with missing users + bank account details. example: 101 missing_bank_details_employee_count: type: integer - description: | - This field indicates the count of employees with missing users bank account details. + description: > + This field indicates the count of employees with missing users bank + account details. example: 2 missing_bank_details_employee_ids: type: array @@ -18529,18 +7339,21 @@ components: - $ref: '#/components/schemas/id_string' example: - ouN7x27CwrwC - description: | - This field contains list of employee_ids whose bank accounts are missing. + description: > + This field contains list of employee_ids whose bank accounts are + missing. payment_initiated_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the total amount of reports that are in payment_processing and ach_initiated state. + description: > + This field indicates the total amount of reports that are in + payment_processing and ach_initiated state. example: 101 payment_initiated_count: type: integer - description: | - This field indicates the count of reports that are in payment_processing and ach_initiated state. + description: > + This field indicates the count of reports that are in + payment_processing and ach_initiated state. example: 2 reimbursable_amount: allOf: @@ -18564,8 +7377,9 @@ components: - $ref: '#/components/schemas/id_string' example: - re123453 - description: | - This field contains list of report_ids that can directly be closed(with reimbursable amount as 0). + description: > + This field contains list of report_ids that can directly be + closed(with reimbursable amount as 0). report_accounting_export_summary_in: type: object required: @@ -18577,8 +7391,9 @@ components: properties: query_params: type: string - description: | - Query param string similar to reports GET call. Use group_by_state=eq.true to get state-wise grouping of stats. + description: > + Query param string similar to reports GET call. Use + group_by_state=eq.true to get state-wise grouping of stats. nullable: false example: id=in.('rp123','rep1234')&group_by_state=eq.true reports_stats_out: @@ -18622,31 +7437,43 @@ components: failed_amount: type: number nullable: true - description: Sum of reimbursable amount for ACH-failed reports, applicable only in PAYMENT_PROCESSING state. + description: >- + Sum of reimbursable amount for ACH-failed reports, applicable + only in PAYMENT_PROCESSING state. example: 200 failed_count: type: integer nullable: true - description: Count of ACH-failed reports, applicable only in PAYMENT_PROCESSING state. + description: >- + Count of ACH-failed reports, applicable only in + PAYMENT_PROCESSING state. example: 1 processing_amount: type: number nullable: true - description: Sum of reimbursable amount for processing reports, applicable only in PAYMENT_PROCESSING state. + description: >- + Sum of reimbursable amount for processing reports, applicable + only in PAYMENT_PROCESSING state. example: 1500 processing_count: type: integer nullable: true - description: Count of processing reports, applicable only in PAYMENT_PROCESSING state. + description: >- + Count of processing reports, applicable only in + PAYMENT_PROCESSING state. example: 3 reimbursable_amount: type: number nullable: false - description: Sum of reimbursable amounts for matching reports in this state. + description: >- + Sum of reimbursable amounts for matching reports in this + state. example: 500 - type: object title: Overall stats - description: Overall stats without state grouping (response for older mobile app versions). + description: >- + Overall stats without state grouping (response for older mobile app + versions). required: - count - total_amount @@ -18678,7 +7505,9 @@ components: failed_amount: type: number nullable: true - description: Sum of reimbursable amounts for reports in processing state with ACH failures. + description: >- + Sum of reimbursable amounts for reports in processing state with + ACH failures. example: 101 failed_count: type: integer @@ -18848,8 +7677,11 @@ components: - yyyy-MM-dd'T'HH:mm:ss - dd-MM-yyyy - error in date formatting - description: | - Export column formula is a expression that is used to transform the data. Refer https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas for more details. + description: > + Export column formula is a expression that is used to transform the + data. Refer + https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas + for more details. reports_export_config: type: object additionalProperties: true @@ -18865,21 +7697,24 @@ components: example: csv include_receipts: type: boolean - description: | - Whether to include receipts in the export file or not. Only required for PDF exports. + description: > + Whether to include receipts in the export file or not. Only required + for PDF exports. example: true is_header_visible: type: boolean - description: | - Whether to show the header in the export file. Only required for CSV and XLSX exports. + description: > + Whether to show the header in the export file. Only required for CSV + and XLSX exports. example: true separate_line_items_entry: type: object properties: enabled: type: boolean - description: | - Whether to show the double rows for each line item in the export file. + description: > + Whether to show the double rows for each line item in the export + file. example: false debit_entries_only: type: array @@ -18897,8 +7732,9 @@ components: Configure which columns to show for credit entries. example: - credit_amount - description: | - Configure how to show the double rows for each line item in the export file, if enabled. Only required for CSV and XLSX exports. + description: > + Configure how to show the double rows for each line item in the + export file, if enabled. Only required for CSV and XLSX exports. columns: type: array items: @@ -18914,8 +7750,9 @@ components: - $ref: '#/components/schemas/reports_export_config_column_formula' description: | Formula to transform the data in the column. - description: | - Configure the columns to show in the export file. Only required for CSV and XLSX exports. + description: > + Configure the columns to show in the export file. Only required for + CSV and XLSX exports. reports_exports_out: type: object additionalProperties: false @@ -19023,14 +7860,17 @@ components: data_feed_source: type: string nullable: true - description: | - signifies the source of how card is added and how further card transactions could be synced + description: > + signifies the source of how card is added and how further card + transactions could be synced example: BANK FEED - CDF code: type: string nullable: true - description: | - Id given by external systems like Gmail. To identify whether that entity + description: > + Id given by external systems like Gmail. To identify whether that + entity + has been already added to Fyle or not. example: wgjwgo3ihwljnlsww yodlee_account_id: @@ -19108,8 +7948,9 @@ components: - READY_FOR_VERIFICATION virtual_card_id: type: string - description: | - The unique id of the virtual card, if the card is created from virtual card. + description: > + The unique id of the virtual card, if the card is created from + virtual card. nullable: true example: viasdfasdfddd virtual_card_state: @@ -19202,14 +8043,17 @@ components: data_feed_source: type: string nullable: true - description: | - signifies the source of how card is added and how further card transactions could be synced + description: > + signifies the source of how card is added and how further card + transactions could be synced example: BANK FEED - CDF code: type: string nullable: true - description: | - Id given by external systems like Gmail. To identify whether that entity + description: > + Id given by external systems like Gmail. To identify whether that + entity + has been already added to Fyle or not. example: wgjwgo3ihwljnlsww last_synced_at: @@ -19233,8 +8077,9 @@ components: query_params: nullable: false type: string - description: | - This field contains the query param string, which can be used to fetch data for assigned and unassigned cards. + description: > + This field contains the query param string, which can be used to + fetch data for assigned and unassigned cards. example: user_id=eq.null corporate_card_stats_out: type: object @@ -19248,8 +8093,9 @@ components: transactions_count: type: integer nullable: false - description: | - This field indicates the total count of transactions, present for the cards. + description: > + This field indicates the total count of transactions, present for + the cards. example: 1000 corporate_card_assign_in: type: object @@ -19289,8 +8135,9 @@ components: full_name: type: string maxLength: 255 - description: | - Represents the full name of the Employee. Must be at least 3 characters. + description: > + Represents the full name of the Employee. Must be at least 3 + characters. example: John Doe example: null corporate_card_unassign_out: @@ -19337,14 +8184,17 @@ components: data_feed_source: type: string nullable: true - description: | - signifies the source of how card is added and how further card transactions could be synced + description: > + signifies the source of how card is added and how further card + transactions could be synced example: BANK FEED - CDF code: type: string nullable: true - description: | - Id given by external systems like Gmail. To identify whether that entity + description: > + Id given by external systems like Gmail. To identify whether that + entity + has been already added to Fyle or not. example: wgjwgo3ihwljnlsww yodlee_account_id: @@ -19418,8 +8268,9 @@ components: nullable: true virtual_card_id: type: string - description: | - The unique id of the virtual card, if the card is created from virtual card. + description: > + The unique id of the virtual card, if the card is created from + virtual card. nullable: true example: viasdfasdfddd virtual_card_state: @@ -19501,7 +8352,9 @@ components: - user_id string_detail: type: string - description: Additional string details of the card transaction. Can hold details upto 256 characters in length. + description: >- + Additional string details of the card transaction. Can hold details upto + 256 characters in length. nullable: true example: sample string corporate_card_out_embed: @@ -19592,8 +8445,9 @@ components: type: string nullable: true maxLength: 255 - description: | - String denoting the name of the merchant to which the Expense was made. + description: > + String denoting the name of the merchant to which the Expense was + made. example: Uber foreign_currency: $ref: '#/components/schemas/foreign_currency' @@ -19634,14 +8488,18 @@ components: example: Travel double_precision_detail: type: number - description: Additional floating point numeric details of the card transaction. Same as double precision. + description: >- + Additional floating point numeric details of the card transaction. Same + as double precision. nullable: true example: 468.2923 timestamp_detail: type: string format: date-time - description: | - Additional details of the card transaction. RFC 3339, section 5.6 compliant timestamp. + description: > + Additional details of the card transaction. RFC 3339, section + 5.6 compliant timestamp. example: '2020-07-03T18:19:31.193Z' nullable: true integer_detail: @@ -19657,8 +8515,9 @@ components: corporate_card_transaction_metadata: type: object nullable: true - description: | - Additional data that can optionally be stored. Some example details are added for reference. + description: > + Additional data that can optionally be stored. Some example details are + added for reference. properties: merchant_category_code: $ref: '#/components/schemas/string_detail' @@ -19750,8 +8609,9 @@ components: example: null mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' user: @@ -19783,8 +8643,9 @@ components: enum: - POSTED - PENDING - description: | - Holds the status of the Corporate Card Transaction, whether posted or still pending. + description: > + Holds the status of the Corporate Card Transaction, whether posted + or still pending. description: type: string nullable: true @@ -19794,8 +8655,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -19819,17 +8681,22 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -19858,8 +8725,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -19891,8 +8759,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: - txwownwrng last_auto_matched_at: @@ -19922,8 +8791,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -20004,22 +8874,28 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' corporate_card_id: @@ -20082,8 +8958,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -20101,23 +8978,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -20148,8 +9031,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -20178,8 +9062,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -20209,8 +9094,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -20256,9 +9142,12 @@ components: query_params: nullable: false type: string - description: | - This field contains the query param string similar to the query params passed in corporate card transactions GET call for displaying transactions in the list view. - example: amount=gt.0&amount=lt.1000&created_at=gt.2021-01-01T00:00:00.000Z&created_at=lt.2021-12-31T23:59:59.999Z + description: > + This field contains the query param string similar to the query + params passed in corporate card transactions GET call for displaying + transactions in the list view. + example: >- + amount=gt.0&amount=lt.1000&created_at=gt.2021-01-01T00:00:00.000Z&created_at=lt.2021-12-31T23:59:59.999Z corporate_card_transactions_stats_out: type: object properties: @@ -20271,14 +9160,16 @@ components: debit_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the sum of amount of the debit type corporate card transactions. + description: > + This field indicates the sum of amount of the debit type corporate + card transactions. example: 1239 credit_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the sum of amount of the credit type corporate card transactions. + description: > + This field indicates the sum of amount of the credit type corporate + card transactions. example: 101 corporate_card_transactions_delete_summary_in: type: object @@ -20295,14 +9186,16 @@ components: delete_count: type: integer nullable: false - description: | - This field indicates the count of corporate card transactions that can be deleted. + description: > + This field indicates the count of corporate card transactions that + can be deleted. example: 1 delete_amount: allOf: - $ref: '#/components/schemas/amount' - description: | - This field indicates the sum of amount of the corporate card transactions that can be deleted. + description: > + This field indicates the sum of amount of the corporate card + transactions that can be deleted. example: 101 corporate_card_transactions_delete_in: type: object @@ -20367,8 +9260,9 @@ components: example: btxnwownwrng user_id: type: string - description: | - The unique id of an user to whom the card transaction should be assigned. + description: > + The unique id of an user to whom the card transaction should be + assigned. example: usge49ielgel required: - id @@ -20416,8 +9310,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -20435,23 +9330,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -20480,8 +9381,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -20510,8 +9412,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -20541,8 +9444,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -20592,8 +9496,9 @@ components: example: btxnwownwrng user_id: type: string - description: | - The unique id of an user to whom the card transaction should be reassigned. + description: > + The unique id of an user to whom the card transaction should be + reassigned. example: usge49ielgel required: - id @@ -20655,8 +9560,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -20674,23 +9580,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -20720,8 +9632,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -20737,8 +9650,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false last_dismissed_at: allOf: @@ -20756,8 +9670,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -20865,8 +9780,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -20884,23 +9800,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -20929,8 +9851,9 @@ components: is_marked_personal: type: boolean example: true - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -20958,8 +9881,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -20989,8 +9913,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' required: @@ -21072,8 +9997,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -21091,23 +10017,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -21136,8 +10068,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -21165,8 +10098,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -21196,8 +10130,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -21280,8 +10215,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -21305,23 +10241,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -21350,8 +10292,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -21379,8 +10322,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -21410,8 +10354,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -21491,8 +10436,9 @@ components: enum: - POSTED - PENDING - description: | - Holds the status of the Corporate Card Transaction, whether posted or still pending. + description: > + Holds the status of the Corporate Card Transaction, whether posted + or still pending. description: type: string nullable: true @@ -21502,8 +10448,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -21527,23 +10474,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -21572,8 +10525,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -21601,8 +10555,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] bank_transaction_number: type: string @@ -21638,8 +10593,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -21739,8 +10695,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -21764,23 +10721,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -21809,8 +10772,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. last_marked_personal_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -21839,8 +10803,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -21870,8 +10835,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. example: false metadata: $ref: '#/components/schemas/corporate_card_transaction_metadata' @@ -21967,8 +10933,9 @@ components: enum: - POSTED - PENDING - description: | - Holds the status of the Corporate Card Transaction, whether posted or still pending. + description: > + Holds the status of the Corporate Card Transaction, whether posted + or still pending. description: type: string nullable: true @@ -21978,8 +10945,9 @@ components: statement_id: type: string nullable: true - description: | - If the transaction is created by statement uploaded then this key refers to the source statement. + description: > + If the transaction is created by statement uploaded then this key + refers to the source statement. example: stmtdasfdsaf3 can_delete: type: boolean @@ -22003,23 +10971,29 @@ components: type: string maxLength: 255 nullable: true - description: | - String denoting the name of the vendor to which the card transaction was made. - Note: This is not same as the merchant added in Fyle but just a string + description: > + String denoting the name of the vendor to which the card transaction + was made. + + Note: This is not same as the merchant added in Fyle but just a + string example: Uber mcc: type: string - description: | - This refers to the merchant category code for which this card transaction is made. + description: > + This refers to the merchant category code for which this card + transaction is made. $ref: '#/components/schemas/string_detail' example: '5102' category: type: string maxLength: 255 nullable: true - description: | + description: > String denoting the category of the card transaction - Note: This is not same as the category added in Fyle but just a string + + Note: This is not same as the category added in Fyle but just a + string example: Travel corporate_card_id: allOf: @@ -22048,8 +11022,9 @@ components: is_marked_personal: type: boolean example: false - description: | - Determines whether this card transaction is marked as personal transaction made on the corporate card. + description: > + Determines whether this card transaction is marked as personal + transaction made on the corporate card. bank_transaction_number: type: string nullable: true @@ -22071,8 +11046,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this CCC transaction has been exported to external accounting system or not. + description: > + Determines whether this CCC transaction has been exported to + external accounting system or not. last_dismissed_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' @@ -22089,8 +11065,9 @@ components: type: array items: $ref: '#/components/schemas/id_string' - description: | - Holds the expense ids which are automatically suggested to be matched by the system + description: > + Holds the expense ids which are automatically suggested to be + matched by the system example: [] last_auto_matched_at: allOf: @@ -22176,8 +11153,11 @@ components: - yyyy-MM-dd'T'HH:mm:ss - dd-MM-yyyy - error in date formatting - description: | - Export column formula is a expression that is used to transform the data. Refer https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas for more details. + description: > + Export column formula is a expression that is used to transform the + data. Refer + https://www.fylehq.com/help/en/articles/4422306-advanced-export-formulas + for more details. corporate_card_transactions_export_config: type: object additionalProperties: true @@ -22192,16 +11172,18 @@ components: example: csv is_header_visible: type: boolean - description: | - Whether to show the header in the export file. Only required for CSV and XLSX exports. + description: > + Whether to show the header in the export file. Only required for CSV + and XLSX exports. example: true separate_line_items_entry: type: object properties: enabled: type: boolean - description: | - Whether to show the double rows for each line item in the export file. + description: > + Whether to show the double rows for each line item in the export + file. example: false debit_entries_only: type: array @@ -22219,8 +11201,9 @@ components: Configure which columns to show for credit entries. example: - credit_amount - description: | - Configure how to show the double rows for each line item in the export file, if enabled. Only required for CSV and XLSX exports. + description: > + Configure how to show the double rows for each line item in the + export file, if enabled. Only required for CSV and XLSX exports. columns: type: array items: @@ -22233,11 +11216,13 @@ components: example: Spent Date formula: allOf: - - $ref: '#/components/schemas/corporate_card_transactions_export_config_column_formula' + - $ref: >- + #/components/schemas/corporate_card_transactions_export_config_column_formula description: | Formula to transform the data in the column. - description: | - Configure the columns to show in the export file. Only required for CSV and XLSX exports. + description: > + Configure the columns to show in the export file. Only required for + CSV and XLSX exports. corporate_card_transactions_exports_in: type: object additionalProperties: false @@ -22267,22 +11252,25 @@ components: type: string format: date-time nullable: true - description: | - Signifies when this was processed in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: > + Signifies when this was processed in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2020-06-11T13:14:55.201598+00:00' completed_at: type: string format: date-time nullable: true - description: | - Signifies when this was completed in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: > + Signifies when this was completed in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2020-06-11T13:14:55.201598+00:00' failed_at: type: string format: date-time nullable: true - description: | - Signifies when this was failed in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + description: > + Signifies when this was failed in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). example: '2020-06-11T13:14:55.201598+00:00' corporate_card_transactions_exports_out: type: object @@ -22391,14 +11379,16 @@ components: valid_from_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' - description: | - Specifies the valid from date of the card, ie from when the card would be active. + description: > + Specifies the valid from date of the card, ie from when the card + would be active. example: '2022-02-01' valid_till_at: allOf: - $ref: '#/components/schemas/timestamptz_utc' - description: | - Specifies the valid till date of the card, ie till when the card would be active. + description: > + Specifies the valid till date of the card, ie till when the card + would be active. example: '2022-02-01' creator_user_id: type: string @@ -22407,13 +11397,15 @@ components: example: useradfasd virtual_card_user_id: type: string - description: | - This id refers to the virtual card user to whom the virtual card is assigned. + description: > + This id refers to the virtual card user to whom the virtual card is + assigned. example: vcg2Bl78jstf nick_name: type: string - description: | - Represents user defined nick name associated with the virtual card for easier recognition. + description: > + Represents user defined nick name associated with the virtual card + for easier recognition. example: john required: - id @@ -22628,8 +11620,9 @@ components: type: string format: date-time example: '2020-06-11T13:14:55.201598+00:00' - description: | - Signifies if and when the physical bill for this report was submitted. + description: > + Signifies if and when the physical bill for this report was + submitted. nullable: true is_manually_flagged: type: boolean @@ -22642,8 +11635,9 @@ components: is_exported: type: boolean nullable: true - description: | - Determines whether this expense has been exported to external accounting system or not. + description: > + Determines whether this expense has been exported to external + accounting system or not. last_paid_at: type: string format: date-time @@ -22820,8 +11814,10 @@ components: $ref: '#/components/schemas/updated_at' reimbursement_number: type: string - description: | - A unique, organization wide identifier for a particular reimbursement.
+ description: > + A unique, organization wide identifier for a particular + reimbursement.
+ This id is always prefixed with `P/`. example: P/2020/11/29 creator_user_id: @@ -23058,13 +12054,23 @@ components: time_interval_marker: type: string nullable: false - description: | - Representation of a point in time for which the sum of amount of expenses is calculated. + description: > + Representation of a point in time for which the sum of amount of + expenses is calculated. + Value depends of value of time_interval_granularity as follows : - - for time_interval_granularity of `day`, value will be in date format YYYY-MM-DD. Example : 2021-01-01 - - for time_interval_granularity of `month`, value will be in date format YYYY-MM. Example : 2021-01 - - for time_interval_granularity of `quarter`, value will be in date format YYYY-QQ. Example : 2021-Q1 - - for time_interval_granularity of `year`, value will be in date format YYYY. Example : 2021 + + - for time_interval_granularity of `day`, value will be in date format + YYYY-MM-DD. Example : 2021-01-01 + + - for time_interval_granularity of `month`, value will be in date format + YYYY-MM. Example : 2021-01 + + - for time_interval_granularity of `quarter`, value will be in date + format YYYY-QQ. Example : 2021-Q1 + + - for time_interval_granularity of `year`, value will be in date format + YYYY. Example : 2021 example: 2022-02 spend_overview_summary_data_out: type: object @@ -23076,13 +12082,15 @@ components: $ref: '#/components/schemas/time_interval_marker' spend_overview_percentage: type: number - description: | - Percentage of spend which falls under this object/resource after filtering criteria is applied. + description: > + Percentage of spend which falls under this object/resource after + filtering criteria is applied. example: 10.34 spend_overview_change_percentage: type: number - description: | - Change in percentage of spend compared to spend in same time period one time interval ago, after filtering criteria is applied. + description: > + Change in percentage of spend compared to spend in same time period one + time interval ago, after filtering criteria is applied. example: -4.95 spend_overview_by_merchant_data_out: type: object @@ -23198,8 +12206,9 @@ components: type: string nullable: true maxLength: 15 - description: | - This id provided by Fyle to identify a user. This can be null if the corporate card is not assigned to any user. + description: > + This id provided by Fyle to identify a user. This can be null if the + corporate card is not assigned to any user. example: sdfd2391 amount: $ref: '#/components/schemas/amount' @@ -23643,7 +12652,9 @@ components: domain: type: string maxLength: 255 - description: This field specifies the domain with which the organisation is registered. + description: >- + This field specifies the domain with which the organisation is + registered. example: example.com currency: $ref: '#/components/schemas/currency' @@ -23653,10 +12664,14 @@ components: $ref: '#/components/schemas/updated_at' is_current: type: boolean - description: A boolean flag indicating whether the organisation is the current organisation the user is logged into. + description: >- + A boolean flag indicating whether the organisation is the current + organisation the user is logged into. is_primary: type: boolean - description: A boolean flag indicating whether the organisation is the primary organisation of the user. + description: >- + A boolean flag indicating whether the organisation is the primary + organisation of the user. expense_policy_limit_type: nullable: true type: string @@ -23730,8 +12745,9 @@ components: - WEBAPP_EXPENSE_MILEAGE_SLAB_RATE - WEBAPP_PROJECT_APPROVAL - DEFAULT_PRIMARY_APPROVER_POLICY - description: | - This represents the source of the expense policy rule, i.e. from where it was created. + description: > + This represents the source of the expense policy rule, i.e. from + where it was created. example: WEBAPP_POLICY_FORM is_enabled: type: boolean @@ -23743,13 +12759,16 @@ components: Whether the policy rule is retired and can't be made active again. is_approver_policy: type: boolean - description: | - Whether the policy rule adds an approver to the expense on violation. + description: > + Whether the policy rule adds an approver to the expense on + violation. approver_order: type: number nullable: true - description: | - This number indicates the order of the approver expense policy rule in the defined approval sequence. For non-approver policies, this field will be null. + description: > + This number indicates the order of the approver expense policy rule + in the defined approval sequence. For non-approver policies, this + field will be null. minimum: 1 example: 3 org_id: @@ -23769,24 +12788,28 @@ components: anyOf: - $ref: '#/components/schemas/currency' - $ref: '#/components/schemas/null_field' - description: | + description: > The three-letter currency code following ISO standard ISO 4217. + + href='https://www.iso.org/iso-4217-currency-codes.html'>ISO + 4217. expense_amount_max: nullable: true anyOf: - $ref: '#/components/schemas/amount' - $ref: '#/components/schemas/null_field' - description: | - If an expense's amount exceeds this value, this policy rule will be violated for that expense. + description: > + If an expense's amount exceeds this value, this policy rule will be + violated for that expense. example: 10000 expense_amount_min: nullable: true anyOf: - $ref: '#/components/schemas/amount' - $ref: '#/components/schemas/null_field' - description: | - If an expense's amount falls behind this value, this policy rule will be violated for that expense. + description: > + If an expense's amount falls behind this value, this policy rule + will be violated for that expense. example: 500 expense_fiscal_start_month: nullable: true @@ -23800,15 +12823,17 @@ components: nullable: true allOf: - $ref: '#/components/schemas/distance' - description: | - If an expense's distance exceeds this value, this policy rule will be violated for that expense. + description: > + If an expense's distance exceeds this value, this policy rule will + be violated for that expense. example: 10000 expense_distance_min: nullable: true allOf: - $ref: '#/components/schemas/distance' - description: | - If an expense's distance falls behind this value, this policy rule will be violated for that expense. + description: > + If an expense's distance falls behind this value, this policy rule + will be violated for that expense. example: 500 expense_category_ids: nullable: true @@ -23824,9 +12849,14 @@ components: nullable: true allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the categories listed in the field `expense_category_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the categories listed in the field `expense_category_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the categories listed in the field + `expense_category_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the categories listed in + the field `expense_category_ids`. expense_project_ids: nullable: true type: array @@ -23841,9 +12871,14 @@ components: nullable: true allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the projects listed in the field `expense_project_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the projects listed in the field `expense_project_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the projects listed in the field + `expense_project_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the projects listed in the + field `expense_project_ids`. expense_cost_center_ids: nullable: true type: array @@ -23858,22 +12893,29 @@ components: nullable: true allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the cost centers listed in the field `expense_cost_center_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the cost centers listed in the field `expense_cost_center_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the cost centers listed in the field + `expense_cost_center_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the cost centers listed in + the field `expense_cost_center_ids`. expense_allowed_exchange_rate_difference_percentage: nullable: true type: number - description: | - Allowed percentage difference for exchange rates beyond which this policy rule will be violated. + description: > + Allowed percentage difference for exchange rates beyond which this + policy rule will be violated. example: 10 minimum: 0 maximum: 100 expense_allowed_distance_difference_percentage: nullable: true type: number - description: | - Allowed distance percentage difference beyond which this policy rule will be violated. + description: > + Allowed distance percentage difference beyond which this policy rule + will be violated. example: 8 minimum: 0 maximum: 100 @@ -23905,26 +12947,31 @@ components: nullable: true type: number example: 12 - description: | - This value decides how delayed an expense creation can be. If the expense is created after this many days of spend date, this policy rule will be violated. + description: > + This value decides how delayed an expense creation can be. If the + expense is created after this many days of spend date, this policy + rule will be violated. expense_without_receipt_allowed: type: boolean - description: | - If this is set to false, then for all such expenses that doesn't have receipt, this policy rule will be violated. + description: > + If this is set to false, then for all such expenses that doesn't + have receipt, this policy rule will be violated. default: true example: true expense_spent_at_max: nullable: true allOf: - $ref: '#/components/schemas/timestamptz_pst' - description: | - If an expense's spend date exceeds this value, this policy rule will be violated for that expense. + description: > + If an expense's spend date exceeds this value, this policy rule will + be violated for that expense. expense_spent_at_min: nullable: true allOf: - $ref: '#/components/schemas/timestamptz_pst' - description: | - If an expense's spend date falls behind this value, this policy rule will be violated for that expense. + description: > + If an expense's spend date falls behind this value, this policy rule + will be violated for that expense. expense_payment_modes: nullable: true allOf: @@ -23937,21 +12984,25 @@ components: - $ref: '#/components/schemas/contains_operator' expense_without_ccc_match_allowed: type: boolean - description: | - If this is set to false, then for all such expenses that are not matched to corporate credit card transaction, this policy rule will be violated. + description: > + If this is set to false, then for all such expenses that are not + matched to corporate credit card transaction, this policy rule will + be violated. default: true example: true expense_include_foreign_currency: type: boolean - description: | - If this is set to true, then for all such expenses that are created in foreign currency, this policy rule will be applicable. + description: > + If this is set to true, then for all such expenses that are created + in foreign currency, this policy rule will be applicable. default: false example: true expense_flight_travel_class: nullable: true type: array - description: | - This field is applicable only for Flight category.
List of travel classes considered by this policy rule. + description: > + This field is applicable only for Flight category.
List of + travel classes considered by this policy rule. items: type: string example: @@ -23960,8 +13011,9 @@ components: expense_train_travel_class: nullable: true type: array - description: | - This field is applicable only for Train category.
List of travel classes considered by this policy rule. + description: > + This field is applicable only for Train category.
List of + travel classes considered by this policy rule. items: type: string example: @@ -23978,8 +13030,9 @@ components: nullable: true type: number example: 1200 - description: | - If an expense's annual distance exceeds this value, this policy rule will be violated for that expense. + description: > + If an expense's annual distance exceeds this value, this policy rule + will be violated for that expense. employee_level_ids: nullable: true type: array @@ -24023,9 +13076,11 @@ components: - $ref: '#/components/schemas/contains_operator' employee_locations: nullable: true - description: | + description: > Location of employees considered by this policy rule.
- If this is set, then for all such employees whose location is in `employee_locations`, this policy rule will be applicable. + + If this is set, then for all such employees whose location is in + `employee_locations`, this policy rule will be applicable. type: array items: $ref: '#/components/schemas/location' @@ -24063,70 +13118,90 @@ components: - $ref: '#/components/schemas/contains_operator' action_flag: type: boolean - description: | - If it is set to true, then the expense(s) violating this policy rule, will be flagged. + description: > + If it is set to true, then the expense(s) violating this policy + rule, will be flagged. default: false example: true action_show_warning: type: boolean - description: | - If it is set to true, then a warning is shown to the employee, whenever he attempts to create an expense that violates this policy rule. + description: > + If it is set to true, then a warning is shown to the employee, + whenever he attempts to create an expense that violates this policy + rule. default: false example: true action_make_unreportable: type: boolean - description: | - If it is set to true, then the expense(s) violating this policy rule, will be made unreportable.
- (Expense will be created but employee will not be able to add it to report). + description: > + If it is set to true, then the expense(s) violating this policy + rule, will be made unreportable.
+ + (Expense will be created but employee will not be able to add it to + report). default: false example: true action_remove_employee_approver1: type: boolean - description: | - If this is set to true, then the employee's first approver will be removed from the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's first approver will be + removed from the report that contains expense(s) violating this + policy rule. default: false example: true action_add_employee_approver2: type: boolean - description: | - If this is set to true, then the employee's second approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's second approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_employee_approver3: type: boolean - description: | - If this is set to true, then the employee's third approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's third approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_project_approver1: type: boolean - description: | - If this is set to true, then the project's first approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the project's first approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_project_approver2: type: boolean - description: | - If this is set to true, then the project's second approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the project's second approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_department_head_approver: type: boolean - description: | - If this is set to true, then the employee's department approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's department approver will + be added to the report that contains expense(s) violating this + policy rule. default: false example: true action_cap_amount: type: boolean - description: | - If it is set to true, then expense's amount will be capped to `expense_amount_max` when the expense(s) violates this policy rule. + description: > + If it is set to true, then expense's amount will be capped to + `expense_amount_max` when the expense(s) violates this policy rule. default: false example: true action_add_approver_user_ids: nullable: true type: array - description: | - List of approver user ids that will be added to the report that contains expense(s) violating this policy rule. + description: > + List of approver user ids that will be added to the report that + contains expense(s) violating this policy rule. items: type: string example: @@ -24135,8 +13210,10 @@ components: action_override_distance_slab_rate: nullable: true type: number - description: | - When annual mileage distance limit exceeds `expense_annual_distance_max` for `expense_vehicle_type`, this rate will be applied afterwards. + description: > + When annual mileage distance limit exceeds + `expense_annual_distance_max` for `expense_vehicle_type`, this rate + will be applied afterwards. example: 20 creator_user_id: $ref: '#/components/schemas/user_id' @@ -24151,9 +13228,12 @@ components: id: allOf: - $ref: '#/components/schemas/id_string' - description: | + description: > This represents the id of the expense policy rule.

- _Note: When creating the policy rule, this field shouldn't be set._
+ + _Note: When creating the policy rule, this field shouldn't be + set._
+ _When updating, this field should be set._ example: tpr12345xyz description: @@ -24165,238 +13245,368 @@ components: example: Receipt is mandatory for expense above $50 expense_without_receipt_allowed: type: boolean - description: | - If this is set to false, then for all such expenses that doesn't have receipt, this policy rule will be violated.
- **Note: If this field is set to false i.e. receipts are mandatory, only following conditions & actions are allowed =>** + description: > + If this is set to false, then for all such expenses that doesn't + have receipt, this policy rule will be violated.
+ + **Note: If this field is set to false i.e. receipts are mandatory, + only following conditions & actions are allowed =>** + - expense_category_ids + - expense_category_ids_op + - expense_project_ids + - expense_project_ids_op + - expense_cost_center_ids + - expense_cost_center_ids_op + - expense_limit_type (only `INIDIVIDUAL` type is allowed) + - expense_currency + - expense_amount_max + - expense_payment_modes + - expense_payment_modes_op + - expense_without_ccc_match_allowed + - employee_department_ids + - employee_department_ids_op + - employee_locations + - employee_user_ids + - employee_user_ids_op + - employee_titles + - employee_titles_op + - action_flag + - action_show_warning + - action_make_unreportable + - description default: true example: true expense_limit_type: oneOf: - $ref: '#/components/schemas/expense_policy_limit_type' - description: | + description: > Value signifying the limit type of the expense policy.

- `INDIVIDUAL`: Amount limit will be checked against each expense.
- `DAILY`: Amount limit will be checked against the total of all expenses in a day.
- `NIGHTLY`: Amount limit will be checked against the hotel cost per night.
- `WEEKLY`: Amount limit will be checked against the total of all expenses in a week.
- `MONTHLY`: Amount limit will be checked against the total of all expenses in a month.
- `QUARTERLY`: Amount limit will be checked against the total of all expenses in a financial quarter.
- `HALF_YEARLY`: Amount limit will be checked against the total of all expenses in a financial half-year.
- `YEARLY`: Amount limit will be checked against the total of all expenses in a financial year.
- `LIFETIME`: Amount limit will be checked against the total amount of all expenses throughout employee duration in the organisation.

- **Note: If this field is set(to any value), then the following fields are mandatory in the request body:**
+ + `INDIVIDUAL`: Amount limit will be checked against each expense. +
+ + `DAILY`: Amount limit will be checked against the total of all + expenses in a day.
+ + `NIGHTLY`: Amount limit will be checked against the hotel cost per + night.
+ + `WEEKLY`: Amount limit will be checked against the total of all + expenses in a week.
+ + `MONTHLY`: Amount limit will be checked against the total of all + expenses in a month.
+ + `QUARTERLY`: Amount limit will be checked against the total of all + expenses in a financial quarter.
+ + `HALF_YEARLY`: Amount limit will be checked against the total of all + expenses in a financial half-year.
+ + `YEARLY`: Amount limit will be checked against the total of all + expenses in a financial year.
+ + `LIFETIME`: Amount limit will be checked against the total amount of + all expenses throughout employee duration in the organisation. +

+ + **Note: If this field is set(to any value), then the following + fields are mandatory in the request body:**
+ - `expense_currency` + - Either `expense_amount_max` or `expense_amount_min`
- **Note: If this field is set to QUARTERLY, HALF_YEARLY or YEARLY, then the following additional fields are mandatory in the request body:**
+ + **Note: If this field is set to QUARTERLY, HALF_YEARLY or YEARLY, + then the following additional fields are mandatory in the request + body:**
+ - `expense_fiscal_start_month` expense_currency: allOf: - $ref: '#/components/schemas/currency' - description: | + description: > The three-letter currency code following ISO standard ISO 4217.
- _Note: `expense_amount_max` or `expense_amount_min` is mandatory if the field `expense_currency` is present in the request body._ + + href='https://www.iso.org/iso-4217-currency-codes.html'>ISO + 4217.
+ + _Note: `expense_amount_max` or `expense_amount_min` is mandatory if + the field `expense_currency` is present in the request body._ expense_amount_max: anyOf: - $ref: '#/components/schemas/amount' - description: | - If an expense's amount exceeds this value, this policy rule will be violated for that expense.
- _Note: `expense_currency` and `expense_limit_type` is mandatory if the field `expense_amount_max` is present in the request body._ + description: > + If an expense's amount exceeds this value, this policy rule will be + violated for that expense.
+ + _Note: `expense_currency` and `expense_limit_type` is mandatory if + the field `expense_amount_max` is present in the request body._ example: 10000 expense_amount_min: anyOf: - $ref: '#/components/schemas/amount' - description: | - If an expense's amount falls behind this value, this policy rule will be violated for that expense..
- _Note: `expense_currency` and `expense_limit_type` is mandatory if the field `expense_amount_min` is present in the request body._ + description: > + If an expense's amount falls behind this value, this policy rule + will be violated for that expense..
+ + _Note: `expense_currency` and `expense_limit_type` is mandatory if + the field `expense_amount_min` is present in the request body._ example: 500 expense_fiscal_start_month: type: number - description: | + description: > Month number of start of fiscal year.
- _Note: This fields is required when `expense_limit_type` is QUARTERLY, HALF_YEARLY or YEARLY._ + + _Note: This fields is required when `expense_limit_type` is + QUARTERLY, HALF_YEARLY or YEARLY._ example: 4 minimum: 1 maximum: 12 expense_distance_max: allOf: - $ref: '#/components/schemas/distance' - description: | - If an expense's distance exceeds this value, this policy rule will be violated for that expense.
- _Note: `expense_category_ids` with mileage category is mandatory if the field `expense_distance_max` is present in the request body._ + description: > + If an expense's distance exceeds this value, this policy rule will + be violated for that expense.
+ + _Note: `expense_category_ids` with mileage category is mandatory if + the field `expense_distance_max` is present in the request body._ example: 10000 expense_distance_min: allOf: - $ref: '#/components/schemas/distance' - description: | - If an expense's distance falls behind this value, this policy rule will be violated for that expense.
- _Note: `expense_category_ids` with mileage category is mandatory if the field `expense_distance_min` is present in the request body._ + description: > + If an expense's distance falls behind this value, this policy rule + will be violated for that expense.
+ + _Note: `expense_category_ids` with mileage category is mandatory if + the field `expense_distance_min` is present in the request body._ example: 500 expense_category_ids: type: array items: $ref: '#/components/schemas/id_integer' - description: | + description: > List of category ids considered by this policy rule.
- _Note: You need to use field `expense_category_ids_op` along with this field._ + + _Note: You need to use field `expense_category_ids_op` along with + this field._ example: - 2222 - 1221 expense_category_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the categories listed in the field `expense_category_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the categories listed in the field `expense_category_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the categories listed in the field + `expense_category_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the categories listed in + the field `expense_category_ids`. expense_project_ids: type: array items: $ref: '#/components/schemas/id_integer' - description: | + description: > List of project ids considered by this policy rule.
- _Note: You need to use field `expense_project_ids_op` along with this field._ + + _Note: You need to use field `expense_project_ids_op` along with + this field._ example: - 1234 - 5678 expense_project_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the projects listed in the field `expense_project_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the projects listed in the field `expense_project_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the projects listed in the field + `expense_project_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the projects listed in the + field `expense_project_ids`. expense_cost_center_ids: type: array items: $ref: '#/components/schemas/id_integer' - description: | + description: > List of cost centers ids considered by this policy rule.
- _Note: You need to use field `expense_cost_center_ids_op` along with this field._ + + _Note: You need to use field `expense_cost_center_ids_op` along with + this field._ example: - 1987 - 3456 expense_cost_center_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - - If it is set to IN, this policy rule will be applicable to all the expenses that belong to any of the cost centers listed in the field `expense_cost_center_ids`. - - If it is set to NOT_IN, this policy rule will be applicable to all the expenses that do not belong to any of the cost centers listed in the field `expense_cost_center_ids`. + description: > + - If it is set to IN, this policy rule will be applicable to all the + expenses that belong to any of the cost centers listed in the field + `expense_cost_center_ids`. + + - If it is set to NOT_IN, this policy rule will be applicable to all + the expenses that do not belong to any of the cost centers listed in + the field `expense_cost_center_ids`. expense_allowed_exchange_rate_difference_percentage: type: number - description: | - Allowed percentage difference for exchange rates beyond which this policy rule will be violated. + description: > + Allowed percentage difference for exchange rates beyond which this + policy rule will be violated. example: 10 minimum: 0 maximum: 100 expense_allowed_distance_difference_percentage: type: number - description: | - Allowed distance percentage difference beyond which this policy rule will be violated.
- _Note: `expense_category_ids` with mileage category is mandatory if the field `expense_allowed_distance_difference_percentage` is present in the request body._ + description: > + Allowed distance percentage difference beyond which this policy rule + will be violated.
+ + _Note: `expense_category_ids` with mileage category is mandatory if + the field `expense_allowed_distance_difference_percentage` is + present in the request body._ example: 8 minimum: 0 maximum: 100 expense_custom_fields: allOf: - $ref: '#/components/schemas/custom_fields' - description: | + description: > Custom fields (if any)
+ _Example -> "No. of days": 5_
- _Note: You need to use field `expense_custom_fields_op` along with this field._ + + _Note: You need to use field `expense_custom_fields_op` along with + this field._ expense_custom_fields_op: type: object - description: | + description: > Operator for the expense_custom_fields.
+ _Format -> field_name: operator_
+ _Example -> "No. of days": "GREATER_THAN_EQUAL_TO"_

+ Supported values based on field type:
+ `Boolean`: `IS`, `NOT_IS`
+ `Date`: `LESS_THAN_EQUAL_TO`, `GREATER_THAN_EQUAL_TO`
+ `Location`: `IN`, `NOT_IN`
+ `Number`: `LESS_THAN_EQUAL_TO`, `GREATER_THAN_EQUAL_TO`
+ `String`: `CONTAINS`, `EQUALS`
+ `Select`: `IN`, `NOT_IN`
- _Note: This field is mandatory if the field `expense_custom_fields` is present in the request body._ + + _Note: This field is mandatory if the field `expense_custom_fields` + is present in the request body._ properties: field_name: type: string expense_locations: - description: | + description: > Location of expense considered by this policy rule.
- If this is set, then for all such expenses that have a location - like expenses of category Flight, Train, Bus, Hotel, etc. - this policy rule will be applicable.
- _Note: You need to use field `expense_locations_op` along with this field._ + + If this is set, then for all such expenses that have a location - + like expenses of category Flight, Train, Bus, Hotel, etc. - this + policy rule will be applicable.
+ + _Note: You need to use field `expense_locations_op` along with this + field._ type: array items: $ref: '#/components/schemas/location' expense_locations_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `expense_locations` is present in the request body._ + description: > + _Note: This field is mandatory if the field `expense_locations` is + present in the request body._ expense_creation_delay_days_max: type: number example: 12 - description: | - This value decides how delayed an expense creation can be. If the expense is created after this many days of spend date, this policy rule will be violated. + description: > + This value decides how delayed an expense creation can be. If the + expense is created after this many days of spend date, this policy + rule will be violated. expense_spent_at_max: allOf: - $ref: '#/components/schemas/timestamptz_pst' - description: | - If an expense's spend date exceeds this value, this policy rule will be violated for that expense. + description: > + If an expense's spend date exceeds this value, this policy rule will + be violated for that expense. expense_spent_at_min: allOf: - $ref: '#/components/schemas/timestamptz_pst' - description: | - If an expense's spend date falls behind this value, this policy rule will be violated for that expense + description: > + If an expense's spend date falls behind this value, this policy rule + will be violated for that expense expense_payment_modes: allOf: - $ref: '#/components/schemas/policy_payment_modes' - description: | + description: > Payment mode for expense to be considered by the policy rule.
- _Note: You need to use field `expense_payment_modes_op` along with this field._ + + _Note: You need to use field `expense_payment_modes_op` along with + this field._ expense_payment_modes_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `expense_payment_modes` is present in the request body._ + description: > + _Note: This field is mandatory if the field `expense_payment_modes` + is present in the request body._ expense_without_ccc_match_allowed: type: boolean - description: | - If this is set to false, then for all such expenses that are not matched to corporate credit card transaction, this policy rule will be violated. + description: > + If this is set to false, then for all such expenses that are not + matched to corporate credit card transaction, this policy rule will + be violated. default: true example: true expense_include_foreign_currency: type: boolean - description: | - If this is set to true, then for all such expenses that are created in foreign currency, this policy rule will be applicable. + description: > + If this is set to true, then for all such expenses that are created + in foreign currency, this policy rule will be applicable. default: false example: true expense_flight_travel_class: type: array - description: | - This field is applicable only for Train category.
List of travel classes considered by this policy rule. _Note: `expense_category_ids` with train category is mandatory if the field `expense_train_travel_class` is present in the request body._ + description: > + This field is applicable only for Train category.
List of + travel classes considered by this policy rule. _Note: + `expense_category_ids` with train category is mandatory if the field + `expense_train_travel_class` is present in the request body._ items: type: string example: @@ -24404,8 +13614,11 @@ components: - ECONOMY expense_train_travel_class: type: array - description: | - This field is applicable only for Train category.
List of travel classes considered by this policy rule. _Note: `expense_category_ids` with train category is mandatory if the field `expense_train_travel_class` is present in the request body._ + description: > + This field is applicable only for Train category.
List of + travel classes considered by this policy rule. _Note: + `expense_category_ids` with train category is mandatory if the field + `expense_train_travel_class` is present in the request body._ items: type: string example: @@ -24414,20 +13627,29 @@ components: expense_vehicle_type: allOf: - $ref: '#/components/schemas/vehicle_type' - description: | + description: > Vehicle type considered by this policy rule.
- _Note: `expense_annual_distance_max` and `action_override_distance_slab_rate` is mandatory if the field `expense_vehicle_type` is present in the request body._ + + _Note: `expense_annual_distance_max` and + `action_override_distance_slab_rate` is mandatory if the field + `expense_vehicle_type` is present in the request body._ expense_annual_distance_max: type: number example: 1200 - description: | - If an expense's annual distance exceeds this value, this policy rule will be violated for that expense.
- _Note: `expense_vehicle_type` and `action_override_distance_slab_rate` is mandatory if the field `expense_annual_distance_max` is present in the request body._ + description: > + If an expense's annual distance exceeds this value, this policy rule + will be violated for that expense.
+ + _Note: `expense_vehicle_type` and + `action_override_distance_slab_rate` is mandatory if the field + `expense_annual_distance_max` is present in the request body._ employee_level_ids: type: array - description: | + description: > Employee level ids considered by this policy rule.
- _Note: You need to use field `employee_level_ids_op` along with this field._ + + _Note: You need to use field `employee_level_ids_op` along with this + field._ items: type: string example: @@ -24436,37 +13658,54 @@ components: employee_level_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - Note: This field is mandatory if the field `employee_level_ids` is present in the request payload/body. + description: > + Note: This field is mandatory if the field `employee_level_ids` is + present in the request payload/body. employee_custom_fields: allOf: - $ref: '#/components/schemas/custom_fields' - description: | + description: > Custom fields (if any)
+ _Example -> "Employee Age": 30_
- _Note: You need to use field `employee_custom_fields_op` along with this field._ + + _Note: You need to use field `employee_custom_fields_op` along with + this field._ employee_custom_fields_op: type: object - description: | + description: > Operator for the employee_custom_fields.
+ _Format -> field_name: operator_
+ _Example -> "Employee Age": "GREATER_THAN_EQUAL_TO"_

+ Supported values based on field type:
+ `Boolean`: `IS`, `NOT_IS`
+ `Date`: `LESS_THAN_EQUAL_TO`, `GREATER_THAN_EQUAL_TO`
+ `Location`: `IN`, `NOT_IN`
+ `Number`: `LESS_THAN_EQUAL_TO`, `GREATER_THAN_EQUAL_TO`
+ `String`: `CONTAINS`, `EQUALS`
+ `Select`: `IN`, `NOT_IN`
- _Note: This field is mandatory if the field `employee_custom_fields` is present in the request body._ + + _Note: This field is mandatory if the field `employee_custom_fields` + is present in the request body._ properties: field_name: type: string employee_department_ids: type: array - description: | + description: > Employee department ids considered by this policy rule.
- _Note: You need to use field `employee_department_ids_op` along with this field._ + + _Note: You need to use field `employee_department_ids_op` along with + this field._ items: type: string example: @@ -24475,26 +13714,34 @@ components: employee_department_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `employee_department_ids` is present in the request body._ + description: > + _Note: This field is mandatory if the field + `employee_department_ids` is present in the request body._ employee_locations: - description: | + description: > Location of employees considered by this policy rule.
- If this is set, then for all such employees whose location is in `employee_locations`, this policy rule will be applicable.
- _Note: You need to use field `employee_locations_op` along with this field._ + + If this is set, then for all such employees whose location is in + `employee_locations`, this policy rule will be applicable.
+ + _Note: You need to use field `employee_locations_op` along with this + field._ type: array items: $ref: '#/components/schemas/location' employee_locations_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `employee_locations` is present in the request body._ + description: > + _Note: This field is mandatory if the field `employee_locations` is + present in the request body._ employee_user_ids: type: array - description: | + description: > Employee user ids considered by this policy rule.
- _Note: You need to use field `employee_user_ids_op` along with this field._ + + _Note: You need to use field `employee_user_ids_op` along with this + field._ items: type: string example: @@ -24503,13 +13750,16 @@ components: employee_user_ids_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `employee_user_ids` is present in the request body._ + description: > + _Note: This field is mandatory if the field `employee_user_ids` is + present in the request body._ employee_titles: type: array - description: | + description: > Employee titles considered by this policy rule.
- _Note: You need to use field `employee_titles_op` along with this field._ + + _Note: You need to use field `employee_titles_op` along with this + field._ items: type: string example: @@ -24518,73 +13768,94 @@ components: employee_titles_op: allOf: - $ref: '#/components/schemas/contains_operator' - description: | - _Note: This field is mandatory if the field `employee_titles` is present in the request body._ + description: > + _Note: This field is mandatory if the field `employee_titles` is + present in the request body._ action_flag: type: boolean - description: | - If it is set to true, then the expense(s) violating this policy rule, will be flagged. + description: > + If it is set to true, then the expense(s) violating this policy + rule, will be flagged. default: false example: true action_show_warning: type: boolean - description: | - If it is set to true, then a warning is shown to the employee, whenever he attempts to create an expense that violates this policy rule. + description: > + If it is set to true, then a warning is shown to the employee, + whenever he attempts to create an expense that violates this policy + rule. default: false example: true action_make_unreportable: type: boolean - description: | - If it is set to true, then the expense(s) violating this policy rule, will be made unreportable.
- (Expense will be created but employee will not be able to add it to report). + description: > + If it is set to true, then the expense(s) violating this policy + rule, will be made unreportable.
+ + (Expense will be created but employee will not be able to add it to + report). default: false example: true action_remove_employee_approver1: type: boolean - description: | - If this is set to true, then the employee's first approver will be removed from the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's first approver will be + removed from the report that contains expense(s) violating this + policy rule. default: false example: true action_add_employee_approver2: type: boolean - description: | - If this is set to true, then the employee's second approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's second approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_employee_approver3: type: boolean - description: | - If this is set to true, then the employee's third approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's third approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_project_approver1: type: boolean - description: | - If this is set to true, then the project's first approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the project's first approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_project_approver2: type: boolean - description: | - If this is set to true, then the project's second approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the project's second approver will be + added to the report that contains expense(s) violating this policy + rule. default: false example: true action_add_department_head_approver: type: boolean - description: | - If this is set to true, then the employee's department approver will be added to the report that contains expense(s) violating this policy rule. + description: > + If this is set to true, then the employee's department approver will + be added to the report that contains expense(s) violating this + policy rule. default: false example: true action_cap_amount: type: boolean - description: | - If it is set to true, then expense's amount will be capped to `expense_amount_max` when the expense(s) violates this policy rule. + description: > + If it is set to true, then expense's amount will be capped to + `expense_amount_max` when the expense(s) violates this policy rule. default: false example: true action_add_approver_user_ids: type: array - description: | - List of approver user ids that will be added to the report that contains expense(s) violating this policy rule. + description: > + List of approver user ids that will be added to the report that + contains expense(s) violating this policy rule. items: type: string example: @@ -24592,9 +13863,14 @@ components: - usabcds4 action_override_distance_slab_rate: type: number - description: | - When annual mileage distance limit exceeds `expense_annual_distance_max` for `expense_vehicle_type`, this rate will be applied afterwards.
- _Note: `expense_vehicle_type` and `expense_annual_distance_max` is mandatory if the field `action_override_distance_slab_rate` is present in the request body._ + description: > + When annual mileage distance limit exceeds + `expense_annual_distance_max` for `expense_vehicle_type`, this rate + will be applied afterwards.
+ + _Note: `expense_vehicle_type` and `expense_annual_distance_max` is + mandatory if the field `action_override_distance_slab_rate` is + present in the request body._ example: 20 expense_policy_state_change_in: type: object @@ -24615,23 +13891,30 @@ components: id: type: string example: tpr1234abcd - description: This represents the id of the expense policy rule that is violated for this expense. + description: >- + This represents the id of the expense policy rule that is violated + for this expense. description: anyOf: - $ref: '#/components/schemas/description' - description: | - This represents the description of the expense policy rule that is violated for this expense. + description: > + This represents the description of the expense policy rule that is + violated for this expense. example: Receipt is mandatory for expense above $50 action_show_warning: type: boolean - description: | - A true value here means that policy calculation suggests showing a warning when the user attempts to create an expense that violates this expense policy rule. + description: > + A true value here means that policy calculation suggests showing a + warning when the user attempts to create an expense that violates + this expense policy rule. example: true action_make_unreportable: type: boolean nullable: false - description: | - A true value here means that policy calculation suggests making the expense unreportable when the user attempts to create an expense that violates this expense policy rule. + description: > + A true value here means that policy calculation suggests making the + expense unreportable when the user attempts to create an expense + that violates this expense policy rule. example: true expense_policy_expenses_query_object_params: type: object @@ -24668,10 +13951,15 @@ components: example: eq.ouNSnadfaLA expense_policy_expenses_query_object: type: object - description: | - An expense may be violating an expense policy rule due to a group of other expenses. - These query params can be used to fetch those expenses because of which this expense is causing a violation.
- Below params should be ANDed to get the correct list of violating expenses. + description: > + An expense may be violating an expense policy rule due to a group of + other expenses. + + These query params can be used to fetch those expenses because of which + this expense is causing a violation.
+ + Below params should be ANDed to get the correct list of violating + expenses. properties: limit_start_date: type: string @@ -24693,16 +13981,19 @@ components: type: array items: type: string - description: | - List of approver ids that the policy calculation suggests adding to report that contains this expense. + description: > + List of approver ids that the policy calculation suggests adding to + report that contains this expense. example: - usBdsdfscl - usLSsdfwqt approver_policy_order: type: integer nullable: true - description: | - This represents the order of the approver policy related to this individual desired state record. + description: > + This represents the order of the approver policy related to this + individual desired state record. + If the policy does not add any approver, this field will be null. example: 1 approver_source: @@ -24717,9 +14008,12 @@ components: - EMAIL_APPROVER - null nullable: true - description: | - This represents the type of approver(source) that was added by the approver policy related to this individual - desired state record. If the policy does not add any approver, this field will be null. + description: > + This represents the type of approver(source) that was added by the + approver policy related to this individual + + desired state record. If the policy does not add any approver, this + field will be null. example: PROJECT_APPROVER_1 run_status: nullable: false @@ -24728,22 +14022,37 @@ components: - VIOLATED_ACTION_SUCCESS - VIOLATED_ACTION_FAILURE - UNVIOLATED - description: | - This represent the status of policy computation for an expense against the policy. If the state is - `UNVIOLATED`, it means that the expense is not violating the policy. If the state is `VIOLATION_ACTION_SUCCESS`, - it means that expense is violating the policy and action stated in the object will be applied to - expense. However, if the state is `VIOLATION_ACTION_FAILURE`, it means that the policy is violated for the - expense but since some approver was missing or not setup properly, it will fail to take action + description: > + This represent the status of policy computation for an expense + against the policy. If the state is + + `UNVIOLATED`, it means that the expense is not violating the policy. + If the state is `VIOLATION_ACTION_SUCCESS`, + + it means that expense is violating the policy and action stated in + the object will be applied to + + expense. However, if the state is `VIOLATION_ACTION_FAILURE`, it + means that the policy is violated for the + + expense but since some approver was missing or not setup properly, + it will fail to take action + on the expense example: SUCCESS run_result: type: array items: type: string - description: | - List of human-readable action summaries that the policy calculation suggests for this expense. Note that, in - case some approver was not setup properly for the given violation, this array will contain description of - missing approvers. For example, Department approver, Project head, etc. + description: > + List of human-readable action summaries that the policy calculation + suggests for this expense. Note that, in + + case some approver was not setup properly for the given violation, + this array will contain description of + + missing approvers. For example, Department approver, Project head, + etc. example: - flag the expense - cap the amount @@ -24780,8 +14089,9 @@ components: example: txabsdfSYqd flag: type: boolean - description: | - A true value here means, that as per policy calculation this expense should be flagged. + description: > + A true value here means, that as per policy calculation this expense + should be flagged. example: true amount: nullable: true @@ -24794,28 +14104,33 @@ components: unreportable: type: boolean nullable: false - description: | - A true value here means, that as per policy calculation this expense should be made unreportable. + description: > + A true value here means, that as per policy calculation this expense + should be made unreportable. example: true is_receipt_mandatory: type: boolean - description: | - A true value here means, that as per policy calculation this expense requires receipt. + description: > + A true value here means, that as per policy calculation this expense + requires receipt. example: true add_approver_user_ids: nullable: true type: array items: type: string - description: | - List of approver ids that the policy calculation suggests adding to report that contains this expense. + description: > + List of approver ids that the policy calculation suggests adding to + report that contains this expense. example: - usBdsdfscl - usLSsdfwqt remove_employee_approver1: type: boolean - description: | - A true value here means, that as per policy calculation, the employee's first approver should be removed from the report that contains this expense. + description: > + A true value here means, that as per policy calculation, the + employee's first approver should be removed from the report that + contains this expense. example: true run_status: nullable: false @@ -24830,8 +14145,9 @@ components: type: array items: type: string - description: | - List of human-readable action summaries that the policy calculation suggests for this expense. + description: > + List of human-readable action summaries that the policy calculation + suggests for this expense. example: - flag the expense - cap the amount @@ -24875,8 +14191,9 @@ components: example: amex.csv file_size: type: number - description: | - Specifies the size of file uploaded by the user. (The size is represented in bytes) + description: > + Specifies the size of file uploaded by the user. (The size is + represented in bytes) example: 21 no_of_debit: type: integer @@ -24916,20 +14233,24 @@ components: nullable: true has_duplicate_statements: type: boolean - description: | - This specifies if the statement is complete duplicate of already uploaded statement or not. + 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 + 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. + description: > + Indicates whether there are any line items in this statement are + duplicates. nullable: true duplicate_statement_line_items: type: array @@ -24963,8 +14284,9 @@ components: nullable: true is_processed: type: boolean - description: | - Indicates whether the corporate card transactions are created out of the statement. + description: > + Indicates whether the corporate card transactions are created out of + the statement. statement_mappings_id: type: string example: stmpdfddfd @@ -25023,14 +14345,18 @@ components: 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. + 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 transaction_date_column: type: string - description: | - Specifies the header name of the transaction date column in the statement. + description: > + Specifies the header name of the transaction date column in the + statement. example: spent date merchant_column: type: string @@ -25039,8 +14365,9 @@ components: example: merchant transaction_id_column: type: string - description: | - Specifies the header name of the transaction id / unique id column in the statement. + description: > + Specifies the header name of the transaction id / unique id column + in the statement. nullable: true example: reference number amount_column: @@ -25055,25 +14382,29 @@ components: example: amex_mapping card_number_column: type: string - description: | - Specifies the header name of the card number column in the statement. + 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. + 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. + 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. + description: > + Specifies the header name of the description column in the + statement. nullable: true example: description post_date_column: @@ -25127,14 +14458,18 @@ components: 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. + 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 transaction_date_column: type: string - description: | - Specifies the header name of the transaction date column in the statement. + description: > + Specifies the header name of the transaction date column in the + statement. example: spent date merchant_column: type: string @@ -25143,8 +14478,9 @@ components: example: merchant transaction_id_column: type: string - description: | - Specifies the header name of the transaction id / unique id column in the statement. + description: > + Specifies the header name of the transaction id / unique id column + in the statement. nullable: true example: reference number amount_column: @@ -25159,25 +14495,29 @@ components: example: amex_mapping card_number_column: type: string - description: | - Specifies the header name of the card number column in the statement. + 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. + 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. + 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. + description: > + Specifies the header name of the description column in the + statement. nullable: true example: description post_date_column: @@ -25236,8 +14576,9 @@ components: example: txn date transaction_id_column: type: string - description: | - Specifies the mapping of transaction id / unique id on the statement. + description: > + Specifies the mapping of transaction id / unique id on the + statement. example: reference number nullable: true amount_column: @@ -25269,8 +14610,9 @@ components: nullable: true post_date_column: type: string - description: | - Specifies the header name of the post date column in the statement. + description: > + Specifies the header name of the post date column in the + statement. example: post date nullable: true bank_name: @@ -25280,9 +14622,12 @@ components: 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. + 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 @@ -25314,22 +14659,25 @@ components: type: array items: type: string - description: | - This specifies list of statement line items to be ignored in the statement. + 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. + 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 + description: > + Card number from statement can be passed to get transactions only + from specific card example: xxx5-4543 required: - id @@ -25414,8 +14762,9 @@ components: example: USD transaction_type: type: string - description: | - Specifies the transaction type of the transactions on the statement (credit / debit). + description: > + Specifies the transaction type of the transactions on the + statement (credit / debit). example: debit post_date: $ref: '#/components/schemas/timestamptz_utc' @@ -25476,8 +14825,9 @@ components: example: txn date transaction_id_column: type: string - description: | - Specifies the mapping of transaction id / unique id on the statement. + description: > + Specifies the mapping of transaction id / unique id on the + statement. example: reference number nullable: true amount_column: @@ -25509,8 +14859,9 @@ components: nullable: true post_date_column: type: string - description: | - Specifies the header name of the post date column in the statement. + description: > + Specifies the header name of the post date column in the + statement. example: post date nullable: true bank_name: @@ -25520,9 +14871,12 @@ components: 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. + 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 @@ -25554,16 +14908,18 @@ components: type: array items: type: string - description: | - This specifies list of statement line items to be ignored in the statement. + 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. + description: > + This specifies list of statement line items which are to be created + as RTF missing transactions. example: - stlisfdfadssd card_mapping: @@ -25576,18 +14932,21 @@ components: properties: missing_transactions_count: type: integer - description: | - Number of transactions in the statement that are from cards that dont exist on Fyle/are not RTF enrolled. + description: > + Number of transactions in the statement that are from cards that + dont exist on Fyle/are not RTF enrolled. example: 76 is_rtf_statement: type: boolean - description: | - Indicates whether the statement has atleast one card enrolled in RTF. + description: > + Indicates whether the statement has atleast one card enrolled in + RTF. example: true rtf_card_network: type: string - description: | - Card network of the statement if the statement has atleast one card enrolled in RTF. + description: > + Card network of the statement if the statement has atleast one card + enrolled in RTF. example: VISA nullable: true missing_corporate_card_details: @@ -25739,8 +15098,9 @@ components: example: USD transaction_type: type: string - description: | - Specifies the transaction type of the transactions on the statement (credit / debit). + description: > + Specifies the transaction type of the transactions on the + statement (credit / debit). example: debit unique_id: type: string @@ -25749,13 +15109,16 @@ components: example: ed0b2aa913c rtf_confidence: type: string - description: | - RTF Confidence percentage - `rtf_count` to the `total_count`, indicates what % of statement transactions are already existing in Fyle via RTF. + description: > + RTF Confidence percentage - `rtf_count` to the `total_count`, + indicates what % of statement transactions are already existing in + Fyle via RTF. example: 99.22 rtf_count: type: integer - description: | - Number of transactions in the statement that are already existing in Fyle via RTF. + description: > + Number of transactions in the statement that are already existing in + Fyle via RTF. example: 76 total_count: type: integer @@ -25795,8 +15158,9 @@ components: example: txn date transaction_id_column: type: string - description: | - Specifies the mapping of transaction id / unique id on the statement. + description: > + Specifies the mapping of transaction id / unique id on the + statement. example: reference number nullable: true amount_column: @@ -25828,8 +15192,9 @@ components: nullable: true post_date_column: type: string - description: | - Specifies the header name of the post date column in the statement. + description: > + Specifies the header name of the post date column in the + statement. example: post date nullable: true bank_name: @@ -25839,9 +15204,12 @@ components: 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. + 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 @@ -25873,8 +15241,9 @@ components: type: array items: type: string - description: | - This specifies list of statement line items to be ignored in the statement. + description: > + This specifies list of statement line items to be ignored in the + statement. example: - stlisfdfadssd reconciliation_method: @@ -25911,8 +15280,9 @@ components: Timestamp of the last uploaded statement. rtf_confidence: type: string - description: | - RTF Confidence percentage indicates what % of the transactions in last uploaded statement are already existing in Fyle via RTF. + description: > + RTF Confidence percentage indicates what % of the transactions in + last uploaded statement are already existing in Fyle via RTF. example: 99.22 expense_rule_if_out: type: object @@ -25937,220 +15307,632 @@ components: - depthGKLxUmG5l description: | List of department ids - departments: - type: array - nullable: true - items: - $ref: '#/components/schemas/department_out_embed' - expense_rule_data_out: + departments: + type: array + nullable: true + items: + $ref: '#/components/schemas/department_out_embed' + expense_rule_data_out: + type: object + nullable: false + additionalProperties: false + minProperties: 1 + properties: + merchant: + type: string + maxLength: 255 + nullable: true + description: > + String denoting the name of the merchant to which the Expense was + made. + example: Amazon + is_billable: + $ref: '#/components/schemas/is_billable' + purpose: + type: string + nullable: true + example: Team lunch + category_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + example: 49058 + category: + $ref: '#/components/schemas/category_out_embed' + project_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 92895 + project: + $ref: '#/components/schemas/project_out_embed' + nullable: true + cost_center_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + example: 1049 + cost_center: + $ref: '#/components/schemas/cost_center_out_embed' + custom_fields: + type: array + nullable: true + description: | + Custom fields + items: + $ref: '#/components/schemas/custom_field' + dependent_fields: + type: array + nullable: true + description: | + Dependent expense fields + items: + $ref: '#/components/schemas/dependent_expense_fields' + is_suggested: + type: boolean + nullable: true + description: Whether this expense rule is a suggested rule + example: true + is_suggestion_dismissed: + type: boolean + nullable: true + description: Whether the suggestion for this rule has been dismissed + example: false + expense_rule_out: + type: object + additionalProperties: false + required: + - id + - org_id + - created_at + - updated_at + - creator_user_id + - creator_user + - if + - set + properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: eprFswn7SHbCa + org_id: + $ref: '#/components/schemas/org_id' + created_at: + $ref: '#/components/schemas/created_at' + updated_at: + $ref: '#/components/schemas/updated_at' + creator_user_id: + $ref: '#/components/schemas/user_id' + creator_user: + $ref: '#/components/schemas/user_out_embed' + if: + $ref: '#/components/schemas/expense_rule_if_out' + set: + $ref: '#/components/schemas/expense_rule_data_out' + is_suggested: + $ref: '#/components/schemas/is_suggested' + is_suggestion_dismissed: + $ref: '#/components/schemas/is_suggestion_dismissed' + expense_rule_if_in: + type: object + nullable: false + additionalProperties: false + required: + - merchant_contains + properties: + merchant_contains: + type: string + example: amaz + description: substring to check in merchant for applying this expense rule + department_ids: + type: array + nullable: true + items: + allOf: + - $ref: '#/components/schemas/department_id' + - type: string + - nullable: false + example: + - deptTqSvgYSlMk + - depthGKLxUmG5l + description: | + List of department ids + expense_rule_in: + type: object + additionalProperties: false + required: + - if + - set + properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: eprFswn7SHbCa + if: + $ref: '#/components/schemas/expense_rule_if_in' + set: + allOf: + - $ref: '#/components/schemas/expense_rule_data_in' + - type: object + nullable: false + expense_rule_dismiss_suggestion_in: + type: object + required: + - id + properties: + id: + $ref: '#/components/schemas/id_string' + expense_rule_delete_in: + type: object + required: + - id + properties: + id: + $ref: '#/components/schemas/id_string' + claim_amount: + type: number + description: | + The expense amount as claimed by user. + example: 1984.18 + spender_expense_check_mandatory_fields_in: type: object - nullable: false additionalProperties: false - minProperties: 1 properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + description: > + This represents the id of the expense.

+ + _Note: This field is required when you are updating an already + created expense and want to check it again for missing mandatory + fields._ + example: tx0agOdICdbV + spent_at: + allOf: + - $ref: '#/components/schemas/spent_at' + description: > + It signifies when this expense was made. This date cannot be in + future.

+ + _Note: This field is mandatory when you are creating an expense and + want to check it again for missing mandatory fields._ + source: + $ref: '#/components/schemas/source' merchant: - type: string - maxLength: 255 - nullable: true - description: | - String denoting the name of the merchant to which the Expense was made. - example: Amazon - is_billable: - $ref: '#/components/schemas/is_billable' + $ref: '#/components/schemas/merchant' + foreign_currency: + $ref: '#/components/schemas/foreign_currency' + foreign_amount: + $ref: '#/components/schemas/foreign_amount' + claim_amount: + allOf: + - $ref: '#/components/schemas/claim_amount' + description: > + The expense amount as claimed by user.

+ + _Note: This field is mandatory when you are creating an expense and + want to check it again for missing mandatory fields._ + example: 1984.18 purpose: type: string - nullable: true example: Team lunch + cost_center_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 1049 category_id: allOf: - $ref: '#/components/schemas/fk_integer' + nullable: true example: 49058 - category: - $ref: '#/components/schemas/category_out_embed' project_id: allOf: - $ref: '#/components/schemas/fk_integer' nullable: true example: 92895 - project: - $ref: '#/components/schemas/project_out_embed' + source_account_id: + allOf: + - $ref: '#/components/schemas/fk_string' + example: acwbl222wlg + advance_wallet_id: + allOf: + - $ref: '#/components/schemas/fk_string' nullable: true - cost_center_id: + example: advwrlAGwjr2 + tax_amount: + type: number + nullable: true + description: | + Tax amount as setup by your organization. + - _Note:_ + - Tax amount cannot be greater than the expense amount. + tax_group_id: allOf: - - $ref: '#/components/schemas/fk_integer' - example: 1049 - cost_center: - $ref: '#/components/schemas/cost_center_out_embed' + - $ref: '#/components/schemas/fk_string' + nullable: true + is_billable: + $ref: '#/components/schemas/is_billable' + is_reimbursable: + $ref: '#/components/schemas/is_reimbursable' + distance: + $ref: '#/components/schemas/distance' + distance_unit: + $ref: '#/components/schemas/distance_unit' + started_at: + $ref: '#/components/schemas/timestamptz_pst' + ended_at: + $ref: '#/components/schemas/timestamptz_pst' + travel_classes: + $ref: '#/components/schemas/travel_classes' + locations: + $ref: '#/components/schemas/locations' custom_fields: + $ref: '#/components/schemas/custom_fields' + num_files: + type: integer + description: | + Number of files/reciepts attached to expense + example: 4 + invoice_number: + type: string + nullable: true + maxLength: 255 + description: | + Invoice number of the expense. + example: 123456 + expense_check_mandatory_fields_in: + required: + - id + properties: + id: + $ref: '#/components/schemas/id_string' + spent_at: + $ref: '#/components/schemas/spent_at' + claim_amount: + $ref: '#/components/schemas/claim_amount' + allOf: + - $ref: '#/components/schemas/spender_expense_check_mandatory_fields_in' + expense_check_mandatory_fields_out: + type: object + additionalProperties: false + required: + - missing_amount + - missing_currency + - missing_receipt + - missing_expense_field_ids + properties: + missing_amount: + type: boolean + description: > + If this is set to true, then you need to send amount field with + expense object. + example: false + missing_currency: + type: boolean + description: > + If this is set to true, then you need to send currency field with + expense object. + example: false + missing_receipt: + type: boolean + description: > + If this is set to true, then you need to attach receipt to the + expense. + example: false + missing_expense_field_ids: + type: array + nullable: false + items: + type: integer + nullable: true + description: | + This id provided by Fyle to identify an expense field. + example: 123 + example: + - 123 + - 12423 + description: | + List of IDs of expense fields which are mandatory but are missing. + expense_comments_out: + type: object + additionalProperties: false + required: + - id + - comment + - action + - action_data + - expense_id + - creator_type + - org_id + - updated_at + - created_at + properties: + id: + $ref: '#/components/schemas/id_string' + comment: + type: string + description: comment on the report + example: We don't accept laundry bills + action: + type: string + description: Expense action for which comment is added. + enum: + - ADMIN_APPROVED + - APPROVED + - APPROVER_REMOVED + - AUTO_MATCHED + - AUTO_MERGED + - COMMENTED + - COMMENTED_WITH_NOTIFICATION + - COMMENTED_WITHOUT_NOTIFICATION + - DATA_EXTRACTED + - EJECTED_FROM_REPORT + - EXPENSE_RULE_APPLIED + - FILE_ATTACHED + - FILE_DELETED + - INVALID_EXPENSE_FIELD_REMOVED + - MATCHED + - PAID + - PARTIALLY_APPROVED + - POLICY_RESULT_APPLIED + - UNMATCHED + example: COMMENTED_WITH_NOTIFICATION + action_data: + type: object + description: Data related to expense action. + nullable: true + expense_id: + $ref: '#/components/schemas/id_string' + creator_type: + type: string + description: Describes whether the comment is system-generated or User made. + enum: + - SYSTEM + - POLICY + - USER + example: USER + creator_user_id: + $ref: '#/components/schemas/user_id_nullable' + creator_user: + $ref: '#/components/schemas/user_out_embed_nullable' + created_at: + $ref: '#/components/schemas/created_at' + updated_at: + $ref: '#/components/schemas/updated_at' + org_id: + $ref: '#/components/schemas/org_id' + expense_comments_bulk_in: + type: array + additionalProperties: false + description: | + Array of expense comments to be added in bulk. + items: + type: object + required: + - expense_id + - comment + - notify + properties: + expense_id: + $ref: '#/components/schemas/id_string' + comment: + type: string + description: comment on the expense + example: We don't accept laundry bills + notify: + type: boolean + description: Whether to notify the user about the comment + example: true + expense_dismiss_duplicates_in: + type: object + required: + - id + - duplicate_expense_ids + additionalProperties: false + properties: + id: + $ref: '#/components/schemas/id_string' + duplicate_expense_ids: type: array - nullable: true - description: | - Custom fields + nullable: false items: - $ref: '#/components/schemas/custom_field' - dependent_fields: - type: array - nullable: true - description: | - Dependent expense fields + $ref: '#/components/schemas/id_string' + example: + - txwoirwlwwg + - txwlgwkgw42 + description: > + List of expense IDs that needs to be dismissed as a duplicate from + the target expense + expenses_duplicate_sets_stats_in: + properties: + query_params: + nullable: false + type: string + description: > + This field contains the query param string similar to the query + params passed in GET call. Currently we don't + + process this field, this is added for future use cases. Currently + empty string value should be passed. + example: '' + expenses_duplicate_sets_stats_out: + type: object + properties: + count: + type: integer + nullable: false + description: > + This field represents the total number of expense duplicate sets + that match the criteria specified in the query_params within the + body of the request. + example: 45 + any_type: + anyOf: + - type: string + - type: number + - type: integer + - type: boolean + - type: array items: - $ref: '#/components/schemas/dependent_expense_fields' - is_suggested: - type: boolean - nullable: true - description: Whether this expense rule is a suggested rule - example: true - is_suggestion_dismissed: - type: boolean - nullable: true - description: Whether the suggestion for this rule has been dismissed - example: false - expense_rule_out: + $ref: '#/components/schemas/any_type' + - type: object + feature_config_out: type: object additionalProperties: false - required: - - id - - org_id - - created_at - - updated_at - - creator_user_id - - creator_user - - if - - set properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' - example: eprFswn7SHbCa org_id: $ref: '#/components/schemas/org_id' + user_id: + $ref: '#/components/schemas/user_id' created_at: $ref: '#/components/schemas/created_at' updated_at: $ref: '#/components/schemas/updated_at' - creator_user_id: - $ref: '#/components/schemas/user_id' - creator_user: - $ref: '#/components/schemas/user_out_embed' - if: - $ref: '#/components/schemas/expense_rule_if_out' - set: - $ref: '#/components/schemas/expense_rule_data_out' - is_suggested: - $ref: '#/components/schemas/is_suggested' - is_suggestion_dismissed: - $ref: '#/components/schemas/is_suggestion_dismissed' - expense_rule_if_in: - type: object - nullable: false - additionalProperties: false - required: - - merchant_contains - properties: - merchant_contains: + target_client: + type: string + nullable: false + description: | + This specifies the target client of the feature config. + example: WEBAPP + feature: + type: string + nullable: false + description: | + This specifies the feature name. + example: ADMIN_EXPENSES + sub_feature: type: string - example: amaz - description: substring to check in merchant for applying this expense rule - department_ids: - type: array nullable: true - items: - allOf: - - $ref: '#/components/schemas/department_id' - - type: string - - nullable: false + description: | + This specifies the sub feature name. + example: ALL_EXPENSES + key: + type: string + nullable: false + description: | + This specifies the key of the feature config. + example: MANAGE_COLUMNS + value: + anyOf: + - $ref: '#/components/schemas/any_type' + - $ref: '#/components/schemas/null_field' + nullable: true + description: | + This specifies the value of the feature config. example: - - deptTqSvgYSlMk - - depthGKLxUmG5l + columns: + - id: Date + is_visible: true + order: 1 + is_shared: + type: boolean + nullable: false description: | - List of department ids - expense_rule_in: + This specifies whether the feature config is shared or not. + example: true + feature_config_in: type: object additionalProperties: false required: - - if - - set - properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' - example: eprFswn7SHbCa - if: - $ref: '#/components/schemas/expense_rule_if_in' - set: - allOf: - - $ref: '#/components/schemas/expense_rule_data_in' - - type: object - nullable: false - expense_rule_dismiss_suggestion_in: - type: object - required: - - id - properties: - id: - $ref: '#/components/schemas/id_string' - expense_rule_delete_in: - type: object - required: - - id - properties: - id: - $ref: '#/components/schemas/id_string' - claim_amount: - type: number - description: | - The expense amount as claimed by user. - example: 1984.18 - spender_expense_check_mandatory_fields_in: - type: object - additionalProperties: false + - target_client + - feature + - key + - value + - is_shared properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' + target_client: + type: string + nullable: false description: | - This represents the id of the expense.

- _Note: This field is required when you are updating an already created expense and want to check it again for missing mandatory fields._ - example: tx0agOdICdbV - spent_at: - allOf: - - $ref: '#/components/schemas/spent_at' + This specifies the target client of the feature config. + example: WEBAPP + feature: + type: string + nullable: false + description: | + This specifies the feature name. + example: ADMIN_EXPENSES + sub_feature: + type: string + nullable: true + description: | + This specifies the sub feature name. + example: ALL_EXPENSES + key: + type: string + nullable: false + description: | + This specifies the key of the feature config. + example: MANAGE_COLUMNS + value: + anyOf: + - $ref: '#/components/schemas/any_type' + - $ref: '#/components/schemas/null_field' + nullable: true + description: | + This specifies the value of the feature config. + example: + columns: + - id: Date + is_visible: true + order: 1 + is_shared: + type: boolean + nullable: false description: | - It signifies when this expense was made. This date cannot be in future.

- _Note: This field is mandatory when you are creating an expense and want to check it again for missing mandatory fields._ + This specifies whether the feature config is shared or not. + example: true + split_expense_in: + type: object + properties: + category_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 49058 source: $ref: '#/components/schemas/source' - merchant: - $ref: '#/components/schemas/merchant' + spent_at: + type: string + format: date-time + nullable: false + description: | + It signifies when this expense was made. + This date cannot be in future. + - **Note:** + - This field is required while creating an expense. + - _Not required when updating an expense, but is non-nullable_. + example: '2020-06-01T01:18:19.292-08:00' + is_reimbursable: + $ref: '#/components/schemas/is_reimbursable' + travel_classes: + $ref: '#/components/schemas/travel_classes' + locations: + $ref: '#/components/schemas/locations' foreign_currency: $ref: '#/components/schemas/foreign_currency' foreign_amount: $ref: '#/components/schemas/foreign_amount' - claim_amount: + project_id: allOf: - - $ref: '#/components/schemas/claim_amount' + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 92895 + file_ids: + type: array + items: + allOf: + - $ref: '#/components/schemas/id_string' description: | - The expense amount as claimed by user.

- _Note: This field is mandatory when you are creating an expense and want to check it again for missing mandatory fields._ - example: 1984.18 - purpose: - type: string - example: Team lunch + List of file IDs to be attached to the expense. + example: + - fisjfwlrglw + - fisjfwlrglw cost_center_id: allOf: - $ref: '#/components/schemas/fk_integer' nullable: true example: 1049 - category_id: - allOf: - - $ref: '#/components/schemas/fk_integer' - nullable: true - example: 49058 - project_id: - allOf: - - $ref: '#/components/schemas/fk_integer' - nullable: true - example: 92895 source_account_id: allOf: - $ref: '#/components/schemas/fk_string' @@ -26171,1693 +15953,14171 @@ components: allOf: - $ref: '#/components/schemas/fk_string' nullable: true - is_billable: - $ref: '#/components/schemas/is_billable' - is_reimbursable: - $ref: '#/components/schemas/is_reimbursable' - distance: - $ref: '#/components/schemas/distance' - distance_unit: - $ref: '#/components/schemas/distance_unit' started_at: $ref: '#/components/schemas/timestamptz_pst' ended_at: $ref: '#/components/schemas/timestamptz_pst' - travel_classes: - $ref: '#/components/schemas/travel_classes' - locations: - $ref: '#/components/schemas/locations' + merchant: + $ref: '#/components/schemas/merchant' + purpose: + type: string + example: Team lunch + is_billable: + $ref: '#/components/schemas/is_billable' custom_fields: $ref: '#/components/schemas/custom_fields' - num_files: - type: integer - description: | - Number of files/reciepts attached to expense - example: 4 - invoice_number: - type: string - nullable: true - maxLength: 255 - description: | - Invoice number of the expense. - example: 123456 - expense_check_mandatory_fields_in: - required: - - id - properties: - id: - $ref: '#/components/schemas/id_string' - spent_at: - $ref: '#/components/schemas/spent_at' - claim_amount: - $ref: '#/components/schemas/claim_amount' - allOf: - - $ref: '#/components/schemas/spender_expense_check_mandatory_fields_in' - expense_check_mandatory_fields_out: + expense_split_object: type: object - additionalProperties: false - required: - - missing_amount - - missing_currency - - missing_receipt - - missing_expense_field_ids properties: - missing_amount: - type: boolean - description: | - If this is set to true, then you need to send amount field with expense object. - example: false - missing_currency: - type: boolean - description: | - If this is set to true, then you need to send currency field with expense object. - example: false - missing_receipt: - type: boolean - description: | - If this is set to true, then you need to attach receipt to the expense. - example: false - missing_expense_field_ids: - type: array + spent_at: + type: string + format: date-time nullable: false - items: - type: integer - nullable: true - description: | - This id provided by Fyle to identify an expense field. - example: 123 - example: - - 123 - - 12423 description: | - List of IDs of expense fields which are mandatory but are missing. - expense_comments_out: - type: object - additionalProperties: false - required: - - id - - comment - - action - - action_data - - expense_id - - creator_type - - org_id - - updated_at - - created_at - properties: - id: - $ref: '#/components/schemas/id_string' - comment: - type: string - description: comment on the report - example: We don't accept laundry bills - action: - type: string - description: Expense action for which comment is added. - enum: - - ADMIN_APPROVED - - APPROVED - - APPROVER_REMOVED - - AUTO_MATCHED - - AUTO_MERGED - - COMMENTED - - COMMENTED_WITH_NOTIFICATION - - COMMENTED_WITHOUT_NOTIFICATION - - DATA_EXTRACTED - - EJECTED_FROM_REPORT - - EXPENSE_RULE_APPLIED - - FILE_ATTACHED - - FILE_DELETED - - INVALID_EXPENSE_FIELD_REMOVED - - MATCHED - - PAID - - PARTIALLY_APPROVED - - POLICY_RESULT_APPLIED - - UNMATCHED - example: COMMENTED_WITH_NOTIFICATION - action_data: - type: object - description: Data related to expense action. + It signifies when this expense was made. + This date cannot be in future. + - **Note:** + - This field is required while creating an expense. + - _Not required when updating an expense, but is non-nullable_. + example: '2020-06-01T01:18:19.292-08:00' + category_id: + allOf: + - $ref: '#/components/schemas/fk_integer' nullable: true - expense_id: - $ref: '#/components/schemas/id_string' - creator_type: + example: 49058 + foreign_amount: + $ref: '#/components/schemas/foreign_amount' + purpose: type: string - description: Describes whether the comment is system-generated or User made. - enum: - - SYSTEM - - POLICY - - USER - example: USER - creator_user_id: - $ref: '#/components/schemas/user_id_nullable' - creator_user: - $ref: '#/components/schemas/user_out_embed_nullable' - created_at: - $ref: '#/components/schemas/created_at' - updated_at: - $ref: '#/components/schemas/updated_at' - org_id: - $ref: '#/components/schemas/org_id' - expense_comments_bulk_in: + example: Team lunch + project_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 92895 + cost_center_id: + allOf: + - $ref: '#/components/schemas/fk_integer' + nullable: true + example: 1049 + custom_fields: + $ref: '#/components/schemas/custom_fields' + admin_expense_split_object: type: array - additionalProperties: false - description: | - Array of expense comments to be added in bulk. items: - type: object required: - - expense_id - - comment - - notify + - admin_amount + allOf: + - $ref: '#/components/schemas/expense_split_object' properties: - expense_id: - $ref: '#/components/schemas/id_string' - comment: - type: string - description: comment on the expense - example: We don't accept laundry bills - notify: - type: boolean - description: Whether to notify the user about the comment - example: true - expense_dismiss_duplicates_in: + admin_amount: + type: number + nullable: false + description: > + The expense amount which is added or modified by admin or + approver. + example: 1900 + admin_split_expense_in: type: object required: - id - - duplicate_expense_ids - additionalProperties: false + - admin_amount + allOf: + - $ref: '#/components/schemas/split_expense_in' properties: id: - $ref: '#/components/schemas/id_string' - duplicate_expense_ids: - type: array + allOf: + - $ref: '#/components/schemas/id_string' + description: | + This id is provided by Fyle to identify an object + - When `id` is sent, default action is to update the expense + admin_amount: + type: number nullable: false + description: | + The expense amount which is added or modified by admin or approver. + example: 1900 + splits: + description: > + This array contains the number of split expenses admin wants to + create for the expense. + + The `admin_amount` provided for the original expense should be equal + to the sum of + + `admin_amount` provided for each split. Each attribute in the splits + array will take precedence + + to the original expense object. If any attribute is not provided in + the split object, then + + null or default value will be taken for that attribute in the + resultant split. + allOf: + - $ref: '#/components/schemas/admin_expense_split_object' + expense_check_policies_individual_desired_states: + type: object + properties: + add_approver_user_ids: + nullable: true + type: array items: - $ref: '#/components/schemas/id_string' + type: string + description: > + List of approver ids that the policy calculation suggests adding to + report that contains this expense. example: - - txwoirwlwwg - - txwlgwkgw42 + - usBdsdfscl + - usLSsdfwqt + approver_policy_order: + type: integer + nullable: true + description: > + This represents the order of the approver policy related to this + individual desired state record. + + If the policy does not add any approver, this field will be null. + example: 1 + approver_source: + type: string + enum: + - PRIMARY_APPROVER + - SECONDARY_APPROVER_1 + - SECONDARY_APPROVER_2 + - PROJECT_APPROVER_1 + - PROJECT_APPROVER_2 + - DEPARTMENT_HEAD_APPROVER + - EMAIL_APPROVER + - null + nullable: true + description: > + This represents the type of approver(source) that was added by the + approver policy related to this individual + + desired state record. If the policy does not add any approver, this + field will be null. + example: PROJECT_APPROVER_1 + expense_policy_rule_id: + type: string description: | - List of expense IDs that needs to be dismissed as a duplicate from the target expense - expenses_duplicate_sets_stats_in: - properties: - query_params: + This represents the id of the expense policy rule. + example: tprabsdfSYqd + expense_policy_rule: + $ref: '#/components/schemas/expense_policy_rule_embed' + run_status: nullable: false type: string + enum: + - VIOLATED_ACTION_SUCCESS + - VIOLATED_ACTION_FAILURE + - UNVIOLATED + description: > + This represents the status of policy computation for the input + expense object against the policy represented by + `expense_policy_rule_id`. + + If the state is `UNVIOLATED`, it means that the expense is not + violating this policy. If the state is `VIOLATION_ACTION_SUCCESS`, + + it means that the expense is violating this policy and action stated + in the object will be applied to the expense when it is saved. + + However, if the state is `VIOLATION_ACTION_FAILURE`, it means that + this policy is violated for the expense but since some approver was + + missing or not set up properly, it will fail to take action on the + expense when it is saved. + example: SUCCESS + run_result: + type: array + items: + type: string + description: > + List of human-readable action summaries that the policy calculation + suggests for this expense. Note that, in + + case some approver was not setup properly for the given violation, + this array will contain description of + + missing approvers. For example, Department approver, Project head, + etc. + example: + - flag the expense + - cap the amount + amount: + nullable: true + anyOf: + - $ref: '#/components/schemas/amount' + - $ref: '#/components/schemas/null_field' description: | - This field contains the query param string similar to the query params passed in GET call. Currently we don't - process this field, this is added for future use cases. Currently empty string value should be passed. - example: '' - expenses_duplicate_sets_stats_out: + Amount that the policy calculation suggests for this expense. + example: 500 + expenses_query_object_params: + nullable: true + $ref: '#/components/schemas/expense_policy_expenses_query_object' + expense_check_policies_final_desired_state: type: object properties: - count: - type: integer + flag: + type: boolean + description: > + A true value here means, that as per policy calculation this expense + should be flagged. + example: true + amount: + nullable: true + anyOf: + - $ref: '#/components/schemas/amount' + - $ref: '#/components/schemas/null_field' + description: | + Amount that the policy calculation suggests for this expense. + example: 500 + unreportable: + type: boolean + nullable: false + description: > + A true value here means, that as per policy calculation this expense + should be made unreportable. + example: true + is_receipt_mandatory: + type: boolean + description: > + A true value here means, that as per policy calculation this expense + requires receipt. + example: true + add_approver_user_ids: + nullable: true + type: array + items: + type: string + description: > + List of approver ids that the policy calculation suggests adding to + report that contains this expense. + example: + - usBdsdfscl + - usLSsdfwqt + remove_employee_approver1: + type: boolean + description: > + A true value here means, that as per policy calculation, the + employee's first approver should be removed from the report that + contains this expense. + example: true + run_status: nullable: false + type: string + enum: + - SUCCESS + - FAILURE description: | - This field represents the total number of expense duplicate sets that match the criteria specified in the query_params within the body of the request. - example: 45 - any_type: - anyOf: - - type: string - - type: number - - type: integer - - type: boolean - - type: array + This represent the run status of the policy. + example: SUCCESS + run_summary: + type: array items: - $ref: '#/components/schemas/any_type' - - type: object - feature_config_out: + type: string + description: > + List of human-readable action summaries that the policy calculation + suggests for this expense. + example: + - flag the expense + - cap the amount + expense_check_policies_out: + type: object + additionalProperties: false + properties: + individual_desired_states: + type: array + items: + $ref: >- + #/components/schemas/expense_check_policies_individual_desired_states + final_desired_state: + $ref: '#/components/schemas/expense_check_policies_final_desired_state' + org_bank_details_out: type: object additionalProperties: false properties: org_id: $ref: '#/components/schemas/org_id' - user_id: - $ref: '#/components/schemas/user_id' + bank_account_number: + type: string + maxLength: 63 + nullable: true + example: 7115634767 + description: This field specifies the bank account number of the organisation. + bank_branch_ifsc: + type: string + maxLength: 11 + nullable: true + example: ABCD0000145 + description: This field specifies the branch IFSC code of the bank. + dwolla_customers_metadata_id: + type: string + maxLength: 255 + nullable: true + example: dcmy7CrOEDh7Z + description: >- + This field contains the unique identifier of the dwolla account + connected to the organisation. + is_bank_account_added: + type: boolean + example: true + description: >- + This field contains a boolean value indicating if a bank account has + been added to the organisation. + merchant_out: + type: object + additionalProperties: false + properties: + id: + $ref: '#/components/schemas/id_integer' created_at: $ref: '#/components/schemas/created_at' updated_at: $ref: '#/components/schemas/updated_at' - target_client: + display_name: type: string - nullable: false description: | - This specifies the target client of the feature config. - example: WEBAPP - feature: + Merchant name + example: Uber + reconciliation_entry: + type: object + additionalProperties: false + properties: + id: type: string - nullable: false description: | - This specifies the feature name. - example: ADMIN_EXPENSES - sub_feature: + Unique identifier for this reconciliation entry. + readOnly: true + example: recnlQw9xY12 + org_id: + type: string + description: | + Organization id to which this reconciliation entry belongs. + example: orwruogwnngg + period_start: + type: string + format: date-time + description: | + Start of the reconciliation period in UTC. + example: '2023-11-01T00:00:00.000+00:00' + period_end: + type: string + format: date-time + description: | + End of the reconciliation period in UTC. + example: '2023-11-30T23:59:59.999+00:00' + status: + type: string + description: > + Current status of the reconciliation entry. Values are subject to + change. + example: RECONCILED + reconciled_on: + type: string + format: date-time + description: | + Timestamp when the reconciliation was completed. + example: '2023-12-01T10:15:30.123+00:00' + reconciled_by: + type: object + additionalProperties: false + properties: + id: + type: string + description: | + Unique identifier of the user who performed the reconciliation. + example: uswjwgnwwgo + full_name: + type: string + description: | + Full name of the user who performed the reconciliation. + example: Jane Doe + email: + type: string + description: | + Email of the user who performed the reconciliation. + example: john.doe@example.com + description: | + Details of the user who performed the reconciliation. + bridging_entry_change_type: type: string - nullable: true + description: > + Indicates how the reconciliation window changed due to a bridging + entry. Values are subject to change. + example: STATEMENT_CYCLE_TO_CALENDAR_MONTH + statement_transaction_count: + type: integer + description: > + Number of statement transactions considered in this reconciliation + period. + example: 128 + expense_count: + type: integer description: | - This specifies the sub feature name. - example: ALL_EXPENSES - key: - type: string - nullable: false + Number of expenses considered in this reconciliation period. + example: 125 + statement_total: + type: number + format: double + description: > + Sum of statement transaction amounts considered in this + reconciliation period. + example: 15432.67 + expense_total: + type: number + format: double description: | - This specifies the key of the feature config. - example: MANAGE_COLUMNS - value: - anyOf: - - $ref: '#/components/schemas/any_type' - - $ref: '#/components/schemas/null_field' - nullable: true + Sum of expense amounts considered in this reconciliation period. + example: 15410.22 + created_at: + type: string + format: date-time description: | - This specifies the value of the feature config. - example: - columns: - - id: Date - is_visible: true - order: 1 - is_shared: - type: boolean - nullable: false + Resource creation timestamp in UTC. + readOnly: true + example: '2023-11-30T08:45:12.000+00:00' + updated_at: + type: string + format: date-time description: | - This specifies whether the feature config is shared or not. - example: true - feature_config_in: + Last updated timestamp in UTC. + readOnly: true + example: '2023-12-01T10:15:30.123+00:00' + reconciliation_expense_split_out_embed: type: object additionalProperties: false required: - - target_client - - feature - - key - - value - - is_shared + - id + - amount + - state + - purpose properties: - target_client: - type: string - nullable: false - description: | - This specifies the target client of the feature config. - example: WEBAPP - feature: - type: string - nullable: false - description: | - This specifies the feature name. - example: ADMIN_EXPENSES - sub_feature: - type: string + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: txwownwrng + description: Expense id of the split line. + amount: + allOf: + - $ref: '#/components/schemas/amount' nullable: true - description: | - This specifies the sub feature name. - example: ALL_EXPENSES - key: + description: Amount of this split line in organization currency. + currency: + allOf: + - $ref: '#/components/schemas/currency' + nullable: true + description: Currency of this split line amount (organization currency). + example: USD + merchant: + allOf: + - $ref: '#/components/schemas/merchant' + nullable: true + description: Merchant associated with this split, if any. + spent_at: + allOf: + - $ref: '#/components/schemas/timestamptz_utc' + nullable: true + description: Spent date of this split line (nullable). + state: type: string - nullable: false - description: | - This specifies the key of the feature config. - example: MANAGE_COLUMNS - value: - anyOf: - - $ref: '#/components/schemas/any_type' - - $ref: '#/components/schemas/null_field' + enum: + - COMPLETE + - DRAFT + - PAID + - PAYMENT_PROCESSING + - APPROVER_PENDING + - PAYMENT_PENDING + - APPROVED + - UNREPORTABLE + description: The state of the Expense. + file_ids: + type: array + items: + $ref: '#/components/schemas/id_string' nullable: true - description: | - This specifies the value of the feature config. + description: List of file IDs attached to the expense split example: - columns: - - id: Date - is_visible: true - order: 1 - is_shared: - type: boolean - nullable: false - description: | - This specifies whether the feature config is shared or not. - example: true - split_expense_in: + - figwiwpjww + - figwiwpjwx + category: + allOf: + - $ref: '#/components/schemas/category_display_name' + description: Category display name of the split expense + nullable: true + example: Travel + project: + allOf: + - $ref: '#/components/schemas/project_display_name' + description: Project display name of the split expense + nullable: true + example: ACME / Expansion + purpose: + type: string + nullable: true + example: Team lunch + description: Purpose or description of this split line. + reconciliation_matched_expense_out_embed: type: object + additionalProperties: false + required: + - id + - amount + - merchant + - spent_at + - state + - file_ids + - category + - project + - purpose + - splits properties: - category_id: + id: allOf: - - $ref: '#/components/schemas/fk_integer' + - $ref: '#/components/schemas/id_string' + example: txuXDH16HzK + description: Expense id. + amount: + allOf: + - $ref: '#/components/schemas/amount' nullable: true - example: 49058 - source: - $ref: '#/components/schemas/source' + example: 33.45 + description: Expense amount in organization currency (nullable). + currency: + allOf: + - $ref: '#/components/schemas/currency' + nullable: true + example: USD + description: Currency of the expense amount (organization currency). + merchant: + allOf: + - $ref: '#/components/schemas/merchant' + nullable: true + example: AMexon + description: Merchant associated with the expense, if any. spent_at: - type: string - format: date-time - nullable: false - description: | - It signifies when this expense was made. - This date cannot be in future. - - **Note:** - - This field is required while creating an expense. - - _Not required when updating an expense, but is non-nullable_. - example: '2020-06-01T01:18:19.292-08:00' - is_reimbursable: - $ref: '#/components/schemas/is_reimbursable' - travel_classes: - $ref: '#/components/schemas/travel_classes' - locations: - $ref: '#/components/schemas/locations' - foreign_currency: - $ref: '#/components/schemas/foreign_currency' - foreign_amount: - $ref: '#/components/schemas/foreign_amount' - project_id: allOf: - - $ref: '#/components/schemas/fk_integer' + - $ref: '#/components/schemas/timestamptz_utc' nullable: true - example: 92895 + description: Date when the expense was made (nullable). + state: + type: string + enum: + - COMPLETE + - DRAFT + - PAID + - PAYMENT_PROCESSING + - APPROVER_PENDING + - PAYMENT_PENDING + - APPROVED + - UNREPORTABLE + description: The state of the Expense. file_ids: type: array items: - allOf: - - $ref: '#/components/schemas/id_string' - description: | - List of file IDs to be attached to the expense. - example: - - fisjfwlrglw - - fisjfwlrglw - cost_center_id: - allOf: - - $ref: '#/components/schemas/fk_integer' + $ref: '#/components/schemas/id_string' nullable: true - example: 1049 - source_account_id: - allOf: - - $ref: '#/components/schemas/fk_string' - example: acwbl222wlg - advance_wallet_id: + description: List of file IDs attached to the expense + example: + - figwiwpjww + - figwiwpjwx + category: allOf: - - $ref: '#/components/schemas/fk_string' - nullable: true - example: advwrlAGwjr2 - tax_amount: - type: number + - $ref: '#/components/schemas/category_display_name' + description: Category display name of the expense nullable: true - description: | - Tax amount as setup by your organization. - - _Note:_ - - Tax amount cannot be greater than the expense amount. - tax_group_id: + example: Travel + project: allOf: - - $ref: '#/components/schemas/fk_string' + - $ref: '#/components/schemas/project_display_name' + description: Project display name of the expense nullable: true - started_at: - $ref: '#/components/schemas/timestamptz_pst' - ended_at: - $ref: '#/components/schemas/timestamptz_pst' - merchant: - $ref: '#/components/schemas/merchant' + example: ACME / Expansion purpose: type: string + nullable: true example: Team lunch - is_billable: - $ref: '#/components/schemas/is_billable' - custom_fields: - $ref: '#/components/schemas/custom_fields' - expense_split_object: + description: Purpose or description of the expense. + splits: + type: array + nullable: true + description: List of split expenses. Empty when the expense is not split. + items: + $ref: '#/components/schemas/reconciliation_expense_split_out_embed' + reconciliation_transaction_out: type: object + additionalProperties: false + required: + - id + - org_id + - reconciliation_entry_id + - corporate_card_id + - statement_amount + - statement_merchant + - matched_expenses_count + - is_reconciled + - is_ignored + - expenses properties: - spent_at: - type: string - format: date-time - nullable: false - description: | - It signifies when this expense was made. - This date cannot be in future. - - **Note:** - - This field is required while creating an expense. - - _Not required when updating an expense, but is non-nullable_. - example: '2020-06-01T01:18:19.292-08:00' - category_id: + id: + $ref: '#/components/schemas/id_string' + example: rectx8abc123 + description: Unique id of the reconciliation transaction. + org_id: + $ref: '#/components/schemas/org_id' + description: Organization id to which this reconciliation transaction belongs. + reconciliation_entry_id: + $ref: '#/components/schemas/id_string' + example: receabc12345 + description: Reconciliation entry id that this transaction is associated with. + corporate_card_id: + $ref: '#/components/schemas/id_string' + example: bawownwrng + description: Corporate card id for which this statement transaction was received. + statement_line_item_id: allOf: - - $ref: '#/components/schemas/fk_integer' + - $ref: '#/components/schemas/fk_string' nullable: true - example: 49058 - foreign_amount: - $ref: '#/components/schemas/foreign_amount' - purpose: + example: stliabc123 + description: Statement line item id corresponding to this transaction (nullable). + expense_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: + - txwownwrng + - txuXDH16HzK + description: List of matched expense ids. Can be an empty array when not matched. + statement_amount: + $ref: '#/components/schemas/amount' + example: 33.45 + description: Amount present on the card statement for this transaction. + statement_merchant: type: string - example: Team lunch - project_id: + example: AMexon + description: Merchant name as present on the card statement. + statement_transaction_date: allOf: - - $ref: '#/components/schemas/fk_integer' + - $ref: '#/components/schemas/timestamptz_utc' nullable: true - example: 92895 - cost_center_id: + description: Transaction date as present on the statement (nullable). + statement_post_date: allOf: - - $ref: '#/components/schemas/fk_integer' + - $ref: '#/components/schemas/timestamptz_utc' nullable: true - example: 1049 - custom_fields: - $ref: '#/components/schemas/custom_fields' - admin_expense_split_object: - type: array - items: - required: - - admin_amount - allOf: - - $ref: '#/components/schemas/expense_split_object' - properties: - admin_amount: - type: number - nullable: false - description: | - The expense amount which is added or modified by admin or approver. - example: 1900 - admin_split_expense_in: + description: Post date as present on the statement (nullable). + matched_expenses_count: + type: integer + example: 3 + description: Number of expenses matched to this statement transaction. + expenses: + type: array + items: + $ref: '#/components/schemas/reconciliation_matched_expense_out_embed' + description: > + List of matched expenses. Can be an empty array when there are no + expenses. + is_reconciled: + type: boolean + example: false + description: Indicates whether the statement transaction is reconciled. + is_ignored: + type: boolean + example: false + description: >- + Indicates whether the statement transaction is ignored from + reconciliation. + created_at: + $ref: '#/components/schemas/created_at' + description: Timestamp when this reconciliation transaction record was created. + updated_at: + $ref: '#/components/schemas/updated_at' + description: >- + Timestamp when this reconciliation transaction record was last + updated. + reconciliation_eligible_card_out: type: object + additionalProperties: false required: - id - - admin_amount - allOf: - - $ref: '#/components/schemas/split_expense_in' + - org_id + - reconciliation_entry_id + - card_number + - card_nickname + - user + - reconciled_on + - statement_transaction_count + - expense_count + - statement_total + - expense_total + - matching_issue_count + - status properties: - id: + org_id: + $ref: '#/components/schemas/org_id' + reconciliation_entry_id: allOf: - $ref: '#/components/schemas/id_string' - description: | - This id is provided by Fyle to identify an object - - When `id` is sent, default action is to update the expense - admin_amount: - type: number - nullable: false - description: | - The expense amount which is added or modified by admin or approver. - example: 1900 - splits: - description: | - This array contains the number of split expenses admin wants to create for the expense. - The `admin_amount` provided for the original expense should be equal to the sum of - `admin_amount` provided for each split. Each attribute in the splits array will take precedence - to the original expense object. If any attribute is not provided in the split object, then - null or default value will be taken for that attribute in the resultant split. + example: receabc12345 + description: Reconciliation entry id for which the card is eligible. + id: allOf: - - $ref: '#/components/schemas/admin_expense_split_object' - expense_check_policies_individual_desired_states: - type: object - properties: - add_approver_user_ids: - nullable: true - type: array - items: - type: string - description: | - List of approver ids that the policy calculation suggests adding to report that contains this expense. - example: - - usBdsdfscl - - usLSsdfwqt - approver_policy_order: - type: integer - nullable: true - description: | - This represents the order of the approver policy related to this individual desired state record. - If the policy does not add any approver, this field will be null. - example: 1 - approver_source: - type: string - enum: - - PRIMARY_APPROVER - - SECONDARY_APPROVER_1 - - SECONDARY_APPROVER_2 - - PROJECT_APPROVER_1 - - PROJECT_APPROVER_2 - - DEPARTMENT_HEAD_APPROVER - - EMAIL_APPROVER - - null - nullable: true - description: | - This represents the type of approver(source) that was added by the approver policy related to this individual - desired state record. If the policy does not add any approver, this field will be null. - example: PROJECT_APPROVER_1 - expense_policy_rule_id: - type: string - description: | - This represents the id of the expense policy rule. - example: tprabsdfSYqd - expense_policy_rule: - $ref: '#/components/schemas/expense_policy_rule_embed' - run_status: - nullable: false + - $ref: '#/components/schemas/id_string' + example: ecc123abc + description: Unique id of the eligible card record. + card_number: + $ref: '#/components/schemas/card_number' + card_nickname: type: string - enum: - - VIOLATED_ACTION_SUCCESS - - VIOLATED_ACTION_FAILURE - - UNVIOLATED - description: | - This represents the status of policy computation for the input expense object against the policy represented by `expense_policy_rule_id`. - If the state is `UNVIOLATED`, it means that the expense is not violating this policy. If the state is `VIOLATION_ACTION_SUCCESS`, - it means that the expense is violating this policy and action stated in the object will be applied to the expense when it is saved. - However, if the state is `VIOLATION_ACTION_FAILURE`, it means that this policy is violated for the expense but since some approver was - missing or not set up properly, it will fail to take action on the expense when it is saved. - example: SUCCESS - run_result: - type: array - items: - type: string - description: | - List of human-readable action summaries that the policy calculation suggests for this expense. Note that, in - case some approver was not setup properly for the given violation, this array will contain description of - missing approvers. For example, Department approver, Project head, etc. - example: - - flag the expense - - cap the amount - amount: nullable: true - anyOf: - - $ref: '#/components/schemas/amount' - - $ref: '#/components/schemas/null_field' - description: | - Amount that the policy calculation suggests for this expense. - example: 500 - expenses_query_object_params: + maxLength: 25 + description: Unique nickname assigned to the card. + example: Business Card + user: + $ref: '#/components/schemas/user_out_embed_nullable' + reconciled_on: + allOf: + - $ref: '#/components/schemas/timestamptz_utc' nullable: true - $ref: '#/components/schemas/expense_policy_expenses_query_object' - expense_check_policies_final_desired_state: - type: object - properties: - flag: - type: boolean - description: | - A true value here means, that as per policy calculation this expense should be flagged. - example: true - amount: + description: Date when reconciliation was completed for this card in the entry. + statement_transaction_count: + type: integer + example: 3 + description: >- + Number of statement transactions for the card within the entry + period. + expense_count: + type: integer + example: 2 + description: Number of matched expenses for the card within the entry period. + statement_total: + allOf: + - $ref: '#/components/schemas/amount' nullable: true - anyOf: + description: Sum of statement transaction amounts for the card (nullable). + example: 45 + expense_total: + allOf: - $ref: '#/components/schemas/amount' - - $ref: '#/components/schemas/null_field' - description: | - Amount that the policy calculation suggests for this expense. - example: 500 - unreportable: - type: boolean - nullable: false - description: | - A true value here means, that as per policy calculation this expense should be made unreportable. - example: true - is_receipt_mandatory: - type: boolean - description: | - A true value here means, that as per policy calculation this expense requires receipt. - example: true - add_approver_user_ids: nullable: true - type: array - items: - type: string - description: | - List of approver ids that the policy calculation suggests adding to report that contains this expense. - example: - - usBdsdfscl - - usLSsdfwqt - remove_employee_approver1: - type: boolean - description: | - A true value here means, that as per policy calculation, the employee's first approver should be removed from the report that contains this expense. - example: true - run_status: + description: Sum of matched expense amounts for the card (nullable). + example: 24 + matching_issue_count: + type: integer + example: 3 + description: >- + Number of matching issues identified for this card within the entry + period. + status: + type: string + description: Current reconciliation eligibility status for this card. + example: RECONCILED + reconciliation_eligible_cards_stats_in: + properties: + query_params: nullable: false type: string - enum: - - SUCCESS - - FAILURE - description: | - This represent the run status of the policy. - example: SUCCESS - run_summary: - type: array - items: - type: string - description: | - List of human-readable action summaries that the policy calculation suggests for this expense. - example: - - flag the expense - - cap the amount - expense_check_policies_out: + description: > + Query param string similar to the GET eligible cards call. Must + include `reconciliation_entry_id` to scope stats to a specific + entry. + + Refer the [Guide to Data + APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + for filtering syntax. + example: reconciliation_entry_id=eq.receabc12345 + reconciliation_eligible_cards_stats_out: type: object additionalProperties: false properties: - individual_desired_states: - type: array - items: - $ref: '#/components/schemas/expense_check_policies_individual_desired_states' - final_desired_state: - $ref: '#/components/schemas/expense_check_policies_final_desired_state' - org_bank_details_out: + period_start: + allOf: + - $ref: '#/components/schemas/timestamptz_utc' + nullable: true + description: Start of the reconciliation period in UTC. + period_end: + allOf: + - $ref: '#/components/schemas/timestamptz_utc' + nullable: true + description: End of the reconciliation period in UTC. + statement_transaction_count: + type: integer + description: Total number of statement transactions in the period. + example: 3 + expense_count: + type: integer + description: Total number of expenses in the period. + example: 2 + statement_total: + allOf: + - $ref: '#/components/schemas/amount' + description: Sum of statement transaction amounts in the period. + example: 45 + expense_total: + allOf: + - $ref: '#/components/schemas/amount' + description: Sum of expense amounts in the period. + example: 30 + difference: + allOf: + - $ref: '#/components/schemas/amount' + description: Difference between `statement_total` and `expense_total`. + example: 15 + matching_issue_count: + type: integer + description: >- + Number of transactions with matching issues across all eligible + cards. + example: 3 + total_cards: + type: integer + description: Total number of eligible cards. + example: 3 + card_without_statement_count: + type: integer + description: Number of cards that have no statement transactions in the period. + example: 2 + card_with_matching_issue_count: + type: integer + description: Number of cards that have only matching issues. + example: 0 + reconciled_card_count: + type: integer + description: Number of cards that are reconciled. + example: 0 + spender_employee_settings_out: type: object additionalProperties: false properties: + id: + $ref: '#/components/schemas/id_string' + example: ous7FnPJtFRmN + description: Unique identifier for the employee settings + employee_id: + $ref: '#/components/schemas/id_string' + example: ouLdnA486RYD + description: Unique identifier of the employee org_id: $ref: '#/components/schemas/org_id' - bank_account_number: - type: string - maxLength: 63 + example: org123 + description: Unique identifier of the organization + created_at: + $ref: '#/components/schemas/created_at' + example: '2019-10-18T07:01:55.756Z' + description: Timestamp when the settings were created + updated_at: + $ref: '#/components/schemas/updated_at' + example: '2025-04-20T04:14:26.820Z' + description: Timestamp when the settings were last updated + category_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: [] + description: List of category ids that the employee has access to + cost_center_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: [] + description: List of cost centers that the employee has access to + project_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: [] + description: List of projects that the employee has access to + per_diem_rate_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: [] + description: List of per diem rates that the employee has access to + mileage_rate_ids: + type: array + items: + $ref: '#/components/schemas/id_string' + example: [] + description: List of mileage rate ids that the employee has access to + insta_fyle_settings: + type: object + nullable: true + additionalProperties: false + description: Settings for InstaFyle receipt scanning and data extraction + properties: + allowed: + type: boolean + nullable: true + example: true + description: Whether InstaFyle is allowed for the employee + enabled: + type: boolean + nullable: true + example: true + description: Whether InstaFyle is enabled for the employee + static_camera_overlay_enabled: + type: boolean + nullable: true + example: true + description: Whether static camera overlay is enabled for receipt scanning + extract_fields: + type: array + nullable: true + items: + type: string + example: + - AMOUNT + - CURRENCY + - CATEGORY + - TXN_DT + description: List of fields to extract from receipts + notification_settings: + type: object + nullable: true + additionalProperties: false + description: Settings for email and push notifications + properties: + email_allowed: + type: boolean + nullable: true + example: true + description: Whether email notifications are allowed + email_enabled: + type: boolean + nullable: true + example: true + description: Whether email notifications are enabled + email_unsubscribed_events: + type: array + nullable: true + items: + type: string + example: [] + description: List of events for which email notifications are unsubscribed + push_allowed: + type: boolean + nullable: true + example: true + description: Whether push notifications are allowed + push_enabled: + type: boolean + nullable: true + example: true + description: Whether push notifications are enabled + push_unsubscribed_events: + type: array + nullable: true + items: + type: string + example: + - EADVANCE_REQUESTS_CREATED + - EADVANCE_REQUESTS_UPDATED + - EADVANCE_REQUESTS_INQUIRY + description: List of events for which push notifications are unsubscribed + notify_user: + type: boolean + nullable: true + example: true + description: Whether to notify the user about events + notify_delegatee: + type: boolean + nullable: true + example: true + description: Whether to notify the delegatee about events + mileage_settings: + type: object + nullable: true + additionalProperties: false + description: Settings for mileage tracking and rates + properties: + mileage_rate_labels: + type: object + nullable: true + example: null + description: Labels for different mileage rates + annual_mileage_of_user_before_joining_fyle: + type: object + nullable: true + example: {} + description: Annual mileage limit for user before joining Fyle + expense_form_autofills: + type: object nullable: true - example: 7115634767 - description: This field specifies the bank account number of the organisation. - bank_branch_ifsc: - type: string - maxLength: 11 + additionalProperties: false + description: Settings for automatic form filling in expenses + properties: + allowed: + type: boolean + nullable: true + example: true + description: Whether expense form autofill is allowed + enabled: + type: boolean + nullable: true + example: true + description: Whether expense form autofill is enabled + data_extractor_settings: + type: object nullable: true - example: ABCD0000145 - description: This field specifies the branch IFSC code of the bank. - dwolla_customers_metadata_id: - type: string - maxLength: 255 + additionalProperties: false + description: Settings for data extraction from receipts + properties: + allowed: + type: boolean + nullable: true + example: true + description: Whether data extraction is allowed + enabled: + type: boolean + nullable: true + example: true + description: Whether data extraction is enabled + in_app_chat_settings: + type: object nullable: true - example: dcmy7CrOEDh7Z - description: This field contains the unique identifier of the dwolla account connected to the organisation. - is_bank_account_added: - type: boolean - example: true - description: This field contains a boolean value indicating if a bank account has been added to the organisation. - merchant_out: - type: object - additionalProperties: false - properties: - id: - $ref: '#/components/schemas/id_integer' - created_at: - $ref: '#/components/schemas/created_at' - updated_at: - $ref: '#/components/schemas/updated_at' - display_name: - type: string - description: | - Merchant name - example: Uber - reconciliation_entry: - type: object - additionalProperties: false - properties: - id: - type: string - description: | - Unique identifier for this reconciliation entry. - readOnly: true - example: recnlQw9xY12 - org_id: - type: string - description: | - Organization id to which this reconciliation entry belongs. - example: orwruogwnngg - period_start: - type: string - format: date-time - description: | - Start of the reconciliation period in UTC. - example: '2023-11-01T00:00:00.000+00:00' - period_end: - type: string - format: date-time - description: | - End of the reconciliation period in UTC. - example: '2023-11-30T23:59:59.999+00:00' - status: - type: string - description: | - Current status of the reconciliation entry. Values are subject to change. - example: RECONCILED - reconciled_on: - type: string - format: date-time - description: | - Timestamp when the reconciliation was completed. - example: '2023-12-01T10:15:30.123+00:00' - reconciled_by: + additionalProperties: false + description: Settings for in-app chat functionality + properties: + allowed: + type: boolean + nullable: true + example: true + description: Whether in-app chat is allowed + enabled: + type: boolean + nullable: true + example: true + description: Whether in-app chat is enabled + restore_id: + type: string + nullable: true + example: null + description: ID for restoring chat session + payment_mode_settings: type: object + nullable: true additionalProperties: false + description: Settings for payment modes properties: - id: + allowed: + type: boolean + nullable: true + example: true + description: Whether payment mode selection is allowed + enabled: + type: boolean + nullable: true + example: true + description: Whether payment mode selection is enabled + allowed_payment_modes: + type: array + nullable: true + items: + type: string + example: + - PERSONAL_ACCOUNT + - COMPANY_ACCOUNT + description: List of payment modes allowed for the employee + locale: + type: object + nullable: true + additionalProperties: false + description: Settings for user's locale and timezone + properties: + timezone: type: string - description: | - Unique identifier of the user who performed the reconciliation. - example: uswjwgnwwgo - full_name: + nullable: true + example: Asia/Kolkata + description: User's timezone + abbreviation: type: string - description: | - Full name of the user who performed the reconciliation. - example: Jane Doe - email: + nullable: true + example: IST + description: Timezone abbreviation + offset: type: string - description: | - Email of the user who performed the reconciliation. - example: john.doe@example.com - description: | - Details of the user who performed the reconciliation. - bridging_entry_change_type: - type: string - description: | - Indicates how the reconciliation window changed due to a bridging entry. Values are subject to change. - example: STATEMENT_CYCLE_TO_CALENDAR_MONTH - statement_transaction_count: - type: integer - description: | - Number of statement transactions considered in this reconciliation period. - example: 128 - expense_count: - type: integer - description: | - Number of expenses considered in this reconciliation period. - example: 125 - statement_total: - type: number - format: double - description: | - Sum of statement transaction amounts considered in this reconciliation period. - example: 15432.67 - expense_total: - type: number - format: double - description: | - Sum of expense amounts considered in this reconciliation period. - example: 15410.22 - created_at: - type: string - format: date-time - description: | - Resource creation timestamp in UTC. - readOnly: true - example: '2023-11-30T08:45:12.000+00:00' - updated_at: - type: string - format: date-time - description: | - Last updated timestamp in UTC. - readOnly: true - example: '2023-12-01T10:15:30.123+00:00' - reconciliation_expense_split_out_embed: - type: object - additionalProperties: false - required: - - id - - amount - - state - - purpose - properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' - example: txwownwrng - description: Expense id of the split line. - amount: - allOf: - - $ref: '#/components/schemas/amount' - nullable: true - description: Amount of this split line in organization currency. - currency: - allOf: - - $ref: '#/components/schemas/currency' - nullable: true - description: Currency of this split line amount (organization currency). - example: USD - merchant: - allOf: - - $ref: '#/components/schemas/merchant' - nullable: true - description: Merchant associated with this split, if any. - spent_at: - allOf: - - $ref: '#/components/schemas/timestamptz_utc' - nullable: true - description: Spent date of this split line (nullable). - state: + nullable: true + example: '05:30:00' + description: Timezone offset from UTC + is_personal_cards_enabled: + type: boolean + example: true + description: Whether personal card usage is enabled + default_project_id: type: string - enum: - - COMPLETE - - DRAFT - - PAID - - PAYMENT_PROCESSING - - APPROVER_PENDING - - PAYMENT_PENDING - - APPROVED - - UNREPORTABLE - description: The state of the Expense. - file_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - description: List of file IDs attached to the expense split - example: - - figwiwpjww - - figwiwpjwx - category: - allOf: - - $ref: '#/components/schemas/category_display_name' - description: Category display name of the split expense nullable: true - example: Travel - project: - allOf: - - $ref: '#/components/schemas/project_display_name' - description: Project display name of the split expense + example: null + description: Default project ID for expenses + default_payment_mode: + type: string nullable: true - example: ACME / Expansion - purpose: + example: null + description: Default payment mode for expenses + default_vehicle_type: type: string nullable: true - example: Team lunch - description: Purpose or description of this split line. - reconciliation_matched_expense_out_embed: + example: null + description: Default vehicle type for mileage expenses + attach_files_to_advance_request_in: type: object - additionalProperties: false required: - id - - amount - - merchant - - spent_at - - state - file_ids - - category - - project - - purpose - - splits properties: id: allOf: - $ref: '#/components/schemas/id_string' - example: txuXDH16HzK - description: Expense id. - amount: - allOf: - - $ref: '#/components/schemas/amount' - nullable: true - example: 33.45 - description: Expense amount in organization currency (nullable). - currency: - allOf: - - $ref: '#/components/schemas/currency' - nullable: true - example: USD - description: Currency of the expense amount (organization currency). - merchant: - allOf: - - $ref: '#/components/schemas/merchant' - nullable: true - example: AMexon - description: Merchant associated with the expense, if any. - spent_at: - allOf: - - $ref: '#/components/schemas/timestamptz_utc' - nullable: true - description: Date when the expense was made (nullable). - state: - type: string - enum: - - COMPLETE - - DRAFT - - PAID - - PAYMENT_PROCESSING - - APPROVER_PENDING - - PAYMENT_PENDING - - APPROVED - - UNREPORTABLE - description: The state of the Expense. + example: areqsjfwlrglw file_ids: type: array items: $ref: '#/components/schemas/id_string' - description: List of file IDs attached to the expense example: - figwiwpjww - - figwiwpjwx - category: - allOf: - - $ref: '#/components/schemas/category_display_name' - description: Category display name of the expense - nullable: true - example: Travel - project: - allOf: - - $ref: '#/components/schemas/project_display_name' - description: Project display name of the expense - nullable: true - example: ACME / Expansion - purpose: - type: string - nullable: true - example: Team lunch - description: Purpose or description of the expense. - splits: - type: array - description: List of split expenses. Empty when the expense is not split. - items: - $ref: '#/components/schemas/reconciliation_expense_split_out_embed' - reconciliation_transaction_out: + description: List of files to be attached to the advance request + advance_request_bulk_approve_in: type: object additionalProperties: false required: - id - - org_id - - reconciliation_entry_id - - corporate_card_id - - statement_amount - - statement_merchant - - matched_expenses_count - - is_reconciled - - is_ignored - - expenses properties: id: $ref: '#/components/schemas/id_string' - example: rectx8abc123 - description: Unique id of the reconciliation transaction. - org_id: - $ref: '#/components/schemas/org_id' - description: Organization id to which this reconciliation transaction belongs. - reconciliation_entry_id: + description: ID of the advance request to be approved + example: areq5F9xIaMURI + advance_request_add_approver_in: + type: object + additionalProperties: false + required: + - id + - approver_email + - comment + properties: + id: $ref: '#/components/schemas/id_string' - example: receabc12345 - description: Reconciliation entry id that this transaction is associated with. - corporate_card_id: + description: ID of the advance request to add approver to + example: areq5F9xIaMURI + approver_email: + $ref: '#/components/schemas/email' + description: Email address of the approver to be added + example: approver@example.com + comment: + type: string + description: A comment explaining the reason for adding the approver + example: Need your review on this advance + advance_request_reject_in: + type: object + additionalProperties: false + required: + - id + - comment + properties: + id: $ref: '#/components/schemas/id_string' - example: bawownwrng - description: Corporate card id for which this statement transaction was received. - statement_line_item_id: - allOf: - - $ref: '#/components/schemas/fk_string' - nullable: true - example: stliabc123 - description: Statement line item id corresponding to this transaction (nullable). - expense_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: - - txwownwrng - - txuXDH16HzK - description: List of matched expense ids. Can be an empty array when not matched. - statement_amount: - $ref: '#/components/schemas/amount' - example: 33.45 - description: Amount present on the card statement for this transaction. - statement_merchant: + description: ID of the advance request to be rejected + example: areq5F9xIaMURI + comment: type: string - example: AMexon - description: Merchant name as present on the card statement. - statement_transaction_date: - allOf: - - $ref: '#/components/schemas/timestamptz_utc' - nullable: true - description: Transaction date as present on the statement (nullable). - statement_post_date: - allOf: - - $ref: '#/components/schemas/timestamptz_utc' - nullable: true - description: Post date as present on the statement (nullable). - matched_expenses_count: + description: Reason for rejecting the advance request + example: Budget exceeded + advance_request_inquire_in: + type: object + additionalProperties: false + required: + - id + - comment + properties: + id: + $ref: '#/components/schemas/id_string' + description: ID of the advance request to inquire about + example: areq5F9xIaMURI + comment: + type: string + description: Reason for sending the advance request back to the spender + example: Please provide additional documentation + advance_request_custom_field_out: + type: object + additionalProperties: false + properties: + id: type: integer - example: 3 - description: Number of expenses matched to this statement transaction. - expenses: + description: ID of the custom field + example: 123 + org_id: + $ref: '#/components/schemas/org_id' + name: + type: string + description: Name of the custom field + example: Department + type: + type: string + enum: + - TEXT + - NUMBER + - SELECT + - MULTI_SELECT + - BOOLEAN + - LOCATION + - USER_LIST + - DATE + description: Type of the custom field + example: SELECT + options: type: array items: - $ref: '#/components/schemas/reconciliation_matched_expense_out_embed' - description: | - List of matched expenses. Can be an empty array when there are no expenses. - is_reconciled: + type: string + description: Options for SELECT and MULTI_SELECT field types + example: + - HR + - Finance + nullable: true + is_mandatory: type: boolean - example: false - description: Indicates whether the statement transaction is reconciled. - is_ignored: + description: Whether the field is mandatory + example: true + is_enabled: type: boolean - example: false - description: Indicates whether the statement transaction is ignored from reconciliation. + description: Whether the field is enabled + example: true + placeholder: + type: string + description: Placeholder text for the field + example: Select dept + nullable: true created_at: $ref: '#/components/schemas/created_at' - description: Timestamp when this reconciliation transaction record was created. updated_at: $ref: '#/components/schemas/updated_at' - description: Timestamp when this reconciliation transaction record was last updated. - spender_employee_settings_out: + advance_request_custom_fields_out: + type: array + items: + $ref: '#/components/schemas/advance_request_custom_field_out' + description: List of advance request custom fields + advance_request_custom_field_in: type: object additionalProperties: false + required: + - name + - type + - is_mandatory + - is_enabled + - placeholder properties: id: - $ref: '#/components/schemas/id_string' - example: ous7FnPJtFRmN - description: Unique identifier for the employee settings - employee_id: - $ref: '#/components/schemas/id_string' - example: ouLdnA486RYD - description: Unique identifier of the employee - org_id: - $ref: '#/components/schemas/org_id' - example: org123 - description: Unique identifier of the organization - created_at: - $ref: '#/components/schemas/created_at' - example: '2019-10-18T07:01:55.756Z' - description: Timestamp when the settings were created - updated_at: - $ref: '#/components/schemas/updated_at' - example: '2025-04-20T04:14:26.820Z' - description: Timestamp when the settings were last updated - category_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: [] - description: List of category ids that the employee has access to - cost_center_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: [] - description: List of cost centers that the employee has access to - project_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: [] - description: List of projects that the employee has access to - per_diem_rate_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: [] - description: List of per diem rates that the employee has access to - mileage_rate_ids: + type: integer + description: ID of the custom field (optional, required for update operations) + example: 123 + name: + type: string + description: Name of the custom field + example: Department + type: + type: string + enum: + - TEXT + - NUMBER + - SELECT + - MULTI_SELECT + - BOOLEAN + - LOCATION + - USER_LIST + - DATE + description: Type of the custom field + example: SELECT + options: type: array items: - $ref: '#/components/schemas/id_string' - example: [] - description: List of mileage rate ids that the employee has access to - insta_fyle_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for InstaFyle receipt scanning and data extraction - properties: - allowed: - type: boolean - nullable: true - example: true - description: Whether InstaFyle is allowed for the employee - enabled: - type: boolean - nullable: true - example: true - description: Whether InstaFyle is enabled for the employee - static_camera_overlay_enabled: - type: boolean - nullable: true - example: true - description: Whether static camera overlay is enabled for receipt scanning - extract_fields: - type: array - nullable: true - items: - type: string - example: - - AMOUNT - - CURRENCY - - CATEGORY - - TXN_DT - description: List of fields to extract from receipts - notification_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for email and push notifications - properties: - email_allowed: - type: boolean - nullable: true - example: true - description: Whether email notifications are allowed - email_enabled: - type: boolean - nullable: true - example: true - description: Whether email notifications are enabled - email_unsubscribed_events: - type: array - nullable: true - items: - type: string - example: [] - description: List of events for which email notifications are unsubscribed - push_allowed: - type: boolean - nullable: true - example: true - description: Whether push notifications are allowed - push_enabled: - type: boolean - nullable: true - example: true - description: Whether push notifications are enabled - push_unsubscribed_events: - type: array - nullable: true - items: + type: string + description: Options for SELECT and MULTI_SELECT field types + example: + - HR + - Finance + is_mandatory: + type: boolean + description: Whether the field is mandatory + example: true + placeholder: + type: string + maxLength: 50 + description: Placeholder text for the field (max 50 characters) + example: Select dept + is_enabled: + type: boolean + description: Whether the field is enabled or disabled + example: true + parameters: + q: + in: query + name: q + description: A search query to filter the results. + schema: + type: string + example: Ritas + limit: + in: query + name: limit + description: > + A limit on the number of objects to be returned. Allowed values are from + 1 to 200. + schema: + type: integer + example: 20 + default: 50 + maximum: 200 + created_at: + in: query + name: created_at + description: > + Date string in yyyy-MM-ddTHH:mm:ss.SSSZ format along with operator in + RHS dot pattern.
Supported operators are `gte`,`lte`,`gt`,`lt`. + schema: + type: string + example: gte.2020-06-01T00:00:00.000-08:00 + updated_at: + in: query + name: updated_at + description: > + Date string in yyyy-MM-ddTHH:mm:ss.SSSZ format along with operator in + RHS dot pattern.
Supported operators are `gte`,`lte`,`gt`,`lt`. + schema: + type: string + example: gte.2020-06-01T00:00:00.000-08:00 + order: + in: query + name: order + description: | + use comma separated column names for sorting the results.
+ For sorting in descending order, use `column_name.desc` + schema: + type: string + example: updated_at.desc,id + offset: + in: query + name: offset + description: | + offset is used to skip that many number of objects before counting.
+ schema: + type: integer + example: 10 + q_integer: + in: query + name: q + description: A search query to filter the results. + schema: + type: integer + example: 1234 + time_interval_granularity: + in: query + name: time_interval_granularity + description: | + The time duration by which to group expenses to aggregate sum of amount. + Supported operator is `eq`. + schema: + type: string + default: eq.month + enum: + - eq.day + - eq.month + - eq.quarter + - eq.year + example: eq.month + time_interval_preset: + in: query + name: time_interval_preset + description: > + Preset time durations which can be used to filter expenses by spend + date. + + Default value is used if it is not specified and time_interval_start and + time_interval_end params are also not specified. + + Supported operator is `eq`. + schema: + type: string + default: eq.this_year + enum: + - eq.this_week + - eq.this_month + - eq.this_quarter + - eq.this_year + example: eq.this_year + time_interval_start: + in: query + name: time_interval_start + description: | + Start of time duration for filtering expenses by spend date. + Need not to be specified if time_interval_preset param is passed. + Supported operator is `eq`. + schema: + type: string + description: >- + Date-time in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + example: '2020-06-01T13:14:54.804+00:00' + time_interval_end: + in: query + name: time_interval_end + description: | + End of time duration for filtering expenses by spend date. + Need not to be specified if time_interval_preset param is passed. + Supported operator is `eq`. + schema: + type: string + description: >- + Date-time in [ISO8601 + format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). + example: '2021-06-01T13:14:54.804+00:00' + is_card_spend: + in: query + name: is_card_spend + description: > + For filtering out only those expenses where source account is corporate + card account + + Supported operators are `eq`.
+ schema: + type: string + example: eq.true + is_reimbursable: + in: query + name: is_reimbursable + description: > + For filtering out only those expenses which are reimbursable to the + employee. + + Supported operators are `eq`.
+ schema: + type: string + example: eq.true + merchant: + in: query + name: merchant + description: | + List of merchants for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(los-pollos-harmanos,saul-goodman) + category_id: + in: query + name: category_id + description: | + Category IDs for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(cat123,cat345) + project_id: + in: query + name: project_id + description: | + Project IDs for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(proj123,proj456) + department_id: + in: query + name: department_id + description: | + Department IDs for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(dept123,dept345) + user_id: + in: query + name: user_id + description: | + User IDs for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(us123,us456) + corporate_card_id: + in: query + name: card_id + description: | + Corporate card IDs for filtering expenses. + Supported operator is `in`. + schema: + type: string + example: in.(bacc1234,bacc4567) + id: + in: query + name: id + description: | + A resource ID + schema: + type: string + example: + - eq.ouwruogwnngg + expense_id: + in: query + name: expense_id + description: | + Expense id for filtering based on expenses. Supported operator is `eq`. + schema: + type: string + example: expense_id=eq.txS9GZm5hsjh + display_name: + in: query + name: display_name + description: | + Supported operators are `eq`, `like`, `in`.
+ display_name=in.(value1,value2) + schema: + type: string + example: like.Fast* +tags: + - name: Accounting Exports + description: > + This API allows you to record export of Fyle resources to an external + accounting exports + - name: Accounts + description: | + This APIs gives access to your Employees's accounts data. + - name: Advances + description: | + This API gives you access to manage your organisation's Advances data. + - name: Automations + description: | + This API gives you access to automate your organisation's manual work. + - name: Budgets + description: | + This API gives you access to Budgets. + - name: Categories + description: | + These APIs gives you access to manage your organisation's Categories + - name: Corporate Cards + description: > + This API gives you access to manage your organisation's Corporate Cards + data. + - name: Corporate Card Transactions + description: > + This API gives you access to manage your organisation's Corporate Card + Transaction data. + - name: Cost Centers + description: > + These APIs gives you access to manage your organisation's Cost Centers + data. + - name: Departments + description: | + These APIs gives you access to manage your organisation's Departments + - name: Employees + description: | + These APIs gives you access to manage your organisation's Employees + - name: Expenses + description: | + This API gives you access to your organisation's Expenses + - name: Expense Policies + description: | + This API gives you access to your organisation's Expense Policies + - name: Expense Rules + description: | + This API gives you access to your organisation's Expense Rules + - name: Files + description: | + This API gives you access to creates a file in Fyle + - name: Levels + description: | + These APIs gives you access to manage your organisation's Employee levels. + - name: Mileage Rates + description: | + These APIs gives you access to manage your organisation's Mileage Rates + - name: Per Diem Rates + description: | + These APIs gives you access to manage your organisation's Per Diem Rates + - name: Projects + description: | + These APIs gives you access to manage your organisation's Projects + - name: Reimbursements + description: | + These APIs gives you access to manage your organisation's Reimbursements + data + - name: Reminders + description: | + These APIs gives you access to manage your organisation's Reminders data + - name: Reports + description: | + These APIs gives you access to manage your organisation's Reports data + - name: Schedules + description: | + This API gives you access to manage Scheduled jobs. + - name: Settlements + description: | + This API gives you access to manage your organisation's Settlements data. + - name: Tax Groups + description: | + These APIs gives you access to manage your organisation's Tax Groups data. + - 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: Statement mappings + description: > + These APIs gives you access to manage statement mappings which is used for + statement uploads. + - name: Feature Configs + description: | + These APIs gives you access to manage feature configs. + - name: Merchants + description: > + This API gives you access to merchants, primarily to help with + autocomplete. + - name: Reconciliation + description: > + These APIs give you access to view reconciliation entries for corporate + card statement reconciliations. + - name: Expense Policy Comments + description: | + This API gives you access to manage expense policy comments. +paths: + /admin/projects: + get: + tags: + - Projects + summary: List projects + operationId: projects_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/admin_approver_project_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' + post: + operationId: projects_post + tags: + - Projects + summary: Create or update a project + description: | + Create or update a project. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/project_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_approver_project_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/projects/bulk: + post: + operationId: projects_bulk_post + tags: + - Projects + summary: Create or update projects in bulk + description: | + Create or update projects in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/project_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/projects/delete/bulk: + post: + tags: + - Projects + summary: Deletes projects + description: > + Deletes unused projects. If any of the project in input is used in other + resources then validation error is raised. + operationId: projects_delete_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/project_in_only_id' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + type: object + properties: + message: + type: string + nullable: true + example: > + Can not delete project(s) used in other resources like + expense, expense policy, expense rules, budgets, dependent + fields. + data: + type: object + example: null + error: + type: string + example: InvalidUsage + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/projects/delete_summary/bulk: + post: + tags: + - Projects + summary: Create delete summary for projects + description: > + Delete summary tells that how many projects could be deleted from given + projects, it also + + returns projects that could be deleted. + operationId: projects_delete_summary_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/project_in_only_id' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/project_delete_summary_out' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/cost_centers: + get: + operationId: cost_centers_list + tags: + - Cost Centers + summary: List cost centers + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/admin_cost_center_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + post: + operationId: cost_centers_post + tags: + - Cost Centers + summary: Create or update a cost center + description: | + Create or update a cost center. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/cost_center_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_cost_center_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/cost_centers/bulk: + post: + operationId: cost_centers_bulk_post + tags: + - Cost Centers + summary: Create or update cost centers in bulk + description: | + Create or update cost centers in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/cost_center_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/categories: + get: + tags: + - Categories + summary: List categories + operationId: categories_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/admin_approver_category_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' + post: + tags: + - Categories + summary: Create or update a category + description: | + Create or update a category. + operationId: categories_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/category_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_approver_category_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/categories/bulk: + post: + tags: + - Categories + summary: Create or update categories in bulk + description: | + Create or update categories in bulk. + operationId: categories_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/category_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: string + nullable: true + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/categories/delete/bulk: + post: + tags: + - Categories + summary: Deletes categories + description: > + Deletes unused categories. If any of the category in input is used in + other resources or it is a mileage/per diem + + category then validation error is raised. + operationId: categories_delete_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/category_in_only_id' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + type: object + properties: + message: + type: string + nullable: true + example: > + Can not delete per diem and mileage categorie(s) or + categorie(s) used in other resources like expense, expense + policy, expense rules, budgets. + data: + type: object + example: null + error: + type: string + example: InvalidUsage + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/categories/delete_summary/bulk: + post: + tags: + - Categories + summary: Create delete summary for categories + description: > + Delete summary tells that how many categories could be deleted from + given categories, it also + + returns categories that could be deleted. + operationId: categories_delete_summary_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/category_in_only_id' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/category_delete_summary_out' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/categories/system_categories: + get: + tags: + - Categories + summary: List system categories + operationId: system_categories_list + description: > + This APIs gives you the list of system categories. Note that this API + does not support any query params like order, limit, offset or name. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + data: + type: array + items: + $ref: '#/components/schemas/system_category_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' + /admin/expense_fields: + get: + tags: + - Expenses + summary: List expense fields + operationId: expense_fields_list + 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) + 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/expense_field_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' + post: + tags: + - Expenses + summary: Create or update an expense fields + operationId: expense_fields_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_field_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + url: + type: string + data: + $ref: '#/components/schemas/expense_field_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/dependent_expense_field_values: + get: + tags: + - Expenses + summary: List dependent expense field values + operationId: dependent_expense_field_values_list + 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) + parameters: + - in: query + name: limit + description: > + A limit on the number of objects to be returned. Allowed values are + from 1 to 200. + schema: + type: integer + example: 10 + default: 100 + maximum: 200 + - in: query + name: is_enabled + schema: + type: string + default: eq.true + - in: query + name: parent_expense_field_id + required: true + schema: + type: string + example: eq.123 + - in: query + name: expense_field_id + required: true + schema: + type: string + example: eq.123 + - in: query + name: parent_expense_field_value + required: true + schema: + type: string + example: ilike.abc% + - in: query + name: expense_field_value + schema: + type: string + example: ilike.abc% + 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/dependent_expense_field_values_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' + /admin/dependent_expense_field_values/bulk: + post: + tags: + - Expenses + summary: Create or update dependent expense field values + operationId: dependent_expense_field_values_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/dependent_expense_field_values_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/dependent_expense_field_values/preview: + get: + tags: + - Expenses + summary: List dependent expense field values preview + operationId: dependent_expense_field_values_preview_list + 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) + parameters: + - in: query + name: limit + description: > + A limit on the number of objects to be returned. Allowed values are + from 1 to 10. + schema: + type: integer + example: 10 + default: 10 + maximum: 10 + - in: query + name: parent_expense_field_id + required: true + schema: + type: string + example: eq.123 + - in: query + name: expense_field_id + required: true + schema: + type: string + example: eq.123 + - in: query + name: parent_expense_field_value + required: true + schema: + type: string + example: ilike.abc% + 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/dependent_expense_field_values_preview_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' + /admin/dependent_expense_field_values/uploads: + get: + tags: + - Expenses + summary: List dependent expense field values upload requests + operationId: dependent_expense_field_values_uploads_list + 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) + 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/dependent_expense_field_values_upload_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' + post: + tags: + - Expenses + summary: Create an upload excel file request for dependent expense field values + description: > + Create a request to upload excel file containing dependent expense field + values mappings + operationId: dependent_expense_field_values_uploads_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/dependent_expense_field_values_upload_in + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/dependent_expense_field_values_upload_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/dependent_expense_field_values/downloads: + get: + tags: + - Expenses + summary: List dependent expense field values download requests + operationId: dependent_expense_field_values_downloads_list + 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) + 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/dependent_expense_field_values_download_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' + post: + tags: + - Expenses + summary: >- + Create a request to download an excel file for dependent expense field + values + description: > + Create a request to download an excel file containing dependent expense + field values mappings + operationId: dependent_expense_field_values_downloads_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/dependent_expense_field_values_download_in + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/dependent_expense_field_values_download_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employee_fields: + get: + tags: + - Employees + summary: List employee fields + operationId: employee_fields_list + 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) + 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/employee_field_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' + post: + tags: + - Employees + summary: Create or update an employee fields + operationId: employee_fields_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employee_field_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + url: + type: string + data: + $ref: '#/components/schemas/employee_field_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/per_diem_rates: + get: + tags: + - Per Diem Rates + summary: List per diem rates + operationId: per_diem_rates_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/per_diem_rate_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' + post: + operationId: per_diem_rates_post + tags: + - Per Diem Rates + summary: Create or update a per_diem_rate + description: | + Create or update a per_diem_rate + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/per_diem_rate_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/per_diem_rate_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/per_diem_rates/bulk: + post: + operationId: per_diem_rates_bulk_post + tags: + - Per Diem Rates + summary: Create or update a per_diem_rates in bulk. + description: | + Create or update a per_diem_rates in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/per_diem_rate_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/departments: + get: + tags: + - Departments + summary: List departments + operationId: departments_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/department_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' + post: + operationId: departments_post + tags: + - Departments + summary: Create or update a department + description: | + Create or update a department. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/department_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/department_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/mileage_rates: + get: + tags: + - Mileage Rates + summary: List mileage rates + operationId: mileage_rates_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/mileage_rate_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' + post: + tags: + - Mileage Rates + summary: Create or update a mileage rate + description: | + Create or update a mileage rate. + operationId: mileage_rates_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/mileage_rate_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/mileage_rate_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/levels: + get: + tags: + - Levels + summary: List Levels + operationId: levels_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/level_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' + post: + operationId: levels_post + tags: + - Levels + summary: Create or update a level + description: | + Create or update a level. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/level_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/level_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employees: + get: + tags: + - Employees + summary: List employees + operationId: employees_list + 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) + parameters: + - $ref: '#/components/parameters/q' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/employee_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' + /admin/employees/potential_duplicate_expenses: + get: + tags: + - Employees + summary: List employees and potential duplicate expenses + operationId: employees_and_potential_duplicate_expenses_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: >- + #/components/schemas/employee_out_potential_duplicate_expenses + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/employees/business_units: + get: + tags: + - Employees + summary: List employees business units + operationId: employees_business_units_list + description: > + This API returns the list of business units of employees based on the + query parameters. + parameters: + - $ref: '#/components/parameters/q' + - $ref: '#/components/parameters/limit' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + business_units: + type: array + items: + type: string + example: + - Marketing + - Management + description: > + List of business units of the employees based on the + query parameters. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/employees/exports: + post: + tags: + - Employees + summary: > + Export employees data in the specified format with customizable columns + and notification options + description: | + Create Employees Export Request. + operationId: employees_exports_create + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employees_exports_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employees_exports_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/employees/titles: + get: + tags: + - Employees + summary: List employees titles + operationId: employees_titles_list + description: > + This API returns the list of titles of employees based on the query + parameters. + parameters: + - $ref: '#/components/parameters/q' + - $ref: '#/components/parameters/limit' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + titles: + type: array + items: + type: string + example: + - Branch Manager + - Branch Head + description: > + List of titles of the employees based on the query + parameters. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/employees/locations: + get: + tags: + - Employees + summary: List employees locations + operationId: employees_locations_list + description: > + This API returns the list of locations of employees based on the query + parameters. + parameters: + - $ref: '#/components/parameters/q' + - $ref: '#/components/parameters/limit' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + locations: + type: array + items: + type: string + example: + - India + - Indonesia + description: > + List of locations of the employees based on the query + parameters. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/employees/invite/bulk: + post: + tags: + - Employees + summary: Create or update employees + description: | + Create or update employees + operationId: invitations_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/invitation_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/employees/reinvite/bulk: + post: + tags: + - Employees + summary: Reinvite employees + description: | + Reinvite employees + operationId: reinvitations_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/reinvitation_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/employees/filters: + post: + tags: + - Employees + summary: Create Employees saved filters + description: | + Save employees filters for personal use or share with other admins. + operationId: employees_filters_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employee_filters_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employee_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Employees + summary: List Employees saved filters + operationId: employees_filters_get + description: | + List filters saved by the admin or shared with the admin. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/employee_filters_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' + /admin/employees/filters/delete: + post: + tags: + - Employees + summary: Delete Employees saved filter + description: | + Delete Employees saved filter having the provided id. + operationId: employees_filters_post_action_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employee_filters_delete_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employee_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employees/uploads: + get: + tags: + - Employees + summary: List Employees upload requests + operationId: employees_upload_list + description: > + You can check the status of the Employees upload requests.
+ + 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) + 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/employees_upload_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' + post: + tags: + - Employees + summary: Upload Employees data via excel file. + description: | + Upload Employees data via excel file to Fyle system. + operationId: employees_upload_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employees_upload_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employees_upload_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employees/downloads: + get: + tags: + - Employees + summary: List Employees download requests + operationId: employees_download_list + description: | + Check the status of the Employees download requests. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/employees_download_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' + post: + tags: + - Employees + summary: Create a request to download an excel file for employees + description: | + Create a request to download an excel file containing employees columns. + operationId: employees_download_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: object + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/employees_download_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employees/summaries: + get: + tags: + - Employees + summary: List employee summaries + operationId: employee_summaries_list + 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) + parameters: + - $ref: '#/components/parameters/q' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/employee_summary_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' + /admin/files: + post: + operationId: files_post + tags: + - Files + summary: Create a file + description: | + Create a file. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/admin_file_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/file_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/files/bulk: + post: + operationId: files_post_bulk + tags: + - Files + summary: Bulk create files + description: | + Create files in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/admin_file_in' + additionalProperties: false + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/file_out' + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/files/generate_urls/bulk: + post: + operationId: files_generate_urls_bulk_post + tags: + - Files + summary: Bulk generate download and upload URLs + description: > + Once a file is created, its contents may need to be uploaded (or + downloaded). To upload (or download) contents, you'll + + need to generate a temporary signed URL. This API accomplishes that. The + signed URL is valid for 5 mins. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/file_generate_urls_action_in' + example: + - id: fi123819sa + - id: fi876833tu + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/file_generate_urls_action_out' + example: + - id: sdfd2391 + name: uber_expenses_vmrpw.pdf + content_type: application/pdf + download_url: https://aaa.bbb.cc/x232sds + upload_url: https://aaa.bbb.cc/x232sds + - id: sdfd2392 + name: lyft_expenses_vmrpw.pdf + content_type: application/pdf + download_url: https://aaa.bbb.cc/x22ddsds + upload_url: https://aaa.bbb.cc/x2sdssds + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/files/delete/bulk: + post: + operationId: files_delete + tags: + - Files + summary: Delete files bulk + description: | + Delete files bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/file_delete_action_in' + example: + - id: fi123819sa + - id: fi876833tu + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/files/download: + get: + operationId: files_download_get + tags: + - Files + summary: Download a file + description: | + Generates a download URL for a file and redirects client to that URL. + parameters: + - in: query + name: id + required: true + schema: + type: string + example: fiNhunGsCQJb + responses: + '302': + description: Redirect to file download URL + headers: + Location: + schema: type: string - example: - - EADVANCE_REQUESTS_CREATED - - EADVANCE_REQUESTS_UPDATED - - EADVANCE_REQUESTS_INQUIRY - description: List of events for which push notifications are unsubscribed - notify_user: - type: boolean - nullable: true - example: true - description: Whether to notify the user about events - notify_delegatee: - type: boolean - nullable: true - example: true - description: Whether to notify the delegatee about events - mileage_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for mileage tracking and rates - properties: - mileage_rate_labels: + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/automations/report_submissions: + post: + tags: + - Automations + summary: Create or update Report Submission Automations + description: | + Create or update Report Submission Automations + operationId: report_submission_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/automate_report_submission_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/automate_report_submission_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + get: + tags: + - Automations + summary: List Report Submission Automations + operationId: report_submission_get + description: | + List Report Submission Automations + 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/automate_report_submission_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' + /admin/automations/report_submissions/delete: + post: + tags: + - Automations + summary: Delete Report Submission Automation + description: | + Delete Report Submission Automation + operationId: report_submission_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/delete_automate_report_submission_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/automate_report_submission_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/accounting_exports: + get: + tags: + - Accounting Exports + summary: List accounting exports + 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: accounting_exports_list + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/accounting_export_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' + post: + tags: + - Accounting Exports + summary: Create or update an accounting export + operationId: accounting_export_post + description: | + Create or update an accounting export. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/accounting_export_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/accounting_export_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/accounting_export_lineitems: + get: + tags: + - Accounting Exports + summary: List accounting exports lineitems + 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: accounting_export_lineitems_list + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/accounting_export_lineitem_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' + post: + operationId: accounting_export_lineitems_post + tags: + - Accounting Exports + summary: Create or update an accounting export lineitem + description: | + Create or update an accounting export lineitem. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/accounting_export_lineitem_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/accounting_export_lineitem_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/accounting_export_lineitems/bulk: + post: + operationId: accounting_export_lineitems_bulk_post + tags: + - Accounting Exports + summary: Create or update accounting export lineitems in bulk + description: | + Create or update accounting export lineitems in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/accounting_export_lineitem_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expenses: + get: + tags: + - Expenses + summary: List expenses + description: > + This API gets you expenses submitted by any employee in the current + organization. + + + 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: expenses_list + 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/expense_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' + post: + tags: + - Expenses + summary: Create or update an expense + description: | + Create or update an expense. + operationId: expenses_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/admin_expense_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/attach_files/bulk: + post: + tags: + - Expenses + summary: Attach files to an expense in bulk + description: | + This API attaches files to an expense in bulk + operationId: attach_files_to_expense_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/attach_files_to_expense_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/accounting_export_summary/bulk: + post: + operationId: expenses_accounting_export_summary_bulk_post + tags: + - Expenses + summary: Create or update accounting export summary in bulk + description: | + Create or update accounting export summary in bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/accounting_export_summary_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expenses/filters: + post: + tags: + - Expenses + summary: Create Expenses saved filters + description: | + Save expenses filters for personal use or share with other admins. + operationId: expenses_filters_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_filters_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Expenses + summary: List Expenses saved filters + operationId: expenses_filters_get + description: | + List filters saved by the admin or shared with the admin. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/expense_filters_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' + /admin/expenses/filters/delete: + post: + tags: + - Expenses + summary: Delete Expenses saved filter + description: | + Delete Expenses saved filter having the provided id. + operationId: expenses_filters_post_action_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_filters_delete_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/verify/bulk: + post: + tags: + - Expenses + - Verify + - Verify expenses + - Bulk + summary: Verify expenses in bulk + description: | + Verify expenses in bulk. + operationId: expenses_verify_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/expenses_verify_bulk_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + - $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/stats: + post: + tags: + - Expenses + summary: Expenses Stats + description: | + Expenses Stats + operationId: expenses_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expenses_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expenses_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/exports: + post: + tags: + - Expenses + summary: Create Expenses Export + description: | + Create Expenses Export Request. + operationId: expenses_exports_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expenses_exports_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expenses_exports_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expenses/permissions: + post: + tags: + - Expenses + - Expense permissions + - Permissions + summary: Expense Permissions + description: | + Expense Permissions for the user + operationId: expense_permissions + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_permissions_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expense_permissions_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/merge: + post: + tags: + - Expenses + summary: Merge expenses + description: | + Merge expenses. + operationId: merge_expenses_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expenses_merge_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests: + get: + tags: + - Advances + summary: List advance requests + 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: advance_requests_list + 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/advance_request_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + post: + tags: + - Advances + summary: Update an advance request + description: | + Update an advance requests. + operationId: advance_requests_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_request_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/stats: + post: + tags: + - Advances + summary: Advances Requests Stats + description: | + Advances Requests Stats + operationId: advance_requests_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_requests_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_requests_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/permissions: + post: + tags: + - Advances + summary: Advance Request Permissions + description: > + Returns a list of all possible actions that can be performed on an + advance request by the current user. + operationId: advance_requests_permissions_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_request_permissions_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_request_permissions_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/comments: + post: + summary: Add comment to advance request + operationId: advance_requests_comments_post + description: | + This API allows admins to add comments to an advance request. + tags: + - Advances + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_comments_in' + responses: + '200': + description: Comment added successfully + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_comments_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/remove_approver: + post: + summary: Remove approver from advance request + operationId: advance_requests_remove_approver_post + description: > + This API allows admins to disable/remove an approver from an advance + request. + tags: + - Advances + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_remove_approver_in' + example: + data: + id: areq5F9xIaMURI + approver_email: approver@example.com + responses: + '200': + description: >- + Approver removed successfully and returns the updated advance + request + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. + /admin/advances: + get: + tags: + - Advances + summary: List advances + operationId: advances_list + 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) + 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/advance_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + post: + tags: + - Advances + summary: Create advances + description: | + Create advances. + operationId: advances_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advances/bulk: + post: + tags: + - Advances + summary: Create advances in bulk + description: | + Create advances in bulk. + operationId: advances_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/advance_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/advances/stats: + post: + tags: + - Advances + summary: Advances Stats + description: | + Advances Stats + operationId: advances_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advances_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advances_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_wallets: + get: + tags: + - Advances + summary: List advance wallets + operationId: advance_wallets_list + 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) + 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/advance_wallet_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + post: + tags: + - Advance wallets + summary: Create advance wallets + description: | + Create advance wallets. + operationId: advance_wallets_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_wallet_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_wallet_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_refunds: + get: + tags: + - Advances + summary: List advance refunds + 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: advance_refunds_list + 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/advance_refund_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + post: + tags: + - Advances + summary: Create an advance refund + description: | + Create an advance refund. + operationId: advance_refunds_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_refund_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_refund_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_refunds/bulk: + post: + tags: + - Advances + summary: Create advance refund in bulk + description: | + Create advance refund in bulk. + operationId: advance_refunds_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/advance_refund_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/advance_refunds/stats: + post: + tags: + - Advances + summary: Advances Refunds Stats + description: | + Advances Refunds Stats + operationId: advance_refunds_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_refunds_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_refunds_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reminders: + get: + tags: + - Reminders + summary: List Reminders + operationId: reminders_list + 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) + 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/reminder_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' + post: + operationId: reminders_post + tags: + - Reminders + summary: Create or update a reminder + description: | + Create or update a reminder. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/reminder_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/reminder_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reminders/delete: + post: + tags: + - Reminders + summary: Delete a reminder + description: | + Delete a reminder. + operationId: reminders_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/reminder_delete_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/reminder_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports: + get: + tags: + - Reports + summary: List reports + operationId: reports_list + 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) + parameters: + - $ref: '#/components/parameters/q' + 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/admin_report_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' + post: + tags: + - Reports + summary: Update Purpose + operationId: update_purpose + description: | + This API is used to update the the purpose of an report by Admin. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/admin_report_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/admin_report_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reports/eject_expenses: + post: + tags: + - Reports + summary: Eject expenses from a report + description: Eject expenses from a report + operationId: report_eject_expenses_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: >- + #/components/schemas/report_action_with_expenses_ids_to_eject + reason: + type: string + description: > + Reason for ejecting the expense \ + + Note: When ejecting own expense, reason is not required. + However, if another spender's expense are ejected reason is + mandatory. + example: All bills are in order + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_report_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/filters: + post: + tags: + - Reports + summary: Create Report saved filters + description: | + Save report filters for personal use or share them among other admins. + operationId: report_filters_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/report_filters_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/report_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Reports + summary: List Report saved filters + operationId: report_filters_get + description: | + List filters saved by the admin or share them among other admins. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/report_filters_out' + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/reports/filters/delete: + post: + tags: + - Reports + summary: Delete Report saved filter + description: | + Delete Report saved filter having the provided id. + operationId: report_filters_post_action_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/report_filters_delete_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/report_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/comments: + post: + tags: + - Reports + summary: Comments on a report + description: Comments on a report + operationId: report_comments_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/report_comments_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/report_comments_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/add_approver: + post: + tags: + - Reports + summary: Add Approver + description: | + Add Approver to the report + operationId: report_add_approver + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/add_approver_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_report_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/remove_approver: + post: + tags: + - Reports + summary: Remove an approver from a report + description: | + Remove an approver from a report using their email. + operationId: report_approvers_remove + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/report_action_remove_approver_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/admin_report_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reports/approve/bulk: + post: + tags: + - Reports + summary: Admin approve reports in bulk + description: | + Admin approve reports in bulk + operationId: report_admin_approve + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/report_action_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/send_back: + post: + tags: + - Reports + summary: Send back report + description: | + Send back report to the employee + operationId: report_send_back + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/send_back_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_report_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/process_ach/bulk: + post: + tags: + - Reports + summary: Process ACH + description: | + Process ACH + operationId: reports_process_ach + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/process_ach_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/mark_paid/bulk: + post: + tags: + - Reports + summary: Mark reports as Paid + description: | + Mark reports as Paid. + operationId: reports_mark_paid + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/mark_paid_bulk_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/process_manual/bulk: + post: + tags: + - Reports + summary: Process Manual + description: | + Process reports manually + operationId: reports_process_manual + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/process_manual_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/process_summary/bulk: + post: + tags: + - Reports + summary: Reimbursable amount summary + description: | + Reimbursable amount summary + operationId: reports_process_summary + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/process_summary_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/process_summary_out' + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/accounting_export_summary/bulk: + post: + tags: + - Reports + summary: Update accounting export summary and initiate export + description: | + Update accounting export summary and initiate export + operationId: reports_accounting_export_summary_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/report_accounting_export_summary_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/stats: + post: + tags: + - Reports + summary: Reports Stats + description: | + Reports Stats + operationId: reports_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/reports_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/reports_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/create_and_submit: + post: + tags: + - Reports + summary: Create and submit reports for employees + description: Create and submit reports for employees + operationId: report_create_and_submit + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/report_create_and_submit_expenses' + responses: + '200': + description: OK + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/permissions: + post: + tags: + - Reports + summary: Reports Permissions + description: | + Reports Permissions for a user + operationId: reports_permissions + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/report_permissions_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/report_permissions_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/apply_advance_wallets: + post: + tags: + - Reports + summary: Settle report with advance wallets + description: Settle report with advance wallets + operationId: report_apply_advance_wallets + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/apply_advance_wallets_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_report_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/remove_advance_wallets: + post: + tags: + - Reports + summary: Undo settling of report with advance wallets + description: | + This will undo the settling of the report with advance wallets + operationId: report_remove_advance_wallets + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/remove_advance_wallets_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_report_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reports/round_off_amount: + post: + tags: + - Reports + summary: Round off report amount + description: > + Round off report amount. This API first rounds of expenses and then + rounds off the total amount of the report. + operationId: report_round_off_amount + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/round_off_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/admin_report_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reports/exports: + get: + tags: + - Reports + summary: Get Reports Export + description: > + Get reports export request details. 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: reports_exports_get + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/reports_exports_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' + post: + tags: + - Reports + summary: Create Reports Export + description: | + Create Reports Export Request. + operationId: reports_exports_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/reports_exports_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/reports_exports_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_cards: + get: + tags: + - Corporate Cards + summary: List corporate cards + 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: corporate_cards_list + parameters: + - $ref: '#/components/parameters/q' + - $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/corporate_card_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' + post: + tags: + - Corporate Cards + summary: Create or update an corporate card + description: | + Create or update an corporate card. + operationId: corporate_cards_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_cards/bulk: + post: + tags: + - Corporate Cards + summary: Create or update corporate cards in bulk + description: | + Create or update corporate cards in bulk + operationId: corporate_cards_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_cards/bank_names: + get: + tags: + - Corporate Cards + summary: List corporate card bank names + description: > + This API just returns all the bank names associated with the corporate + cards in the org + operationId: corporate_cards_bank_names_list + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + bank_names: + type: array + items: + type: string + example: + - Amex + - Bank of America + description: > + Holds the bank names of all the corporate cards + present in the org + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/corporate_cards/masked_card_numbers: + get: + tags: + - Corporate Cards + summary: List corporate card masked card numbers + description: > + This API just returns all the masked card numbers (last 4 digits) + associated with the corporate cards in the org, based on the query + parameters. + operationId: corporate_cards_masked_card_numbers_list + parameters: + - $ref: '#/components/parameters/q_integer' + - $ref: '#/components/parameters/limit' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + masked_card_numbers: + type: array + items: + type: string + example: + - 1234 + - 5678 + description: > + Holds the masked card numbers (last 4 digits) of all + the corporate cards present in the org. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/corporate_cards/stats: + post: + tags: + - Corporate Cards + summary: Corporate Cards Stats + description: | + Stats for Corporate Cards + operationId: corporate_cards_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/corporate_card_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_cards/assign: + post: + tags: + - Corporate Cards + summary: Assign corporate card to user + description: | + Assign a corporate card to a user + operationId: corporate_cards_assign + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_assign_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_cards/unassign: + post: + tags: + - Corporate Cards + summary: Unassign corporate card from user + description: | + Unassign a corporate card from a user + operationId: corporate_cards_unassign + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_id_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_unassign_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_cards/reassign: + post: + tags: + - Corporate Cards + summary: Reassign corporate card to another user + description: | + Reassign a corporate card to another user + operationId: corporate_cards_reassign + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_reassign_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_cards/delete: + post: + tags: + - Corporate Cards + summary: Delete corporate card + description: | + Delete a corporate card and all its associated transactions + operationId: corporate_cards_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_id_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions: + get: + tags: + - Corporate Card Transactions + summary: List corporate card transactions + 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: corporate_card_transactions_list + parameters: + - $ref: '#/components/parameters/created_at' + - $ref: '#/components/parameters/updated_at' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/q' + 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/corporate_card_transaction_list_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' + post: + tags: + - Corporate Card Transactions + summary: Create or update corporate card transaction + description: | + Create or update an corporate card transactions. + operationId: corporate_card_transactions_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_post_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/bulk: + post: + tags: + - Corporate Card Transactions + summary: Bulk create or update corporate card transactions + description: | + Create or update corporate card transactions in bulk. + operationId: corporate_card_transactions_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transaction_in' + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_card_transactions/stats: + post: + tags: + - Corporate Card Transactions + summary: Corporate Card Transaction Stats + description: | + Corporate Card Transaction Stats + operationId: corporate_card_transactions_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/corporate_card_transactions_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/corporate_card_transactions_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/delete_summary/bulk: + post: + tags: + - Corporate Card Transactions + summary: Corporate Card Transaction Delete Summary + description: | + Corporate Card Transaction Delete Summary + operationId: corporate_card_transactions_delete_summary + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: >- + #/components/schemas/corporate_card_transactions_delete_summary_in + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transactions_delete_summary_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/delete: + post: + tags: + - Corporate Card Transactions + summary: Corporate Card Transaction Delete + description: | + Corporate Card Transaction Delete + operationId: corporate_card_transactions_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transactions_delete_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transaction_list_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/filters: + post: + tags: + - Corporate Card Transactions + summary: Corporate card transactions saved filters + description: > + Save Corporate Card Transaction filters for personal use or share with + other admins. + operationId: corporate_card_transaction_filters_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_filters_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Corporate Card Transactions + summary: List Corporate Card Transactions saved filters + operationId: corporate_card_transaction_filters_get + description: | + List filters saved by the admin or shared with the admin. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: >- + #/components/schemas/corporate_card_transaction_filters_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' + /admin/corporate_card_transactions/filters/delete: + post: + tags: + - Corporate Card Transactions + summary: Delete Corporate Card Transactions saved filter + description: | + Delete Corporate Card Transactions saved filter having the provided id. + operationId: corporate_card_transaction_filters_post_action_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_filters_delete_in + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_filters_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/assign: + post: + tags: + - Corporate Card Transactions + summary: Assign a corporate card transaction + description: | + Assign corporate card transaction to a user. + operationId: corporate_card_transactions_assign + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_assign_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_assign_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/assign/bulk: + post: + tags: + - Corporate Card Transactions + summary: Bulk assign corporate card transactions + description: | + Assign corporate card transactions to users in bulk. + operationId: corporate_card_transactions_assign_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transaction_assign_in' + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_card_transactions/reassign/bulk: + post: + tags: + - Corporate Card Transactions + summary: Bulk reassign corporate card transactions + description: | + Reassign corporate card transactions to users in bulk. + operationId: corporate_card_transactions_reassign_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: >- + #/components/schemas/corporate_card_transaction_reassign_in + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_card_transactions/unassign: + post: + tags: + - Corporate Card Transactions + summary: Unassign corporate card transaction + description: | + Unassign a corporate card transaction from a user. + operationId: corporate_card_transactions_unassign + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_unassign_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/mark_personal: + post: + tags: + - Corporate Card Transactions + summary: Mark a corporate card transaction as personal + description: | + Mark a corporate card transaction as personal + operationId: corporate_card_transactions_mark_personal + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_mark_personal_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/mark_personal/bulk: + post: + tags: + - Corporate Card Transactions + summary: Bulk mark personal corporate card transactions + description: | + Mark corporate card transactions as personal in bulk. + operationId: corporate_card_transactions_mark_personal_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_card_transactions/unmark_personal: + post: + tags: + - Corporate Card Transactions + summary: Unmark a corporate card transaction which is marked as personal + description: | + Unmark a corporate card transaction which is marked as personal + operationId: corporate_card_transactions_unmark_personal + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_unmark_personal_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/ignore: + post: + tags: + - Corporate Card Transactions + summary: Ignore a corporate card transaction + description: | + Ignore a corporate card transaction + operationId: corporate_card_transactions_ignore + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_ignore_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/ignore/bulk: + post: + tags: + - Corporate Card Transactions + summary: Bulk ignore corporate card transactions + description: | + Ignore corporate card transactions in bulk. + operationId: corporate_card_transactions_ignore_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/corporate_card_transactions/undo_ignore: + post: + tags: + - Corporate Card Transactions + summary: Undo an ignored corporate card transaction + description: | + Undo an ignored corporate card transaction + operationId: corporate_card_transactions_undo_ignore + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_id_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_undo_ignore_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/match: + post: + tags: + - Corporate Card Transactions + summary: Match corporate card transaction + description: | + Match corporate card transaction to expenses + operationId: corporate_card_transactions_match + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_match_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_match_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/unmatch: + post: + tags: + - Corporate Card Transactions + summary: Unmatch corporate card transaction + description: | + Unmatch a matched corporate card transaction + operationId: corporate_card_transactions_unmatch + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transaction_unmatch_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transaction_unmatch_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/corporate_card_transactions/exports: + post: + tags: + - Corporate Card Transactions + summary: Create Corproate Card Transactions Export + description: | + Create Corporate Card Transactions Export Request. + operationId: corporate_card_transactions_exports_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/corporate_card_transactions_exports_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/corporate_card_transactions_exports_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/virtual_cards: + get: + tags: + - Virtual Cards + summary: List virtual cards + 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: virtual_cards_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/virtual_card_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' + /admin/virtual_cards/get_current_amount: + post: + tags: + - Virtual Cards + summary: Get current balance amount of the virtual card + description: | + To get the current balance amount of the virtual card + operationId: virtual_cards_get_current_balance + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_cards_id_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_cards_get_current_balance_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/virtual_cards/show_card_details: + post: + tags: + - Virtual Cards + summary: Show full card details + description: | + To get the card details of the virtual card + operationId: virtual_cards_show_card_details + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_cards_id_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_cards_show_card_details_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/virtual_cards/delete: + post: + tags: + - Virtual Cards + summary: Delete a virtual card + description: | + To delete a virtual card + operationId: virtual_cards_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_cards_id_in' + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/virtual_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/subscriptions: + post: + tags: + - Subscriptions + summary: Create a subscription + description: subscribe to different events using this API + operationId: admin_subscriptions_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_subscriptions_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/admin_subscriptions_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + callbacks: + REPORT.*: + '{$request.body#/data/webhook_url}': + post: + operationId: report_subscriptions_callback + summary: Object that will be sent to the callback url + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/report_out_subscriptions_admin' + responses: + '200': + description: OK + get: + tags: + - Subscriptions + summary: List Admin Subscriptions + operationId: subscriptions_list + 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) + 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/admin_subscriptions_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reimbursements: + get: + tags: + - Reimbursements + summary: List reimbursements + operationId: reimbursements_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/reimbursement_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reimbursements/mark_paid/bulk: + post: + tags: + - Reimbursements + summary: Bulk mark paid reimbursements + operationId: mark_paid_reimbursements_bulk + description: | + Marks reimbursement as paid and move reports to paid state. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/reimbursement_in_minimal' + responses: + '200': + description: OK + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/employee_account_summaries: + get: + tags: + - Settlements + summary: List employee accounts summaries + operationId: employee_account_summaries_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/employee_account_summary_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/schedules: + post: + tags: + - Schedules + summary: Create or update a Schedule + description: | + Create or update a Schedule. + operationId: schedules_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/schedule_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/schedule_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + get: + tags: + - Schedules + summary: List Schedule + operationId: schedules_list + 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) + 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/schedule_out' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/scheduled_callbacks: + post: + tags: + - Scheduled Callbacks + summary: Create or update a Scheduled Callback + description: | + Create or update a Scheduled Callback. + operationId: scheduled_callbacks_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/scheduled_callback_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/scheduled_callback_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + get: + tags: + - Scheduled Callbacks + summary: List Scheduled Callback + operationId: scheduled_callbacks_list + 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) + 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/scheduled_callback_out' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/spend_overview/summary: + get: + tags: + - Spend Overview + summary: Spend Overview Summary + operationId: spend_overview_summary + description: > + API to return spend overview summary data. Data returned by this API can + be used to plot a time series graph depicting amount of spend over a + period of time.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_granularity' + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/is_card_spend' + - $ref: '#/components/parameters/is_reimbursable' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/user_id' + - $ref: '#/components/parameters/corporate_card_id' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + time_interval_granularity: + $ref: '#/components/schemas/time_interval_granularity' + total_amount: + $ref: '#/components/schemas/total_amount' + data: + type: array + items: + $ref: '#/components/schemas/spend_overview_summary_data_out' + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_merchant: + get: + tags: + - Spend Overview + summary: Spend Overview By Merchant + operationId: spend_overview_by_merchant + description: > + API to return spend overview data grouped by merchant.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/user_id' + - $ref: '#/components/parameters/corporate_card_id' + 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/spend_overview_by_merchant_data_out' + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_project: + get: + tags: + - Spend Overview + summary: Spend Overview By Project + operationId: spend_overview_by_project + description: > + API to return spend overview data grouped by project.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/user_id' + - $ref: '#/components/parameters/corporate_card_id' + 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/spend_overview_by_project_data_out' + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_category: + get: + tags: + - Spend Overview + summary: Spend Overview By Category + operationId: spend_overview_by_category + description: > + API to return spend overview data grouped by category.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/user_id' + - $ref: '#/components/parameters/corporate_card_id' + 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/spend_overview_by_category_data_out' + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_department: + get: + tags: + - Spend Overview + summary: Spend Overview By Department + operationId: spend_overview_by_department + description: > + API to return spend overview data grouped by department.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/user_id' + - $ref: '#/components/parameters/corporate_card_id' + 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/spend_overview_by_department_data_out + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_user: + get: + tags: + - Spend Overview + summary: Spend Overview By User + operationId: spend_overview_by_user + description: > + API to return spend overview data grouped by user of an org.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/corporate_card_id' + 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/spend_overview_by_user_data_out' + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/spend_overview/by_corporate_card: + get: + tags: + - Spend Overview + summary: Spend Overview By Corporate Card + operationId: spend_overview_by_corporate_card + description: > + API to return spend overview data grouped by corporate cards being used + in an org.
+ + 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) + parameters: + - $ref: '#/components/parameters/time_interval_preset' + - $ref: '#/components/parameters/time_interval_start' + - $ref: '#/components/parameters/time_interval_end' + - $ref: '#/components/parameters/merchant' + - $ref: '#/components/parameters/project_id' + - $ref: '#/components/parameters/category_id' + - $ref: '#/components/parameters/department_id' + - $ref: '#/components/parameters/user_id' + 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/spend_overview_by_corporate_card_data_out + '202': + description: Request Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/202' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '500': + description: API Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/accounts: + get: + tags: + - Accounts + summary: List accounts + 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: accounts_list + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/account_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + post: + operationId: accounts_post + tags: + - Accounts + summary: Create an account + description: | + Create an account + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/account_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/account_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/tax_groups: + get: + tags: + - Tax Groups + summary: List tax groups + operationId: tax_groups_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/tax_group_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' + post: + operationId: tax_groups_post + tags: + - Tax Groups + summary: Create or update a tax group + description: | + Create or update a tax group. + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/tax_group_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/tax_group_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/tax_groups/bulk: + post: + operationId: tax_groups_bulk_post + tags: + - Tax Groups + summary: Create or update tax groups in bulk + description: | + Create or update tax groups in bulk. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/tax_group_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/budgets: + post: + tags: + - Budgets + summary: Create or update a Budget + description: | + Create or update a Budget + operationId: budgets_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/budget_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/budget_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + get: + tags: + - Budgets + summary: List Budgets + operationId: budgets_list + 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) + 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/budget_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' + /admin/budget_usages: + get: + tags: + - Budgets + summary: List Budget Usages + operationId: budget_usages_list + parameters: + - $ref: '#/components/parameters/created_at' + - $ref: '#/components/parameters/updated_at' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/order' + 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/budget_usage_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' + /admin/orgs: + get: + tags: + - Organisations + summary: List Organisations + operationId: orgs_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/org_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' + /admin/expense_policy_rules: + post: + tags: + - Expense Policies + summary: Create or Update Expense Policy Rules + description: > + Create or Update Expense Policy Rules
+ + **Apart from the required fields mentioned below, the request body + should contain the following:** + + - You should choose at least one condition from **expense_*** or + **employee_***. + + - You should choose at least one action from **action_***.

+ + _When multiple conditions are provided, then there will AND operation in + between them and the policy rule + + will only be applicable on expenses if all of the conditions match. +
+ + Similarly, for actions, if multiple actions are provided then all of the + actions will be applied when conditions satisfy._ + operationId: expense_policy_rules_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_policy_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expense_policy_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Expense Policies + summary: Get Expense Policy Rules + operationId: expense_policy_rules_get + parameters: + - in: query + name: id + description: > + The id of the expense policy rule.
+ + Supported operators are `eq`, `in`, `neq`, `not_in`.
+ + id=eq."id"
+ + id=in.("id1","id2","id3")
+ + id=neq."id"
+ + id=not_in.("id1","id2","id3") + + > If no id is passed then all the expense policy rules of the org + will be returned. + schema: + type: string + example: eq."tprmdNPsd" + - in: query + name: is_enabled + description: | + Whether to fetch only active expense policy rule.
+ Supported operators are `eq`.
+ is_enabled=eq.true
+ is_enabled=eq.false + schema: + type: string + example: eq.true + - in: query + name: is_retired + description: | + Whether to fetch retired expense policy rule.
+ Supported operators are `eq`.
+ is_retired=eq.true
+ is_retired=eq.false + schema: + type: string + example: eq.true + - in: query + name: is_approver_policy + description: > + Whether to fetch expense policy rules that add an approver to an + expense on violation.
+ + Supported operators are `eq`.
+ + is_approver_policy=eq.true
+ + is_approver_policy=eq.false + schema: + type: string + example: eq.true + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/expense_policy_out' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/expense_policy_rules/enable: + post: + tags: + - Expense Policies + summary: Enable an Expense Policy Rule + description: | + Enable an Expense Policy Rule + operationId: expense_policy_rules_enable + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_policy_state_change_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expense_policy_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Object Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expense_policy_rules/disable: + post: + tags: + - Expense Policies + summary: Disable an Expense Policy Rule + description: | + Disable an Expense Policy Rule + operationId: expense_policy_rules_disable + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_policy_state_change_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expense_policy_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Object Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expense_policy_rules/reorder: + post: + tags: + - Expense Policies + summary: Reorder approver policies + description: > + Reorder the enabled approver policies of an org. + + - An **approver policy** is a policy that adds an approver to an expense + on violation. + + - All **enabled** approver policy IDs must be provided in the request + body. + operationId: expense_policy_rules_reorder + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_policy_state_change_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expense_policy_states: + get: + tags: + - Expense Policies + summary: Get policy states of Expenses + description: | + Get policy states of Expenses + operationId: expense_policy_states_get + parameters: + - in: query + name: expense_id + description: > + The id of the expense for which you are querying the policy + states.
+ + Supported operators are `eq`, `in`, `neq`, `not_in`.
+ + expense_id=eq."id"
+ + expense_id=in.("id1","id2","id3")
+ + expense_id=neq."id"
+ + expense_id=not_in.("id1","id2","id3") + schema: + type: string + example: eq."txSdfsytrqw" + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/expense_policy_states_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Object Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /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' + /admin/statements/upload: + post: + tags: + - Statements + summary: Upload a statement + description: > + Upload a corporate card statement(csv or excel) to Fyle for + reconciliation. + operationId: statements_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/statements_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /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' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + /admin/statements/suggest_mappings: + post: + tags: + - Statements + summary: Statement mapping suggestion + 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_suggest + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + statement_id: + type: string + description: | + The id of the uploaded statement. + required: + - id + required: + - data + additionalProperties: false + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: object + items: + $ref: '#/components/schemas/statement_mappings_suggest_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/statements/preview: + post: + tags: + - Statements + summary: Preview of the uploaded statement + description: > + This API helps in converting the statement with the mapping chosed and + helps the user to preview it, this doesn't save the statement + operationId: statements_preview + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/preview_from_statement_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/preview_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/statements/card_stats: + post: + tags: + - Statements + summary: RTF Card Stats of a Statement + description: > + This API helps in getting all the card stats of a statement during RTF + missing transactions upload. Stats include information such as if Card + exists in Fyle, RTF enrollment of card etc. + operationId: card_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/card_transaction_from_statement_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/card_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/statements/matching_cards: + post: + tags: + - Statements + summary: Matching cards present in Fyle + description: | + Returns matching cards present in Fyle for cards in Statement + operationId: matching_cards + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/card_transaction_from_statement_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/matching_cards_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/statements/missing_transactions: + post: + tags: + - Statements + summary: Process RTF Missing Transactions Reconciliation + description: > + This API is used to start processing RTF missing transactions + reconciliation of a statement. + operationId: post_missing_transactions + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: >- + #/components/schemas/rtf_missing_transaction_from_statement_in + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + 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' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + items: + $ref: >- + #/components/schemas/rtf_missing_transaction_from_statement_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' + /admin/statements/create_card_transactions: + post: + tags: + - Statements + summary: Create corporate card transactions out of the uploaded statement + description: > + This API helps in converting the statement with the mapping chosed and + create card transactions out of the statement. + operationId: statements_create_card_transactions + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/card_transaction_from_statement_in' + required: + - data + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/statements/rtf_stats: + get: + tags: + - Statements + summary: Get RTF Stats of the last uploaded statement + description: > + This API is used to get the RTF stats of the last uploaded statement for + an organization. + operationId: get_rtf_stats + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + items: + $ref: '#/components/schemas/rtf_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expense_rules: + post: + tags: + - Expense Rules + summary: Create or Update expense rules + description: | + Create or Update expense rules + operationId: expense_rules_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + get: + tags: + - Expense Rules + summary: List expense rules + operationId: expense_rules_list + 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) + 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/expense_rule_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' + /admin/expense_rules/dismiss_suggestion: + post: + tags: + - Expense Rules + summary: Dismiss an expense rule suggestion + description: | + Dismiss an expense rule suggestion. + operationId: expense_rules_dismiss_suggestion + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_dismiss_suggestion_in' + responses: + '200': + description: The expense rule suggestion was dismissed successfully + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expense_rules/delete: + post: + tags: + - Expense Rules + summary: Delete an expense rule + description: | + Delete an expense rule. + operationId: expense_rules_delete + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_delete_in' + responses: + '200': + description: The expense was deleted successfully + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_rule_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/check_mandatory_fields: + post: + tags: + - Expenses + summary: Check expense for missing mandatory fields + description: > + Before updating employee's expense object + + into Fyle, based on the business requirements, you might want to check + if you have added all the mandatory fields set up by your organization. + + You can easily do that by passing the same expense object with some + extra optional fields documented below. + operationId: check_mandatory_fields_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_check_mandatory_fields_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expense_check_mandatory_fields_out' + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/comments: + get: + tags: + - Expenses + summary: List expense comments + description: List all the comments of an expense + operationId: expense_comments_get + parameters: + - $ref: '#/components/parameters/expense_id' + 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/expense_comments_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/comments/bulk: + post: + tags: + - Expenses + - Expense comments + - Comments + summary: Bulk comment on expenses + description: > + Bulk comment on expenses as an admin. The API allows you to add comments + to multiple expenses at once. + operationId: expense_comments_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/expense_comments_bulk_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_comments_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/dismiss_duplicates/bulk: + post: + tags: + - Expenses + summary: Dismiss Duplicate expenses + description: | + This API helps dismissing similar expenses as a duplicates. + operationId: dismiss_duplicates_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_dismiss_duplicates_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: string + nullable: true + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expenses/duplicate_sets: + get: + tags: + - Expenses + summary: List expense duplicate sets + operationId: expense_duplicate_sets + description: > + This API provides the sets of the duplicate expenses for a particular + employee. + parameters: + - in: query + name: expense_id + description: An expense_id for what we need to fetch the duplicate expenses. + schema: + type: string + example: txdsjkF453kh + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_duplicate_sets_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' + /admin/expenses/duplicate_sets/stats: + get: + tags: + - Expenses + summary: Expense duplicate sets stats + operationId: expense_duplicate_sets_stats + description: > + This API returns count of expenses duplicate set present in org across + all employees. + requestBody: + required: true + content: + application/json: + schema: type: object - nullable: true - example: null - description: Labels for different mileage rates - annual_mileage_of_user_before_joining_fyle: + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/expenses_duplicate_sets_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/expenses_duplicate_sets_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/feature_configs: + get: + tags: + - Feature Configs + summary: List feature configs. + operationId: feature_configs_list + 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) + 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/feature_config_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' + /admin/feature_configs/bulk: + post: + tags: + - Feature Configs + summary: Create or update feature configs. + description: | + This API allows you to create or update feature configs. + operationId: feature_configs_bulk_post + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/feature_config_in' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/expenses/split: + post: + tags: + - Expenses + summary: Split an expense + description: | + Admin can split an expense created by spender which is not yet paid out. + operationId: expenses_split_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/admin_split_expense_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/split/check_mandatory_fields: + post: + tags: + - Expenses + summary: Check mandatory fields before splitting an expense + description: > + Before splitting an employee's expense object + + into Fyle, based on the business requirements, you might want to check + if you have added all the mandatory fields set up by your organization. + + You can easily do that by passing the same expense split object + documented below. + operationId: expenses_split_check_mandatory_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/admin_split_expense_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_check_mandatory_fields_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/split/check_policies: + post: + tags: + - Expenses + summary: Check for policy violations before splitting an expense + description: > + Before splitting an [expense + object](https://docs.fylehq.com/docs/fyle-platform-docs/7a3407a5ef184-split-an-expense) + + into Fyle, based on the business requirements, you might want to check + the resulting + + expenses against the policy rules set up by your organization. You can + easily do that by passing the same split expense object + + to this API. + operationId: expenses_split_check_policies_post + requestBody: + required: true + content: + application/json: + schema: type: object - nullable: true - example: {} - description: Annual mileage limit for user before joining Fyle - expense_form_autofills: - type: object - nullable: true - additionalProperties: false - description: Settings for automatic form filling in expenses - properties: - allowed: - type: boolean - nullable: true - example: true - description: Whether expense form autofill is allowed - enabled: - type: boolean - nullable: true - example: true - description: Whether expense form autofill is enabled - data_extractor_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for data extraction from receipts - properties: - allowed: - type: boolean - nullable: true - example: true - description: Whether data extraction is allowed - enabled: - type: boolean - nullable: true - example: true - description: Whether data extraction is enabled - in_app_chat_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for in-app chat functionality - properties: - allowed: - type: boolean - nullable: true - example: true - description: Whether in-app chat is allowed - enabled: - type: boolean - nullable: true - example: true - description: Whether in-app chat is enabled - restore_id: - type: string - nullable: true - example: null - description: ID for restoring chat session - payment_mode_settings: - type: object - nullable: true - additionalProperties: false - description: Settings for payment modes - properties: - allowed: - type: boolean - nullable: true - example: true - description: Whether payment mode selection is allowed - enabled: - type: boolean - nullable: true - example: true - description: Whether payment mode selection is enabled - allowed_payment_modes: - type: array - nullable: true - items: - type: string - example: - - PERSONAL_ACCOUNT - - COMPANY_ACCOUNT - description: List of payment modes allowed for the employee - locale: - type: object - nullable: true - additionalProperties: false - description: Settings for user's locale and timezone - properties: - timezone: - type: string - nullable: true - example: Asia/Kolkata - description: User's timezone - abbreviation: - type: string - nullable: true - example: IST - description: Timezone abbreviation - offset: - type: string - nullable: true - example: '05:30:00' - description: Timezone offset from UTC - is_personal_cards_enabled: - type: boolean - example: true - description: Whether personal card usage is enabled - default_project_id: - type: string - nullable: true - example: null - description: Default project ID for expenses - default_payment_mode: - type: string - nullable: true - example: null - description: Default payment mode for expenses - default_vehicle_type: - type: string - nullable: true - example: null - description: Default vehicle type for mileage expenses - attach_files_to_advance_request_in: - type: object - required: - - id - - file_ids - properties: - id: - allOf: - - $ref: '#/components/schemas/id_string' - example: areqsjfwlrglw - file_ids: - type: array - items: - $ref: '#/components/schemas/id_string' - example: - - figwiwpjww - description: List of files to be attached to the advance request - advance_request_bulk_approve_in: - type: object - additionalProperties: false - required: - - id - properties: - id: - $ref: '#/components/schemas/id_string' - description: ID of the advance request to be approved - example: areq5F9xIaMURI - advance_request_add_approver_in: - type: object - additionalProperties: false - required: - - id - - approver_email - - comment - properties: - id: - $ref: '#/components/schemas/id_string' - description: ID of the advance request to add approver to - example: areq5F9xIaMURI - approver_email: - $ref: '#/components/schemas/email' - description: Email address of the approver to be added - example: approver@example.com - comment: - type: string - description: A comment explaining the reason for adding the approver - example: Need your review on this advance - advance_request_reject_in: - type: object - additionalProperties: false - required: - - id - - comment - properties: - id: - $ref: '#/components/schemas/id_string' - description: ID of the advance request to be rejected - example: areq5F9xIaMURI - comment: - type: string - description: Reason for rejecting the advance request - example: Budget exceeded - advance_request_inquire_in: - type: object - additionalProperties: false - required: - - id - - comment - properties: - id: - $ref: '#/components/schemas/id_string' - description: ID of the advance request to inquire about - example: areq5F9xIaMURI - comment: - type: string - description: Reason for sending the advance request back to the spender - example: Please provide additional documentation - advance_request_custom_field_out: - type: object - additionalProperties: false - properties: - id: - type: integer - description: ID of the custom field - example: 123 - org_id: - $ref: '#/components/schemas/org_id' - name: - type: string - description: Name of the custom field - example: Department - type: - type: string - enum: - - TEXT - - NUMBER - - SELECT - - MULTI_SELECT - - BOOLEAN - - LOCATION - - USER_LIST - - DATE - description: Type of the custom field - example: SELECT - options: - type: array - items: + properties: + data: + $ref: '#/components/schemas/admin_split_expense_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/expense_check_policies_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/orgs/bank_details: + get: + tags: + - Organisations + summary: List Bank Account Details of Organisations + operationId: orgs_bank_details_list + 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) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/org_bank_details_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' + /admin/merchants: + get: + tags: + - Merchants + summary: List merchants + operationId: merchants_list + parameters: + - $ref: '#/components/parameters/id' + - $ref: '#/components/parameters/created_at' + - $ref: '#/components/parameters/updated_at' + - $ref: '#/components/parameters/display_name' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/order' + 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/merchant_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' + /admin/reconciliation_entries: + get: + tags: + - Reconciliation + summary: List reconciliation entries + description: > + Retrieve reconciliation entries for corporate card statement + reconciliations. + + + Use this endpoint to fetch entries with period, status and totals, and + filter across all fields using the `q` parameter. Pagination is + supported via `offset` and `limit`, and sorting via `order`. + + + To understand filtering, ordering and pagination, see the [Guide to Data + APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + operationId: reconciliation_entries_list + parameters: + - $ref: '#/components/parameters/q' + - $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/reconciliation_entry' + '400': + description: Bad request + content: + application/json: + schema: + type: object + properties: + message: + type: string + nullable: true + example: > + Can not delete project(s) used in other resources like + expense, expense policy, expense rules, budgets, dependent + fields. + data: + type: object + example: null + error: + type: string + example: InvalidUsage + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reconciliation_entries/transactions: + get: + tags: + - Reconciliation + summary: List reconciliation transactions + description: > + Retrieve reconciliation transactions for corporate card statement + reconciliations. + + + Use this endpoint to fetch transactions with statement details and + matched expenses. Filter across fields using the `q` parameter and + structured filters. Pagination is supported via `offset` and `limit`, + and sorting via `order`. + + + To understand filtering, ordering and pagination, see the [Guide to Data + APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + operationId: reconciliation_transactions_list + parameters: + - $ref: '#/components/parameters/q' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - in: query + name: statement_amount + schema: type: string - description: Options for SELECT and MULTI_SELECT field types - example: - - HR - - Finance - nullable: true - is_mandatory: - type: boolean - description: Whether the field is mandatory - example: true - is_enabled: - type: boolean - description: Whether the field is enabled - example: true - placeholder: - type: string - description: Placeholder text for the field - example: Select dept - nullable: true - created_at: - $ref: '#/components/schemas/created_at' - updated_at: - $ref: '#/components/schemas/updated_at' - advance_request_custom_fields_out: - type: array - items: - $ref: '#/components/schemas/advance_request_custom_field_out' - description: List of advance request custom fields - advance_request_custom_field_in: - type: object - additionalProperties: false - required: - - name - - type - - is_mandatory - - is_enabled - - placeholder - properties: - id: - type: integer - description: ID of the custom field (optional, required for update operations) - example: 123 - name: - type: string - description: Name of the custom field - example: Department - type: - type: string - enum: - - TEXT - - NUMBER - - SELECT - - MULTI_SELECT - - BOOLEAN - - LOCATION - - USER_LIST - - DATE - description: Type of the custom field - example: SELECT - options: - type: array - items: + description: Filter by statement amount using operators like eq., gt., lt., etc. + - in: query + name: statement_merchant + schema: + type: string + description: Filter by statement merchant using operators like eq., ilike., etc. + - in: query + name: statement_transaction_date + schema: type: string - description: Options for SELECT and MULTI_SELECT field types - example: - - HR - - Finance - is_mandatory: - type: boolean - description: Whether the field is mandatory - example: true - placeholder: - type: string - maxLength: 50 - description: Placeholder text for the field (max 50 characters) - example: Select dept - is_enabled: - type: boolean - description: Whether the field is enabled or disabled - example: true - parameters: - q: - in: query - name: q - description: A search query to filter the results. - schema: - type: string - example: Ritas - limit: - in: query - name: limit - description: | - A limit on the number of objects to be returned. Allowed values are from 1 to 200. - schema: - type: integer - example: 20 - default: 50 - maximum: 200 - created_at: - in: query - name: created_at - description: | - Date string in yyyy-MM-ddTHH:mm:ss.SSSZ format along with operator in RHS dot pattern.
Supported operators are `gte`,`lte`,`gt`,`lt`. - schema: - type: string - example: gte.2020-06-01T00:00:00.000-08:00 - updated_at: - in: query - name: updated_at - description: | - Date string in yyyy-MM-ddTHH:mm:ss.SSSZ format along with operator in RHS dot pattern.
Supported operators are `gte`,`lte`,`gt`,`lt`. - schema: - type: string - example: gte.2020-06-01T00:00:00.000-08:00 - order: - in: query - name: order - description: | - use comma separated column names for sorting the results.
- For sorting in descending order, use `column_name.desc` - schema: - type: string - example: updated_at.desc,id - offset: - in: query - name: offset - description: | - offset is used to skip that many number of objects before counting.
- schema: - type: integer - example: 10 - q_integer: - in: query - name: q - description: A search query to filter the results. - schema: - type: integer - example: 1234 - time_interval_granularity: - in: query - name: time_interval_granularity - description: | - The time duration by which to group expenses to aggregate sum of amount. - Supported operator is `eq`. - schema: - type: string - default: eq.month - enum: - - eq.day - - eq.month - - eq.quarter - - eq.year - example: eq.month - time_interval_preset: - in: query - name: time_interval_preset - description: | - Preset time durations which can be used to filter expenses by spend date. - Default value is used if it is not specified and time_interval_start and time_interval_end params are also not specified. - Supported operator is `eq`. - schema: - type: string - default: eq.this_year - enum: - - eq.this_week - - eq.this_month - - eq.this_quarter - - eq.this_year - example: eq.this_year - time_interval_start: - in: query - name: time_interval_start - description: | - Start of time duration for filtering expenses by spend date. - Need not to be specified if time_interval_preset param is passed. - Supported operator is `eq`. - schema: - type: string - description: Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). - example: '2020-06-01T13:14:54.804+00:00' - time_interval_end: - in: query - name: time_interval_end - description: | - End of time duration for filtering expenses by spend date. - Need not to be specified if time_interval_preset param is passed. - Supported operator is `eq`. - schema: - type: string - description: Date-time in [ISO8601 format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14). - example: '2021-06-01T13:14:54.804+00:00' - is_card_spend: - in: query - name: is_card_spend + description: >- + Filter by transaction date using timestamp operators like gte., + lte., etc. + - in: query + name: statement_post_date + schema: + type: string + description: Filter by post date using timestamp operators like gte., lte., etc. + - in: query + name: is_ignored + schema: + type: string + description: Filter by ignored flag using eq.true/eq.false + - in: query + name: is_reconciled + schema: + type: string + description: Filter by reconciled flag using eq.true/eq.false + 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/reconciliation_transaction_out' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/reconciliation_entries/transactions/reconcile/bulk: + post: + tags: + - Reconciliation + summary: Bulk reconcile reconciliation transactions description: | - For filtering out only those expenses where source account is corporate card account - Supported operators are `eq`.
- schema: - type: string - example: eq.true - is_reimbursable: - in: query - name: is_reimbursable + Reconcile multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_reconcile_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to reconcile. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: >- + Unique id of the reconciliation transaction to + reconcile. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk reconcile. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/match_and_reconcile/bulk: + post: + tags: + - Reconciliation + summary: Bulk match and reconcile reconciliation transactions + description: > + Match reconciliation transactions with target transactions/expenses and + reconcile in bulk. + operationId: reconciliation_transactions_match_and_reconcile_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: >- + List of source and target reconciliation transaction + identifiers to match and reconcile. + items: + type: object + additionalProperties: false + required: + - source_id + - target_id + properties: + source_id: + type: string + description: Source reconciliation transaction id. + example: rectx8abc123 + target_id: + type: string + description: >- + Target reconciliation transaction or expense id to + match with. + example: rectx8xyz789 + example: + - source_id: rectx8abc123 + target_id: rectx8xyz789 + - source_id: rectx8def456 + target_id: rectx8uvw000 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: >- + Result of bulk match and reconcile. Empty object on + success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/find_match: + post: + tags: + - Reconciliation + summary: Find matches for a reconciliation transaction description: | - For filtering out only those expenses which are reimbursable to the employee. - Supported operators are `eq`.
- schema: - type: string - example: eq.true - merchant: - in: query - name: merchant + Find potential matching expenses for a reconciliation transaction. + operationId: reconciliation_transactions_find_match + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: >- + Unique id of the reconciliation transaction for which to + find matches. + example: rectx8abc123 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + description: >- + List of potential matches for the provided reconciliation + transaction. + items: + $ref: '#/components/schemas/reconciliation_transaction_out' + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/ignore/bulk: + post: + tags: + - Reconciliation + summary: Bulk ignore reconciliation transactions description: | - List of merchants for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(los-pollos-harmanos,saul-goodman) - category_id: - in: query - name: category_id + Ignore multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_ignore_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to ignore. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to ignore. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk ignore. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/eligible_cards: + get: + tags: + - Reconciliation + summary: List eligible cards for a reconciliation entry + description: > + Returns the list of corporate cards that are eligible for a given + reconciliation entry. + + To understand filtering, ordering and pagination, see the [Guide to Data + APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + operationId: reconciliation_entries_eligible_cards_list + parameters: + - in: query + name: reconciliation_entry_id + required: true + schema: + type: string + example: receabc12345 + description: | + Reconciliation entry id for which eligible cards should be listed. + - in: query + name: status + required: false + schema: + type: string + example: RECONCILED + description: | + Optional status filter for eligible cards. + - $ref: '#/components/parameters/q' + - $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/reconciliation_eligible_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/eligible_cards/stats: + post: + tags: + - Reconciliation + summary: Stats for eligible cards of a reconciliation entry + description: > + Returns aggregate stats for corporate cards eligible under a + reconciliation entry. + + + Use this endpoint to get period window, transaction and expense totals, + differences, and card-level aggregate counts such as matching issues and + reconciliation status. + operationId: reconciliation_entries_eligible_cards_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/reconciliation_eligible_cards_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: >- + #/components/schemas/reconciliation_eligible_cards_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/delete/bulk: + post: + tags: + - Reconciliation + summary: Bulk delete reconciliation transactions description: | - Category IDs for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(cat123,cat345) - project_id: - in: query - name: project_id + Delete multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_delete_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to delete. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to delete. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk delete. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/unmatch/bulk: + post: + tags: + - Reconciliation + summary: Bulk unmatch reconciliation transactions description: | - Project IDs for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(proj123,proj456) - department_id: - in: query - name: department_id + Unmatch multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_unmatch_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to unmatch. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: >- + Unique id of the reconciliation transaction to + unmatch. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk unmatch. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulk_error' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/transactions/resolve_multi_matches: + post: + tags: + - Reconciliation + summary: Resolve multiple matches for a reconciliation transaction + description: > + Resolve multiple potential matches by selecting a specific expense for a + reconciliation transaction. + operationId: reconciliation_transactions_resolve_multi_matches + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + - expense_id + properties: + id: + type: string + description: >- + Reconciliation transaction id for which to resolve + multiple matches. + example: rectx8abc123 + expense_id: + type: string + description: Selected expense id to resolve against. + example: txuXDH16HzK + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of resolve operation. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/reconciliation_entries/close: + post: + tags: + - Reconciliation + summary: Close reconciliation entry description: | - Department IDs for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(dept123,dept345) - user_id: - in: query - name: user_id + Mark a reconciliation entry as reconciled/closed. + operationId: reconciliation_entries_close + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Reconciliation entry id to close. + example: receabc12345 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of close operation. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expenses/delete/bulk: + post: + summary: Bulk delete expenses + description: >- + Deletes multiple expenses based on the provided list of IDs, with access + limited to the user's own expenses. + tags: + - Expenses + security: + - oauth2: + - '*' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/ExpenseActionDeleteId' + responses: + '200': + description: Expenses successfully processed for deletion. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + /admin/employee_settings: + get: + tags: + - Employee Settings + summary: Get Employee Settings + operationId: admin_employee_settings_get description: | - User IDs for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(us123,us456) - corporate_card_id: - in: query - name: card_id + Get employee settings for a given employee. + parameters: + - in: query + name: employee_id + schema: + type: string + required: true + description: The employee ID for user whom we need to fetch settings + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + - count + - offset + properties: + count: + $ref: '#/components/schemas/count' + offset: + $ref: '#/components/schemas/offset' + data: + type: array + items: + $ref: '#/components/schemas/spender_employee_settings_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + /admin/advance_requests/attach_files/bulk: + post: + tags: + - Advances + summary: Bulk attach files to advance requests description: | - Corporate card IDs for filtering expenses. - Supported operator is `in`. - schema: - type: string - example: in.(bacc1234,bacc4567) - id: - in: query - name: id + Bulk attach files to advance requests + operationId: advance_requests_bulk_attach_files + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/attach_files_to_advance_request_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/approve/bulk: + post: + tags: + - Advances + summary: Bulk approve advance requests + description: > + This API allows admins to approve multiple advance requests in a single + operation. + operationId: advance_requests_bulk_approve + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/advance_request_bulk_approve_in' + responses: + '200': + description: OK - All advance requests have been processed successfully + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/403' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/expense_policy_comments: + post: + tags: + - Expense Policy Comments + summary: Add expense policy comment + description: > + This API adds or updates expense policy comments. + + + **Note:** + + - If the specified `comment_type` already exists for the expense, the + API will update the existing comment's `comment_text` with the new value + provided, rather than creating a new comment entry. + + - If the `comment_type` is specified and the `comment_text` is null or + an empty string, the comment will be deleted for that expense. + operationId: add_expense_policy_comment + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + expense_id: + type: string + description: The expense ID + expense_policy_comments: + type: array + items: + type: object + properties: + comment_type: + type: string + description: The comment type + comment_text: + type: string + description: The comment text + nullable: true + required: + - expense_id + - expense_policy_comments + additionalProperties: false + required: + - data + additionalProperties: false + example: + data: + expense_id: txGCcvnhUbrP + expense_policy_comments: + - comment_type: MISSING_FIELDS + comment_text: Reason for missing fields + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + properties: + expense_id: + type: string + description: The expense ID + expense_policy_comments: + type: array + items: + type: object + properties: + comment_type: + type: string + description: The comment type + comment_text: + type: string + description: The comment text + required: + - expense_id + - expense_policy_comments + additionalProperties: false + example: + data: + expense_id: txGCcvnhUbrP + expense_policy_comments: + - comment_type: MISSING_FIELDS + comment_text: Reason for missing fields + '400': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorised request + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/404' + /admin/advance_requests/add_approver: + post: + summary: Add approver to advance request + operationId: advance_requests_add_approver_post description: | - A resource ID - schema: - type: string - example: - - eq.ouwruogwnngg - expense_id: - in: query - name: expense_id + This API allows admins to add an approver to an advance request. + tags: + - Advances + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_add_approver_in' + example: + data: + id: areq5F9xIaMURI + approver_email: approver@example.com + comment: Need your review on this advance + responses: + '200': + description: Approver added successfully + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. + /admin/advance_requests/reject: + post: + tags: + - Advances + summary: Reject advance request description: | - Expense id for filtering based on expenses. Supported operator is `eq`. - schema: - type: string - example: expense_id=eq.txS9GZm5hsjh - display_name: - in: query - name: display_name + This API allows admins to reject an advance request. + operationId: advance_requests_reject + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_request_reject_in' + example: + data: + id: areq5F9xIaMURI + comment: Budget exceeded + responses: + '200': + description: Advance request has been rejected successfully + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. + /admin/advance_requests/inquire: + post: + tags: + - Advances + summary: Inquire about advance request + description: > + This API allows admins to inquire about an advance request, sending it + back to the spender for clarification or modifications. + operationId: advance_requests_inquire + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_inquire_in' + required: + - data + responses: + '200': + description: Advance request has been sent back successfully + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_out' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. + /admin/advance_requests/submit: + post: + tags: + - Advances + summary: Submit an advance request description: | - Supported operators are `eq`, `like`, `in`.
- display_name=in.(value1,value2) - schema: - type: string - example: like.Fast* + Submit an advance request. + operationId: advance_requests_submit + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + $ref: '#/components/schemas/advance_request_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/advance_request_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' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. + /admin/advance_requests/custom_fields: + get: + tags: + - Advances + summary: Get advance request custom fields + description: > + This API allows admins to retrieve all active custom fields for advance + requests in their organization. + operationId: advance_requests_custom_fields_get + responses: + '200': + description: Successfully retrieved custom fields + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_custom_fields_out' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + post: + tags: + - Advances + summary: Create or update advance request custom fields + description: > + This API allows admins to create and update custom fields for advance + requests. + operationId: advance_requests_custom_fields_post + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_custom_field_in' + required: + - data + responses: + '200': + description: Custom field created or updated successfully + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/advance_request_custom_field_out' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means current user does not have enough + permissions to perform this operation. + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: > + This error means the requested resource was not found or + the requester doesn't have sufficient access. diff --git a/src/admin/openapi.yaml b/src/admin/openapi.yaml index b5594db77..2695721c6 100644 --- a/src/admin/openapi.yaml +++ b/src/admin/openapi.yaml @@ -511,6 +511,26 @@ paths: $ref: paths/admin@reconciliation_entries.yaml /admin/reconciliation_entries/transactions: $ref: paths/admin@reconciliation_entries@transactions.yaml + /admin/reconciliation_entries/transactions/reconcile/bulk: + $ref: paths/admin@reconciliation_entries@transactions@reconcile@bulk.yaml + /admin/reconciliation_entries/transactions/match_and_reconcile/bulk: + $ref: paths/admin@reconciliation_entries@transactions@match_and_reconcile@bulk.yaml + /admin/reconciliation_entries/transactions/find_match: + $ref: paths/admin@reconciliation_entries@transactions@find_match.yaml + /admin/reconciliation_entries/transactions/ignore/bulk: + $ref: paths/admin@reconciliation_entries@transactions@ignore@bulk.yaml + /admin/reconciliation_entries/eligible_cards: + $ref: paths/admin@reconciliation_entries@eligible_cards.yaml + /admin/reconciliation_entries/eligible_cards/stats: + $ref: paths/admin@reconciliation_entries@eligible_cards@stats.yaml + /admin/reconciliation_entries/transactions/delete/bulk: + $ref: paths/admin@reconciliation_entries@transactions@delete@bulk.yaml + /admin/reconciliation_entries/transactions/unmatch/bulk: + $ref: paths/admin@reconciliation_entries@transactions@unmatch@bulk.yaml + /admin/reconciliation_entries/transactions/resolve_multi_matches: + $ref: paths/admin@reconciliation_entries@transactions@resolve_multi_matches.yaml + /admin/reconciliation_entries/close: + $ref: paths/admin@reconciliation_entries@close.yaml /admin/expenses/delete/bulk: $ref: paths/admin@expenses@delete@bulk.yaml /admin/employee_settings: diff --git a/src/admin/paths/admin@reconciliation_entries@close.yaml b/src/admin/paths/admin@reconciliation_entries@close.yaml new file mode 100644 index 000000000..5e8b56b7d --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@close.yaml @@ -0,0 +1,65 @@ +post: + tags: + - Reconciliation + summary: Close reconciliation entry + description: | + Mark a reconciliation entry as reconciled/closed. + operationId: reconciliation_entries_close + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Reconciliation entry id to close. + example: receabc12345 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of close operation. Empty object on success. + example: {} + '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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@eligible_cards.yaml b/src/admin/paths/admin@reconciliation_entries@eligible_cards.yaml new file mode 100644 index 000000000..70edaeb24 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@eligible_cards.yaml @@ -0,0 +1,69 @@ +get: + tags: + - Reconciliation + summary: List eligible cards for a reconciliation entry + description: | + Returns the list of corporate cards that are eligible for a given reconciliation entry. + To understand filtering, ordering and pagination, see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + operationId: reconciliation_entries_eligible_cards_list + parameters: + - in: query + name: reconciliation_entry_id + required: true + schema: + type: string + example: receabc12345 + description: | + Reconciliation entry id for which eligible cards should be listed. + - in: query + name: status + required: false + schema: + type: string + example: RECONCILED + description: | + Optional status filter for eligible cards. + - $ref: '../../components/parameters/q.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/reconciliation_eligible_cards.yaml#/reconciliation_eligible_card_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' diff --git a/src/admin/paths/admin@reconciliation_entries@eligible_cards@stats.yaml b/src/admin/paths/admin@reconciliation_entries@eligible_cards@stats.yaml new file mode 100644 index 000000000..d36857e54 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@eligible_cards@stats.yaml @@ -0,0 +1,57 @@ +post: + tags: + - Reconciliation + summary: Stats for eligible cards of a reconciliation entry + description: | + Returns aggregate stats for corporate cards eligible under a reconciliation entry. + + Use this endpoint to get period window, transaction and expense totals, differences, and card-level aggregate counts such as matching issues and reconciliation status. + operationId: reconciliation_entries_eligible_cards_stats + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: False + required: + - data + properties: + data: + $ref: '../../components/schemas/reconciliation_eligible_cards.yaml#/reconciliation_eligible_cards_stats_in' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: False + properties: + data: + $ref: '../../components/schemas/reconciliation_eligible_cards.yaml#/reconciliation_eligible_cards_stats_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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@delete@bulk.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@delete@bulk.yaml new file mode 100644 index 000000000..698c0e4be --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@delete@bulk.yaml @@ -0,0 +1,83 @@ +post: + tags: + - Reconciliation + summary: Bulk delete reconciliation transactions + description: | + Delete multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_delete_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to delete. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to delete. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk delete. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '../../components/schemas/bulk_error.yaml' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@find_match.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@find_match.yaml new file mode 100644 index 000000000..2585e3f40 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@find_match.yaml @@ -0,0 +1,70 @@ +post: + tags: + - Reconciliation + summary: Find matches for a reconciliation transaction + description: | + Find potential matching expenses for a reconciliation transaction. + operationId: reconciliation_transactions_find_match + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction for which to find matches. + example: rectx8abc123 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: array + description: List of potential matches for the provided reconciliation transaction. + items: + $ref: '../../components/schemas/reconciliation_transactions.yaml#/reconciliation_transaction_out' + count: + $ref: '../../components/schemas/count.yaml' + offset: + $ref: '../../components/schemas/offset.yaml' + '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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@ignore@bulk.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@ignore@bulk.yaml new file mode 100644 index 000000000..f98bfd79e --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@ignore@bulk.yaml @@ -0,0 +1,83 @@ +post: + tags: + - Reconciliation + summary: Bulk ignore reconciliation transactions + description: | + Ignore multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_ignore_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to ignore. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to ignore. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk ignore. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '../../components/schemas/bulk_error.yaml' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@match_and_reconcile@bulk.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@match_and_reconcile@bulk.yaml new file mode 100644 index 000000000..70600a3d6 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@match_and_reconcile@bulk.yaml @@ -0,0 +1,90 @@ +post: + tags: + - Reconciliation + summary: Bulk match and reconcile reconciliation transactions + description: | + Match reconciliation transactions with target transactions/expenses and reconcile in bulk. + operationId: reconciliation_transactions_match_and_reconcile_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of source and target reconciliation transaction identifiers to match and reconcile. + items: + type: object + additionalProperties: false + required: + - source_id + - target_id + properties: + source_id: + type: string + description: Source reconciliation transaction id. + example: rectx8abc123 + target_id: + type: string + description: Target reconciliation transaction or expense id to match with. + example: rectx8xyz789 + example: + - source_id: rectx8abc123 + target_id: rectx8xyz789 + - source_id: rectx8def456 + target_id: rectx8uvw000 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk match and reconcile. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '../../components/schemas/bulk_error.yaml' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@reconcile@bulk.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@reconcile@bulk.yaml new file mode 100644 index 000000000..92b38f5be --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@reconcile@bulk.yaml @@ -0,0 +1,83 @@ +post: + tags: + - Reconciliation + summary: Bulk reconcile reconciliation transactions + description: | + Reconcile multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_reconcile_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to reconcile. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to reconcile. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk reconcile. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '../../components/schemas/bulk_error.yaml' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@resolve_multi_matches.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@resolve_multi_matches.yaml new file mode 100644 index 000000000..d54070960 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@resolve_multi_matches.yaml @@ -0,0 +1,70 @@ +post: + tags: + - Reconciliation + summary: Resolve multiple matches for a reconciliation transaction + description: | + Resolve multiple potential matches by selecting a specific expense for a reconciliation transaction. + operationId: reconciliation_transactions_resolve_multi_matches + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: object + additionalProperties: false + required: + - id + - expense_id + properties: + id: + type: string + description: Reconciliation transaction id for which to resolve multiple matches. + example: rectx8abc123 + expense_id: + type: string + description: Selected expense id to resolve against. + example: txuXDH16HzK + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of resolve operation. Empty object on success. + example: {} + '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' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/admin/paths/admin@reconciliation_entries@transactions@unmatch@bulk.yaml b/src/admin/paths/admin@reconciliation_entries@transactions@unmatch@bulk.yaml new file mode 100644 index 000000000..fbd004c12 --- /dev/null +++ b/src/admin/paths/admin@reconciliation_entries@transactions@unmatch@bulk.yaml @@ -0,0 +1,83 @@ +post: + tags: + - Reconciliation + summary: Bulk unmatch reconciliation transactions + description: | + Unmatch multiple reconciliation transactions in bulk. + operationId: reconciliation_transactions_unmatch_bulk + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - data + properties: + data: + type: array + description: List of reconciliation transaction identifiers to unmatch. + items: + type: object + additionalProperties: false + required: + - id + properties: + id: + type: string + description: Unique id of the reconciliation transaction to unmatch. + example: rectx8abc123 + example: + - id: rectx8abc123 + - id: rectx8xyz789 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + data: + type: object + description: Result of bulk unmatch. Empty object on success. + example: {} + '400': + description: Bad request + content: + application/json: + schema: + oneOf: + - $ref: '../../components/schemas/bulk_error.yaml' + - type: object + properties: + error: + type: string + nullable: true + message: + type: string + nullable: true + data: + type: object + nullable: true + '401': + description: Unauthorized request + content: + application/json: + schema: + $ref: '../../components/schemas/401.yaml' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '../../components/schemas/403.yaml' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '../../components/schemas/404.yaml' + diff --git a/src/components/schemas/reconciliation_eligible_cards.yaml b/src/components/schemas/reconciliation_eligible_cards.yaml new file mode 100644 index 000000000..b4adece00 --- /dev/null +++ b/src/components/schemas/reconciliation_eligible_cards.yaml @@ -0,0 +1,141 @@ +reconciliation_eligible_card_out: + type: object + additionalProperties: false + required: + - id + - org_id + - reconciliation_entry_id + - card_number + - card_nickname + - user + - reconciled_on + - statement_transaction_count + - expense_count + - statement_total + - expense_total + - matching_issue_count + - status + properties: + org_id: + $ref: './fields.yaml#/org_id' + reconciliation_entry_id: + allOf: + - $ref: './fields.yaml#/id_string' + example: receabc12345 + description: Reconciliation entry id for which the card is eligible. + id: + allOf: + - $ref: './fields.yaml#/id_string' + example: ecc123abc + description: Unique id of the eligible card record. + card_number: + $ref: './fields.yaml#/card_number' + card_nickname: + type: string + nullable: true + maxLength: 25 + description: Unique nickname assigned to the card. + example: Business Card + user: + $ref: './user.yaml#/user_out_embed_nullable' + reconciled_on: + allOf: + - $ref: './fields.yaml#/timestamptz_utc' + nullable: true + description: Date when reconciliation was completed for this card in the entry. + statement_transaction_count: + type: integer + example: 3 + description: Number of statement transactions for the card within the entry period. + expense_count: + type: integer + example: 2 + description: Number of matched expenses for the card within the entry period. + statement_total: + allOf: + - $ref: './fields.yaml#/amount' + nullable: true + description: Sum of statement transaction amounts for the card (nullable). + example: 45 + expense_total: + allOf: + - $ref: './fields.yaml#/amount' + nullable: true + description: Sum of matched expense amounts for the card (nullable). + example: 24 + matching_issue_count: + type: integer + example: 3 + description: Number of matching issues identified for this card within the entry period. + status: + type: string + description: Current reconciliation eligibility status for this card. + example: RECONCILED + +reconciliation_eligible_cards_stats_in: + properties: + query_params: + nullable: False + type: string + description: | + Query param string similar to the GET eligible cards call. Must include `reconciliation_entry_id` to scope stats to a specific entry. + Refer the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) for filtering syntax. + example: reconciliation_entry_id=eq.receabc12345 + +reconciliation_eligible_cards_stats_out: + type: object + additionalProperties: False + properties: + period_start: + allOf: + - $ref: './fields.yaml#/timestamptz_utc' + nullable: true + description: Start of the reconciliation period in UTC. + period_end: + allOf: + - $ref: './fields.yaml#/timestamptz_utc' + nullable: true + description: End of the reconciliation period in UTC. + statement_transaction_count: + type: integer + description: Total number of statement transactions in the period. + example: 3 + expense_count: + type: integer + description: Total number of expenses in the period. + example: 2 + statement_total: + allOf: + - $ref: './fields.yaml#/amount' + description: Sum of statement transaction amounts in the period. + example: 45 + expense_total: + allOf: + - $ref: './fields.yaml#/amount' + description: Sum of expense amounts in the period. + example: 30 + difference: + allOf: + - $ref: './fields.yaml#/amount' + description: Difference between `statement_total` and `expense_total`. + example: 15 + matching_issue_count: + type: integer + description: Number of transactions with matching issues across all eligible cards. + example: 3 + total_cards: + type: integer + description: Total number of eligible cards. + example: 3 + card_without_statement_count: + type: integer + description: Number of cards that have no statement transactions in the period. + example: 2 + card_with_matching_issue_count: + type: integer + description: Number of cards that have only matching issues. + example: 0 + reconciled_card_count: + type: integer + description: Number of cards that are reconciled. + example: 0 diff --git a/src/components/schemas/reconciliation_transactions.yaml b/src/components/schemas/reconciliation_transactions.yaml index 87d843c7e..866a16504 100644 --- a/src/components/schemas/reconciliation_transactions.yaml +++ b/src/components/schemas/reconciliation_transactions.yaml @@ -134,6 +134,7 @@ reconciliation_expense_split_out_embed: type: array items: $ref: './fields.yaml#/id_string' + nullable: true description: List of file IDs attached to the expense split example: ['figwiwpjww', 'figwiwpjwx'] category: @@ -213,6 +214,7 @@ reconciliation_matched_expense_out_embed: type: array items: $ref: './fields.yaml#/id_string' + nullable: true description: List of file IDs attached to the expense example: ['figwiwpjww', 'figwiwpjwx'] category: @@ -234,6 +236,7 @@ reconciliation_matched_expense_out_embed: description: Purpose or description of the expense. splits: type: array + nullable: true description: List of split expenses. Empty when the expense is not split. items: $ref: '#/reconciliation_expense_split_out_embed'