feat: Add ignore_archived_cards field in create card transactions, summary, reconciliation summary and reconcile apis - #851
Conversation
…mmary, reconciliation summary and reconcile apis
There was a problem hiding this comment.
Pull request overview
Adds an ignore_archived_cards request field to statement-processing input schemas so API consumers can control whether archived corporate cards are skipped or unarchived during statement processing (create transactions / summary / reconciliation).
Changes:
- Added
ignore_archived_cardstocard_transaction_from_statement_in,summary_from_statement_in,reconciliation_summary_from_statement_in, andreconcile_from_statement_in. - Reworked
statement_archived_cards_infrom anallOfcomposition to an explicit object schema (likely to avoid inheriting new fields).
Comments suppressed due to low confidence (3)
src/components/schemas/statements.yaml:496
- The new
ignore_archived_cardsfield description mentions "creating card transactions", but this schema is used for the statement summary API. The description should reflect statement summary/reconciliation processing rather than transaction creation.
description: |
If true, then the archived cards will be ignored while creating card transactions from the statement.
If false, then the archived cards will be unarchived and transactions will be created for them.
src/components/schemas/statements.yaml:770
- The
ignore_archived_cardsfield description refers to "creating card transactions", but this schema is used by the reconciliation summary API. Update the description to be accurate for reconciliation processing.
description: |
If true, then the archived cards will be ignored while creating card transactions from the statement.
If false, then the archived cards will be unarchived and transactions will be created for them.
src/components/schemas/statements.yaml:907
- The
ignore_archived_cardsfield description refers to "creating card transactions", but this schema is used by the reconcile API (background reconciliation). Update the description to be accurate for reconciliation processing.
description: |
If true, then the archived cards will be ignored while creating card transactions from the statement.
If false, then the archived cards will be unarchived and transactions will be created for them.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description: | | ||
| If true, then the archived cards will be ignored while creating card transactions from the statement. | ||
| If false, then the archived cards will be unarchived and transactions will be created for them. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/components/schemas/statements.yaml:1476
statement_archived_cards_inno longer defines a top-levelrequiredlist, so fields likeid,statement_mapping, andcard_mappingbecome optional in the schema. Previously these were required (via the earlierallOfcomposition), so this is a breaking/incorrect contract change.
card_mapping:
$ref: '#/card_mapping_in'
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
src/components/schemas/statements.yaml:770
reconciliation_summary_from_statement_in.ignore_archived_cardsis missing anexample, unlike the same field in other statement-processing inputs. Adding one keeps the schema docs consistent and easier to understand.
ignore_archived_cards:
type: boolean
nullable: true
description: |
Controls how transactions associated with archived cards are handled during statement processing:
src/components/schemas/statements.yaml:907
reconcile_from_statement_in.ignore_archived_cardsis missing anexample, but the same field elsewhere includes one. Adding an explicit example helps make the generated docs consistent.
ignore_archived_cards:
type: boolean
nullable: true
description: |
Controls how transactions associated with archived cards are handled during statement processing:
src/components/schemas/statements.yaml:1371
statement_archived_cards_inwas expanded from anallOfcomposition into a fully inlined schema that largely duplicatessummary_from_statement_in(sameid,statement_mapping,ignored_line_item_ids, etc.). This increases the chance of the two inputs drifting over time. Consider reverting to anallOfwith$ref: '#/summary_from_statement_in'and only layering additional properties (start_date,end_date) if needed.
statement_archived_cards_in:
type: object
properties:
id:
allOf:
| ignore_archived_cards: | ||
| type: boolean | ||
| nullable: true | ||
| description: | | ||
| Controls how transactions associated with archived cards are handled during statement processing: | ||
| If true, transactions associated with archived cards are ignored. | ||
| If false, the archived cards are unarchived, and their associated transactions are processed. |
| statement_archived_cards_in: | ||
| allOf: | ||
| - $ref: '#/components/schemas/summary_from_statement_in' | ||
| - type: object | ||
| type: object | ||
| properties: | ||
| id: | ||
| allOf: | ||
| - $ref: '#/components/schemas/id_string' | ||
| example: stmtadfdsdf | ||
| statement_mapping: | ||
| type: object |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/components/schemas/statements.yaml:1479
statement_archived_cards_inpreviously requiredcard_mapping(it was required understatement_mappingvia the earlierallOfschema). After movingcard_mappingto a top-level property, it is no longer listed as required, which changes the request contract and likely makes the request underspecified for mapping statement card numbers to corporate cards. Ifcard_mappingis still required for this endpoint, add it back to therequiredlist.
card_mapping:
$ref: '#/card_mapping_in'
required:
- id
- statement_mapping
Description
Please add PR description here, add screenshots if needed




Clickup
Please add link here