Skip to content

Commit

Permalink
Add the OAS file and generated markdown for the Account Origination e…
Browse files Browse the repository at this point in the history
…xperiment

Complete the main standard for the Account Origination experiment
  • Loading branch information
James-P2P committed Oct 18, 2023
1 parent 7bff2fb commit 66d60b4
Show file tree
Hide file tree
Showing 3 changed files with 614 additions and 6 deletions.
54 changes: 48 additions & 6 deletions docs/Standards/Simple-Bank-Account-Origination.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**EXPERIMENTAL**

*Current Version:* **0.0.1**
*Current Version:* **0.0.3**

Additional endpoints, and extensions to existing endpoints, to facilitate the receipt of an account opening instruction to begin the process of a customer opening a new bank account.

Expand All @@ -18,8 +18,6 @@ The standard defines the following:

## Introduction

<Introduction>

### Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [[RFC2119](#normative-rfc2119)] [[RFC8174](#normative-rfc8174)].
Expand Down Expand Up @@ -81,9 +79,53 @@ Where:

More details on the operation of the `Apply For Product Scheme` appear later in this standard.

### OAS specifications

TBD
### Detailed specifications

#### CDR Extension Specifications

The following JSON Schema snippet defines the extension fields to be added to the standard payload of the `Get Product Detail` endpoint defined in [**[CDS]**](#normative-cds).

This JSON Schema is to be understood as representing an addition to root object of the `Get Product Detail` response payload and therefore includes intermediate fields that are already defined in [**[CDS]**](#normative-cds).

```
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [
"data",
],
"properties": {
"data": {
"type": "object",
"properties": {
"DSB-origination-schemes": {
"type": "array",
"description": "Array of IDs to origination schemes that
can be obtained from the `Get Origination
Scheme` endpoint",
"items": {
"type": "string"
}
}
}
}
}
}
```

#### OpenAPI Specification

The OpenAPI specification for this standard can be found at the links below:

* [OpenAPI Specification in JSON format](../Support_Files/Simple-Bank-Account-Origination.json)
* [OpenAPI Specification in HTML format](../Support_Files/Simple-Bank-Account-Origination-OAS.html)

These specifications contain the details of the `Get Origination Scheme` endpoint and the `Apply For Product` endpoint.

## TODO

* Complete the OAS specification for the `Get Origination Scheme` endpoint
* Complete the OAS specification for the `Apply For Product` endpoint


## Normative References
Expand Down
234 changes: 234 additions & 0 deletions docs/Support_Files/Simple-Bank-Account-Origination-OAS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
<h1 id="cdr-experimantal-simple-bank-account-origination-api">CDR Experimantal Simple Bank Account Origination API v0.0.2</h1>

Specification of endpoints defined in the Simple Bank Account Origination experimental standard. This is an experimental standard created by the Data Standards Body (DSB) as part of the Consumer Data Standards

Base URLs:

* <a href="https://data.holder.com.au/cds-au/v1">https://data.holder.com.au/cds-au/v1</a>

Email: <a href="mailto:[email protected]">Consumer Data Standards</a> Web: <a href="https://consumerdatastandards.gov.au">Consumer Data Standards</a>
License: <a href="https://opensource.org/licenses/MIT">MIT License</a>

<h1 id="cdr-experimantal-simple-bank-account-origination-api-banking">Banking</h1>

## getOriginationScheme

<a id="opIdgetOriginationScheme"></a>

`GET /DSB/banking/origination/schemes/{schemeId}`

Obtain the meta data describing how to make an application for a family of products.

<h3 id="getoriginationscheme-parameters">Parameters</h3>

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|schemeId|path|string|true|Obtain the details of a specific origination scheme.|
|x-v|header|string|true|Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)|
|x-min-v|header|string|false|Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.|

> Example responses
> 200 Response
```json
null
```

<h3 id="getoriginationscheme-responses">Responses</h3>

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful response|Inline|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[400 - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Field](#error-400-field-missing)</li><li>[400 - Invalid Page Size](#error-400-field-invalid-page-size)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|
|406|[Not Acceptable](https://tools.ietf.org/html/rfc7231#section-6.5.6)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[406 - Unsupported Version](#error-406-header-unsupported-version)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|
|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[422 - Invalid Page](#error-422-field-invalid-page)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|

<h3 id="getoriginationscheme-responseschema">Response Schema</h3>

### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|x-v|string||none|

<aside class="success">
This operation does not require authentication
</aside>

## applyForAccount

<a id="opIdapplyForAccount"></a>

`POST /DSB/banking/accounts`

Submit an application, on behalf of a consumer, to apply for an account to be originated.

> Body parameter
```json
null
```

<h3 id="applyforaccount-parameters">Parameters</h3>

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|x-v|header|string|true|Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)|
|x-min-v|header|string|false|Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.|
|body|body|any|true|Application data provided in accordance to a defined origination scheme|

> Example responses
> 200 Response
```json
null
```

<h3 id="applyforaccount-responses">Responses</h3>

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful response|Inline|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[400 - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Field](#error-400-field-missing)</li><li>[400 - Invalid Page Size](#error-400-field-invalid-page-size)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|
|406|[Not Acceptable](https://tools.ietf.org/html/rfc7231#section-6.5.6)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[406 - Unsupported Version](#error-406-header-unsupported-version)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|
|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The following error codes MUST be supported:<br/><ul class="error-code-list"><li>[422 - Invalid Page](#error-422-field-invalid-page)</li></ul>|[ResponseErrorListV2](#schemaresponseerrorlistv2)|

<h3 id="applyforaccount-responseschema">Response Schema</h3>

### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|x-v|string||none|

<aside class="success">
This operation does not require authentication
</aside>

# Schemas

<h2 id="tocSmetaerror">MetaError</h2>

<a id="schemametaerror"></a>

```json
{
"urn": "string"
}

```

*Additional data for customised error codes*

### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|urn|string|false|none|The CDR error code URN which the application-specific error code extends. Mandatory if the error `code` is an application-specific error rather than a standardised error code.|

<h2 id="tocSresponseerrorlistv2">ResponseErrorListV2</h2>

<a id="schemaresponseerrorlistv2"></a>

```json
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"meta": {
"urn": "string"
}
}
]
}

```

### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|errors|[object]|true|none|none|
|» code|string|true|none|The code of the error encountered. Where the error is specific to the respondent, an application-specific error code, expressed as a string value. If the error is application-specific, the URN code that the specific error extends must be provided in the meta object. Otherwise, the value is the error code URN.|
|» title|string|true|none|A short, human-readable summary of the problem that MUST NOT change from occurrence to occurrence of the problem represented by the error code.|
|» detail|string|true|none|A human-readable explanation specific to this occurrence of the problem.|
|» meta|[MetaError](#schemametaerror)|false|none|Additional data for customised error codes|

<h2 id="tocSlinks">Links</h2>

<a id="schemalinks"></a>

```json
{
"self": "string"
}

```

### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|self|string|true|none|Fully qualified link that generated the current response document|

<h2 id="tocSmeta">Meta</h2>

<a id="schemameta"></a>

```json
{}

```

### Properties

*None*

<h2 id="tocSlinkspaginated">LinksPaginated</h2>

<a id="schemalinkspaginated"></a>

```json
{
"self": "string",
"first": "string",
"prev": "string",
"next": "string",
"last": "string"
}

```

### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|self|string|true|none|Fully qualified link that generated the current response document|
|first|string|false|none|URI to the first page of this set. Mandatory if this response is not the first page|
|prev|string|false|none|URI to the previous page of this set. Mandatory if this response is not the first page|
|next|string|false|none|URI to the next page of this set. Mandatory if this response is not the last page|
|last|string|false|none|URI to the last page of this set. Mandatory if this response is not the last page|

<h2 id="tocSmetapaginated">MetaPaginated</h2>

<a id="schemametapaginated"></a>

```json
{
"totalRecords": 0,
"totalPages": 0
}

```

### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|totalRecords|integer|true|none|The total number of records in the full set. See [pagination](#pagination).|
|totalPages|integer|true|none|The total number of pages in the full set. See [pagination](#pagination).|

Loading

0 comments on commit 66d60b4

Please sign in to comment.