Get example corpus file
get_corpus_fileRetrieve validated example payment XML for a given market scenario, message version, and optional bank variant. Use it as reference or test fixture.
Instructions
Return the XML of one validated example file from the market corpus.
Use this to show a model, a tester or a mapping exercise what a
correct file for a given country and rail looks like in a given
edition. The text is exactly what pain001 ships; it passed the XSD,
the ISO MDR rules, the rail profile and the overlay when it was built.
Delegates to :func:`pain001.corpus.get_file`.
Args:
scenario_id: The scenario.
version: The message type.
variant: The overlay id of a bank variant, else ``None``.
Returns:
``{"scenario_id", "version", "variant", "xml"}``, or
``{"error": ...}`` when there is no such file or no corpus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variant | No | An overlay id for the bank variant, e.g. 'gb.example.priority'; omit for the generic file. | |
| version | Yes | The message type, e.g. 'pain.001.001.09'. | |
| scenario_id | Yes | The market scenario, e.g. 'gb.chaps.property-purchase' (from list_corpus_files). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | ||
| error | No | ||
| variant | No | ||
| version | No | ||
| scenario_id | No |