"openapi": "3.0.0",
"info": {
  "description": "Originations Data Storage MicroService APIs",
  "version": "v0.8.0",
  "title": "Originations Data Storage MicroService APIs",
  "contact": {
    "email": "nhuband@temenos.com"
  }
},
"externalDocs": {
  "url": "https://docs.temenos.com/docs/Solutions/Infinity/Microservices/Modules/Microservices/originations-data-storage/misc/overview.html",
  "description": "Find more information here"
},
"servers": [
{
  "url": "http://localhost:8010/ms-storage-api/api/v0.8.0"
}
],
"paths": {
"/origination/storage/entityDefinitions/": {
  "post": {
	"operationId": "createEntityDefinition",
	"description": "Creates a new version of an Entity Definition",
	"summary": "Creates a new Entity Definition",
	"tags": [
	  "EntityDefinition"
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityDefinition"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the creation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "put": {
	"operationId": "updateEntityDefinitionById",
	"description": "Updates an Entity Definition",
	"summary": "Updates an Entity Definition by id",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "query",
		"name": "entityDefId",
		"description": "Entity Definition Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityDefinition"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the update operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "get": {
	"operationId": "getEntityDefinitionById",
	"summary": "Retrieves the latest version of an Entity Definition by id",
	"description": "Returns an Entity Definition by id",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "query",
		"name": "entityDefId",
		"description": "Entity Definition Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityDefinition"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "delete": {
	"operationId": "deleteEntityDefinitionById",
	"summary": "Deletes an Entity Definition based on id if there are no associated Entity Items",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "query",
		"name": "entityDefId",
		"description": "Entity Definition Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Definition was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/entityDefinitions/{entityDefCode}": {
  "put": {
	"operationId": "updateEntityDefinitionByCode",
	"description": "Updates an Entity Definition by code",
	"summary": "Updates an Entity Definition by code",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "version",
		"description": "Entity Definition Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityDefinition"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the update operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "get": {
	"operationId": "getEntityDefinitionByCode",
	"summary": "Retrieves the latest version of an Entity Definition based on code",
	"description": "Returns an Entity Definition based on code",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "path",
		"name": "version",
		"description": "Entity Definition Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityDefinition"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "delete": {
	"operationId": "deleteEntityDefinitionByCode",
	"summary": "Deletes an Entity Definition based on code if there are no associated Entity Items",
	"tags": [
	  "EntityDefinition"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "path",
		"name": "version",
		"description": "Entity Definition Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Definition was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/entityDefinitions/{entityDefCode}/entityItems/{key}": {
  "get": {
	"operationId": "getEntityItemsByCodeAndKey",
	"summary": "Retrieves all Entity Item Types for an Entity Definition/Entity Item",
	"description": "Returns an Entity Items types for an Entity Definition/Entity Item",
	"tags": [
	  "EntityDefinitionEntityItems"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "path",
		"name": "key",
		"description": "Entity Definition Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityItemsResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/entityDefinitions/{entityDefCode}/entityItems/": {
  "get": {
	"operationId": "getEntityItemsByCode",
	"summary": "Retrieves all Entity Items for an Entity Definition",
	"description": "Returns an Entity Items for an Entity Definition",
	"tags": [
	  "EntityDefinitionEntityItems"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "path",
		"name": "version",
		"description": "Entity Definition Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityItemsResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "put": {
	"operationId": "updateEntityItemEntry",
	"description": "Updates an Entity Item Entry",
	"summary": "Updates an Entity Item Entry",
	"tags": [
	  "EntityDefinitionEntityItems"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "key",
		"description": "Entity Definition Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "name",
		"description": "Entity Item Name",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "type",
		"description": "Entity Item Type",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"requestBody": {
	  "description": "The entry for the Entity Item",
	  "required": true,
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityItemEntry"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the update",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "delete": {
	"operationId": "deleteEntityItemsByCode",
	"summary": "Deletes all Entity Items for an Entity Definition",
	"tags": [
	  "EntityDefinitionEntityItems"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "version",
		"in": "path",
		"description": "Entity Item Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Items were successfully deleted",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/entityItems/": {
  "post": {
	"operationId": "createEntityItem",
	"description": "Creates a new version of an Entity Item",
	"summary": "Creates a new Entity Item",
	"tags": [
	  "EntityItem"
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityItem"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the creation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "put": {
	"operationId": "updateEntityItem",
	"description": "Updates the latest version of an Entity Item based on Definition, Key, Name, Type",
	"summary": "Updates the latest version of an Entity Item based on Definition, Key, Name, Type",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityDefCode",
		"in": "query",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "key",
		"in": "query",
		"description": "Entity Item Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "name",
		"in": "query",
		"description": "Entity Item Name",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "type",
		"in": "query",
		"description": "Entity Item Type, i.e. JSON",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityItem"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the update operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "get": {
	"operationId": "getEntityItem",
	"summary": "Retrieves the Entity Item based on Definition, Key, Name, Type & (optional) Version.",
	"description": "Returns an Entity Item based on Definition, Key, Name, Type & (optional) Version.",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityDefCode",
		"in": "query",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "key",
		"in": "query",
		"description": "Entity Item Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "name",
		"in": "query",
		"description": "Entity Item Name",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "type",
		"in": "query",
		"description": "Entity Item Type, i.e. JSON",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "version",
		"in": "query",
		"description": "Entity Item Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityItem"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "delete": {
	"operationId": "deleteEntityItem",
	"description": "Deletes an Entity Item based on Definition, Key, Name, Type & (optional) Version.",
	"summary": "Deletes an Entity Item based on Definition, Key, Name, Type & (optional) Version.",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityDefCode",
		"in": "query",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "key",
		"in": "query",
		"description": "Entity Item Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "name",
		"in": "query",
		"description": "Entity Item Name",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "type",
		"in": "query",
		"description": "Entity Item Type, i.e. JSON",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "version",
		"in": "query",
		"description": "Entity Item Version, i.e. 12 or latest if not specified",
		"required": false,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Item was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/entityItems/{entityItemId}": {
  "put": {
	"operationId": "updateEntityItemById",
	"description": "Updates an Entity Item by id",
	"summary": "Updates an Entity Item by id",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityItemId",
		"in": "path",
		"description": "Entity Item Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"requestBody": {
	  "content": {
		"application/json": {
		  "schema": {
			"$ref": "#/components/schemas/EntityItem"
		  }
		}
	  }
	},
	"responses": {
	  "200": {
		"description": "Status for the update operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "get": {
	"operationId": "getEntityItemById",
	"summary": "Retrieves the an Entity Item by id",
	"description": "Returns an Entity Item by id",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityItemId",
		"in": "path",
		"description": "Entity Item Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/EntityItem"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  },
  "delete": {
	"operationId": "deleteEntityItemById",
	"summary": "Deletes an Entity Item by id",
	"tags": [
	  "EntityItem"
	],
	"parameters": [
	  {
		"name": "entityItemId",
		"in": "path",
		"description": "Entity Item Id",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Item was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/searchExtracts": {
  "get": {
	"operationId": "getSearchExtractData",
	"summary": "Retrieves the Entity Item extract data based on a search criteria.",
	"description": "Retrieves the Entity Item extract data based on a search criteria.",
	"tags": [
	  "SearchExtractData"
	],
	"parameters": [
	  {
		"name": "query",
		"in": "query",
		"description": "Extract Search JSON query",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Status for the retrieval operation",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/SearchExtractsResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityItems/purgeProcessor": {
  "delete": {
	"operationId": "purgeProcessor",
	"description": "Iterates through all Entity Definitions deleting Entity Items that are ready to be purged.",
	"summary": "Iterates through all Entity Definitions deleting Entity Items that are ready to be purged.",
	"tags": [
	  "Maintenance"
	],
	"responses": {
	  "200": {
		"description": "The Entity Item Purge Processor was successful",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityItems": {
  "delete": {
	"operationId": "purgeEntityItems",
	"description": "Deletes an Entity Items based on EntityDefCode, AnchorPoint & purgeDuration.",
	"summary": "Deletes an Entity Items based on EntityDefCode, AnchorPoint & purgeDuration.",
	"tags": [
	  "Maintenance"
	],
	"parameters": [
	  {
		"name": "entityDefCode",
		"in": "query",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "purgeAnchorPoint",
		"in": "query",
		"description": "Entity Item purgeAnchorPoint",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"name": "purgeDuration",
		"in": "query",
		"description": "Entity Item purgeDuration",
		"required": true,
		"schema": {
		  "type": "integer"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The Entity Item was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityItems/{entityDefCode}": {
  "delete": {
	"operationId": "purgeEntityItemsByCodeAndKey",
	"description": "Deletes all Entity Items based on code & key.",
	"summary": "Deletes all Entity Items based on code & Key",
	"tags": [
	  "Maintenance"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "key",
		"description": "Entity Item Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The User Journey was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityItems/reminderProcessor": {
  "post": {
	"operationId": "reminderProcessor",
	"description": "Generate purge reminder event based around specified reminder times.",
	"summary": "Generate purge reminder event based around specified reminder times.",
	"tags": [
	  "Maintenance"
	],
	"responses": {
	  "200": {
		"description": "The Entity Item Reminder Processor was successful",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityItem": {
  "delete": {
	"operationId": "purgeEntityItemByCodeKeyAndName",
	"description": "Deletes an Entity Item based on code, key and name.",
	"summary": "Deletes an Entity Item based on code, key and name.",
	"tags": [
	  "Maintenance"
	],
	"parameters": [
	  {
		"in": "query",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "key",
		"description": "Entity Item Key",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  },
	  {
		"in": "query",
		"name": "name",
		"description": "Entity Item Name",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "The item was deleted successfully",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
},
"/origination/storage/maintenance/entityDefinitions/{entityDefCode}": {
  "put": {
	"operationId": "updateEntityItemsToLatest",
	"description": "Updates all entityItems for a given entity Definition to the latest version.",
	"summary": "Updates all entityItems for a given entity Definition to the latest version.",
	"tags": [
	  "Maintenance"
	],
	"parameters": [
	  {
		"in": "path",
		"name": "entityDefCode",
		"description": "Entity Definition Code",
		"required": true,
		"schema": {
		  "type": "string"
		}
	  }
	],
	"responses": {
	  "200": {
		"description": "Entity Items have been successfully updated to the latest Definition version.",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardEntityResponse"
			}
		  }
		}
	  },
	  "default": {
		"description": "Get the error message",
		"content": {
		  "application/json": {
			"schema": {
			  "$ref": "#/components/schemas/StandardErrorResponse"
			}
		  }
		}
	  }
	}
  }
}
},
"components": {
"schemas": {
  "StandardEntityResponse": {
	"properties": {
	  "id": {
		"description": "Unique identifier",
		"type": "string"
	  },
	  "status": {
		"type": "string",
		"description": "Specifies http error code extension",
		"example": "Success"
	  },
	  "message": {
		"type": "string",
		"description": "Specifies the text that provide more details and corrective actions"
	  }
	}
  },
  "StandardErrorResponse": {
	"properties": {
	  "errorCode": {
		"type": "string"
	  },
	  "errorDescription": {
		"type": "string"
	  }
	}
  },
  "EntityItem": {
	"description": "Defines an entry payload of values for the schema structure",
	"properties": {
	  "id": {
		"description": "The id of the Entity Item",
		"type": "string",
		"example": "507f191e810c19729de860ea"
	  },
	  "key": {
		"description": "Unique key of the Entity Item within the Entity Definition",
		"type": "string",
		"example": "AGH8DX"
	  },
	  "name": {
		"description": "Name of the Entity Item",
		"type": "string",
		"example": "onboardingDataFlow"
	  },
	  "type": {
		"description": "Type of the Entity Item (only JSON supported currently)",
		"type": "string",
		"example": "JSON"
	  },
	  "entityDefinitionCode": {
		"description": "The unique code for the Entity Definition",
		"type": "string",
		"example": "OnboardingJourneyABC"
	  },
	  "entityDefinitionVersion": {
		"description": "The version number of the parent entity definition",
		"type": "integer",
		"example": 12
	  },
	  "entry": {
		"description": "The value of the structure entry, could be an EntityFieldDefinition or another key/value",
		"type": "string"
	  },
	  "entryHash": {
		"description": "The hash of the entry payload",
		"type": "string",
		"example": "3277cbad7cdddfb2b198e00326dd9f06"
	  },
	  "version": {
		"description": "The version number",
		"type": "integer",
		"example": 12
	  },
	  "createdDate": {
		"description": "Date created",
		"type": "string",
		"example": "2020-08-21T10:32:28Z"
	  },
	  "createdById": {
		"description": "Created by id",
		"type": "string",
		"example": "43242"
	  },
	  "updatedDate": {
		"description": "Date updated",
		"type": "string",
		"example": "2020-08-21T10:32:28Z"
	  },
	  "updatedById": {
		"description": "Updated by id",
		"type": "string",
		"example": "54234"
	  },
	  "purgeDate": {
		"description": "Purge date",
		"type": "string",
		"example": "2020-08-21T10:32:28Z"
	  },
	  "purgeReminderDate": {
		"description": "Purge reminder date",
		"type": "string",
		"example": "2020-08-21T10:32:28Z"
	  },
	  "locked": {
		"description": "If true, no further edits can be performed",
		"type": "boolean",
		"example": "false"
	  },
	  "integrityValue": {
		"description": "Reminder duration in days",
		"type": "integer",
		"format": "int64",
		"example": "10023"
	  }
	}
  },
  "EntityItemsResponse": {
	"properties": {
	  "entityItems": {
		"type": "array",
		"items": {
		  "$ref": "#/components/schemas/EntityItem"
		}
	  }
	}
  },
  "EntityItemEntry": {
	"properties": {
	  "entityItemEntry": {
		"type": "object"
	  }
	}
  },
  "SearchExtractData": {
	"properties": {
	  "id": {
		"description": "The entityItemId of the Extract Data entry",
		"type": "string",
		"example": "507f191e810c19729de860ea"
	  },
	  "searchPath": {
		"description": "Search Key",
		"type": "string",
		"example": "OnboardingJourneyABC"
	  },
	  "value": {
		"description": "The extract data entry value",
		"type": "string",
		"example": "Firstname: john"
	  },
	  "entityDefCode": {
		"description": "Parent entity definition code",
		"type": "string",
		"example": "OnboardingJourneyABC"
	  }
	}
  },
  "SearchExtractsResponse": {
	"properties": {
	  "searchExtracts": {
		"type": "array",
		"items": {
		  "$ref": "#/components/schemas/SearchExtractData"
		}
	  }
	}
  },
  "EntityItemDefinition": {
	"description": "Defines an optional Entity Item Definition configuration for an Entity Item name/type",
	"type": "object",
	"properties": {
	  "type": {
		"description": "Type of the Entity Item",
		"type": "string",
		"example": "JSON"
	  },
	  "seed": {
		"description": "The seed data (JSON or XML)",
		"type": "string"
	  },
	  "validationSchema": {
		"description": "The JSON or XML Schema used for validation of the payload",
		"type": "string"
	  },
	  "applyValidation": {
		"description": "If true the validationSchema is applied to the payload",
		"type": "boolean"
	  },
	  "validateSeed": {
		"description": "If true the seed will be validated based on type i.e. JSON",
		"type": "boolean"
	  },
	  "validateEntry": {
		"description": "If true, the Entity Item Entry will be validated based on type i.e. JSON",
		"type": "boolean"
	  }
	}
  },
  "EntityDefinition": {
	"description": "Defines an Entity Definition",
	"properties": {
	  "id": {
		"description": "The id of the Entity Definition",
		"type": "string",
		"example": "507f191e810c19729de860ea"
	  },
	  "code": {
		"description": "Unique entity code",
		"type": "string",
		"example": "OnboardingJourneyABC"
	  },
	  "purgeAnchorPoint": {
		"description": "Purge anchor point",
		"type": "string",
		"enum": [
		  "createdDate",
		  "updatedDate"
		],
		"nullable": false,
		"example": "createdDate or updatedDate"
	  },
	  "purgeDuration": {
		"description": "Purge duration in days",
		"type": "integer",
		"minimum": 0,
		"example": "60"
	  },
	  "reminderAnchorPoint": {
		"description": "Reminder anchor point",
		"type": "string",
		"example": "createdDate or updatedDate",
		"enum": [
		  "createdDate",
		  "updatedDate"
		]
	  },
	  "reminderDuration": {
		"description": "Reminder duration in days",
		"type": "integer",
		"example": "53"
	  },
	  "searchPaths": {
		"description": "Entity Item Entry Search Paths",
		"type": "object",
		"additionalProperties": {
		  "type": "string"
		},
		"example": {
		  "PHONE1": "contact.phone.phone1",
		  "CITY": "contact.address.city"
		}
	  },
	  "entityItemDefinitions": {
		"description": "The Entity Item Definitions",
		"type": "object",
		"additionalProperties": {
		  "$ref": "#/components/schemas/EntityItemDefinition"
		},
		"example": {
		  "PII": {
			"type": "JSON",
			"seed": {
			  "firstName": "",
			  "lastName": "",
			  "age": ""
			},
			"validationSchema": {
			  "$schema": "http://json-schema.org/draft-07/schema#",
			  "$id": "http://example.com/product.schema.json",
			  "title": "PII JSON Schema",
			  "description": "PII Details for onboarding application",
			  "type": "object",
			  "properties": {
				"firstName": {
				  "type": "string",
				  "description": "The person's first name."
				},
				"lastName": {
				  "type": "string",
				  "description": "The person's last name."
				},
				"age": {
				  "description": "Age in years which must be equal to or greater than zero.",
				  "type": "integer",
				  "minimum": 0
				}
			  }
			},
			"applyValidation": true
		  },
		  "ADDRESS": {
			"type": "JSON",
			"seed": {
			  "street": "",
			  "suburb": "",
			  "state": "",
			  "country": ""
			},
			"validationSchema": "",
			"applyValidation": false
		  },
		  "PERSONAL": {
			"type": "JSON",
			"seed": {
			  "street1": "",
			  "suburb": "",
			  "state": "",
			  "country": ""
			},
			"validationSchema": "",
			"applyValidation": false
		  }
		}
	  },
	  "version": {
		"description": "Version Number",
		"type": "integer",
		"example": "1"
	  },
	  "createdDate": {
		"description": "Date created",
		"type": "string",
		"example": "2020-07-21T17:32:28Z"
	  },
	  "createdById": {
		"description": "Created by id",
		"type": "string",
		"example": "32423"
	  },
	  "updatedDate": {
		"description": "Date updated UTC",
		"type": "string",
		"example": "2020-08-21T10:32:28Z"
	  },
	  "updatedById": {
		"description": "Updated by id",
		"type": "string",
		"example": "54323"
	  },
	  "integrityValue": {
		"description": "Reminder duration in days",
		"type": "integer",
		"format": "int64",
		"example": "10023"
	  },
	  "purgeEmail": {
		"description": "Purge email",
		"type": "string",
		"example": "jhon@doe.com"
	  }
	}
  }
}
}

