Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
"/applications/{applicationId}/documents/{documentId}/download/back": {
"$ref": "./schemas/application_paths.json#/download_back_side_document"
},
"/beneficial-owner/{beneficialOwnerId}": {
"$ref": "./schemas/beneficial_owner_paths.json#/patch_beneficial_owners"
},
"/application-forms/{applicationFormId}": {
"$ref": "./schemas/application_paths.json#/application_form"
},
Expand Down
64 changes: 64 additions & 0 deletions schemas/beneficial_owner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"title": "Beneficial Owner Resource",
"type": "object",
"properties": {
"id": {
"$ref": "types.json#/definitions/identifier"
},
"type": {
"type": "string",
"default": "beneficialOwner"
},
"attributes": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": ["Approved", "Denied", "PendingReview"]
},
"fullName": {
"$ref": "types.json#/definitions/fullName"
},
"email": {
"$ref": "types.json#/definitions/email"
},
"phone": {
"$ref": "types.json#/definitions/phone"
},
"ssn": {
"type": "string",
"pattern": "^\\d{9}$"
},
"passport": {
"type": "string"
},
"nationality": {
"$ref": "types.json#/definitions/country"
},
"address": {
"type": "object"
},
"dateOfBirth": {
"type": "string",
"format": "date"
},
"occupation": {
"$ref": "types.json#/definitions/occupation"
},
"annualIncome": {
"$ref": "types.json#/definitions/annualIncome"
},
"sourceOfIncome": {
"$ref": "types.json#/definitions/sourceOfIncome"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"id",
"type",
"attributes"
]
}
98 changes: 98 additions & 0 deletions schemas/beneficial_owner_paths.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"updateBeneficialOwnerRequest": {
"title": "Update Beneficial Owner",
"type": "object",
"properties": {
"type": {
"type": "string",
"default": "beneficialOwner"
},
"attributes": {
"type": "object",
"properties": {
"occupation": {
"$ref": "types.json#/definitions/occupation"
},
"annualIncome": {
"$ref": "types.json#/definitions/annualIncome"
},
"sourceOfIncome": {
"$ref": "types.json#/definitions/sourceOfIncome"
}
},
"relationships": {
"type": "object",
"properties": {
"application": {
"$ref": "types.json#/definitions/Relationship"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"type",
"attributes"
]
},
"UnitBeneficialOwnerResponse": {
"type": "object",
"title": "UnitBeneficialOwnerResponse",
"properties": {
"data": {
"$ref": "beneficial_owner.json"
}
}
},
"patch_beneficial_owners": {
"patch": {
"tags": [
"Update Beneficial Owner"
],
"operationId": "execute",
"summary": "Update Beneficial Owner",
"description": "Update an Beneficial Owner via API ",
"parameters": [
{
"schema": {
"type": "string"
},
"name": "beneficialOwnerId",
"in": "path",
"required": true,
"description": "ID of the Beneficial Owner to update"
}
],
"requestBody": {
"description": "Update Beneficial Owner Request",
"required": true,
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/updateBeneficialOwnerRequest"
}
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/vnd.api+json; charset=utf-8": {
"schema": {
"$ref": "#/UnitBeneficialOwnerResponse"
}
}
}
}
}
}
}
}
}
36 changes: 0 additions & 36 deletions schemas/update_application.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,41 +155,6 @@
"attributes"
]
},
"patchBusinessApplicationBeneficialOwner": {
"title": "Patch Business Application",
"type": "object",
"properties": {
"type": { "type": "string", "default": "beneficialOwner" },
"attributes": {
"type": "object",
"properties": {
"occupation": {
"$ref": "types.json#/definitions/occupation"
},
"annualIncome": {
"$ref": "types.json#/definitions/annualIncome"
},
"sourceOfIncome": {
"$ref": "types.json#/definitions/sourceOfIncome"
}
},
"relationships": {
"type": "object",
"properties": {
"application": {
"$ref": "types.json#/definitions/Relationship"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"type",
"attributes"
]
},
"patchTrustApplication": {
"title": "Patch Trust Application",
"type": "object",
Expand Down Expand Up @@ -250,7 +215,6 @@
"oneOf": [
{ "$ref": "#/definitions/patchBusinessApplication" },
{ "$ref": "#/definitions/patchBusinessApplicationOfficer" },
{ "$ref": "#/definitions/patchBusinessApplicationBeneficialOwner" },
{ "$ref": "#/definitions/patchSoleProprietorApplication" },
{ "$ref": "#/definitions/patchIndividualApplication" },
{ "$ref": "#/definitions/patchTrustApplication" }
Expand Down