Skip to content

Commit

Permalink
feat: Docs for GET admin/corporate_card_transactions/exports
Browse files Browse the repository at this point in the history
  • Loading branch information
RoshanMhatre committed Oct 10, 2024
1 parent 864938c commit 1c345ab
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ paths:
$ref: paths/admin@corporate_card_transactions@match.yaml
/admin/corporate_card_transactions/unmatch:
$ref: paths/admin@corporate_card_transactions@unmatch.yaml
/admin/corporate_card_transactions/exports:
$ref: paths/admin@corporate_card_transactions@exports.yaml


/admin/virtual_cards:
$ref: paths/admin@virtual_cards.yaml
Expand Down
34 changes: 34 additions & 0 deletions src/admin/paths/admin@corporate_card_transactions@exports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
get:
tags:
- Corporate Card Transactions
summary: Get export requests for corporate card transactions
description: |
Get corporate card transactions 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: corporate_card_transactions_exports_get
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
count:
$ref: '../../components/schemas/count.yaml'
offset:
$ref: '../../components/schemas/offset.yaml'
data:
type: array
items:
$ref: '../../components/schemas/corporate_card_transactions_exports.yaml#/corporate_card_transactions_exports_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'
131 changes: 131 additions & 0 deletions src/components/schemas/corporate_card_transactions_exports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
corporate_card_transactions_export_config_column_formula:
type: object
properties:
function:
type: string
example: parse-format-time
parameters:
type: array
items:
anyOf:
- type: object
- type: string
- type: number
- type: integer
- type: boolean
example:
- function: field
parameters: ['spent_at']
- 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://help.fylehq.com/en/articles/4422306-advanced-export-formulas for more details.
corporate_card_transactions_export_config:
type: object
additionalProperties: true
properties:
type:
type: string
enum:
- xlsx
- csv
description: |
Type of the export file.
example: csv
is_header_visible:
type: boolean
description: |
Whether to show the header in the export file.
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.
example: false
debit_entries_only:
type: array
items:
type: string
description: |
Configure which columns to show for debit entries.
example: ['debit_amount']
credit_entries_only:
type: array
items:
type: string
description: |
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.
columns:
type: array
items:
type: object
properties:
name:
type: string
description: |
Name of the column.
example: Spent Date
formula:
allOf:
- $ref: '#/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.
corporate_card_transactions_exports_out:
type: object
additionalProperties: false
properties:
created_at:
$ref: './fields.yaml#/created_at'
updated_at:
$ref: './fields.yaml#/updated_at'
id:
allOf:
- $ref: './fields.yaml#/id_string'
example: cctefilumWHrlPf7K
org_id:
$ref: './fields.yaml#/org_id'
user_id:
$ref: './fields.yaml#/user_id'
query_params:
allOf:
- $ref: './fields.yaml#/query_params'
nullable: false
notify_emails:
type: array
nullable: false
items:
$ref: './fields.yaml#/email'
config:
allOf:
- $ref: '#/corporate_card_transactions_export_config'
nullable: false
file_id:
anyOf:
- $ref: './fields.yaml#/null_field'
- $ref: './fields.yaml#/id_string'
nullable: true
example: filumWHrlPf7K
state:
type: string
nullable: false
enum:
- PENDING
- PROCESSING
- SUCCESS
- ERROR
description: |
Status of the export.
example: PENDING

0 comments on commit 1c345ab

Please sign in to comment.