Layout Service
The layout service allows for the storage of layout configuration for tools, factsheets, and reports. The layout configurator allows the configs to be attached to groups of share classes, funds, or even categories of the above using tags.
The challenge of most fund tools and factsheets implementations is that they require customization for each ISIN, or across a fund range. The nature of these customizations is heterogenous across each individual asset manager. We wanted to create a way of storing these varied configurations, have a way of tagging them directly to funds or share classes, or efficiently applying them to multiple products in a group.
The layout service achieves these design goals by separating each page or factsheet into a number of components. Each component can have its own unique configurations, configured in JSON. This JSON is governed by a JSON schema. The system allows you to define these schemas and store them. A new configuration comprised of multiple components is entered. Each component is checked against its entered schema and rejected if it violates it.
Layout Configuration Types
It should be noted that each configuration requires a pre-created layout configuration type. This denotes the type of scheme used to tag the configurations for retrieval. There are two tagging schemes available. The first is "type": "CLIENTCODE"
based and the second is "type": "TAG"
based. In the first, each of the configurations of a given type can be linked to a list of valid client codes for all entities (funds or share classes, usually denoted by ISINs or CUSIPs). A single entity can be linked to at most one configuration of a layoutConfigurationType
. This type of scheme is useful where the client needs specific layouts for each product. This is useful for smaller asset managers where the number of products may be small and the display of the pages idiosyncratic.
The second scheme "type": "TAG"
is useful where there are many products and the layouts are shared across several of them. In this instance we can apply the configs based on the properties of the fund or share class. Each configuration can have a series of what "tags" which correspond to properties of the entity. A benefit of this is that these rules can be layered. For example, if a client wishes to apply a generic rule to all funds with "asset_class": "Equity"
but has specific exceptions at an ISIN level, they can create a two tag scheme.
In order to do this, set the propertyMatchOrder
of the layoutConfigurationType to include both of these property definitions, for example, "propertyMatchOrder": ["asset_class", "isin"]
. When requesting these configurations, the system will expect the caller to provide both the asset_class
and isin
of the underlying share class. When it receives the request it will determine if there is an override rule for the asset_class
+isin
. If a rule exists, it will send it back. However, if no specific rule exists it will send back the generic rule for the asset_class
. The tag scheme can be layered almost infinitely with as many tags as required.
Overview Diagram
The diagram below shows the basic flow of how the layouts work.
Layout Components
Layout components are the building blocks of configurations. They should loosely relate to parts of a product page or factsheet.
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertLayoutComponent |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
{
"code": "page_header",
"name": "Page Header",
"description": "This component governs a header",
"schema": {
"type": "object",
"properties": {
"visible": {
"type": "boolean",
"description": "Dictates whether the component should be shown"
}
}
},
"applicableTo": [
"FACTSHEET"
]
}
Key |
Description |
code |
A unique code for the component. Must be written in lowercase without spaces |
name |
Name of the component |
description |
Description of the component |
schema |
A valid JSON schema dictating how the component should be formed. Can be customized to each component |
Layout Configuration Types
Before creating a configuration, a "type" must be created in the system. This dictates the retrieval type to be used.
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertLayoutConfigurationType |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
{
"name": "Client Product Page",
"code": "client_pdp",
"type": "TAGS",
"propertyMatchOrder": ["asset_class"]
}
Key |
Description |
code |
A unique code for the configuration type. Must be lowercase without spaces |
name |
Name of the configuration type |
type |
Either TAGS or CLIENTCODE |
propertyMatchOrder |
The order in which tags should be used for matching. Only applicable to TAG based config types |
Layout Configuration
Layout configurations compose one or many component configurations together and associate them directly with funds or share classes, or multiple entities, via tags.
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertLayoutConfiguration |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST or WSS |
{
"layoutConfigurationType": "client_pdp",
"clientCodes": ["GB123123123"],
"configuration": {
"page_header": {
"visible": true
},
"key_facts": {
"visible": true,
"showDisclaimer": true
}
}
}
Key |
Description |
layoutConfigurationType |
A valid code matching a configuration type |
clientCodes |
for CLIENTCODE based config types, a list of valid Entity.clientCode values. Mutually exclusive with tags |
configuration |
A JSON object comprised of keys, each matching a valid layoutComponent , each of which matching said component's schema |
tags (not shown) |
A map of keys, each matching a valid property, along with an associated match value. An example would be "tags": {"asset_class": "Equity", "product_type": "SICAV"} . Mutually exclusive with clientCodes |
Layout Configuration Query
The query endpoint is used to retrieve the correct configuration for use in a UI.
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/retrieveLayoutConfiguration |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
{
"layoutConfigurationType": "client_pdp",
"clientCode": "GB123123123"
}
Key |
Description |
layoutConfigurationType |
A valid code matching a configuration type. |
clientCode |
A single client code to retrieve the config for |
tags (not shown) |
A map of keys, each matching a valid property, along with an associated match value. An example would be "tags": {"asset_class": "Equity", "product_type": "SICAV"} . Mutually exclusive with clientCode. |
Layout Page Template
Creating a new page template
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertPageTemplate |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
{
"templateName": "ABC", // string
"templateType": "Fundtool", // string
"description": "Some description", // longstring
"layoutConfigurationTypeCode": "7efb7f4c-ef9b-43c1-8fa5-c0e9adc033ab", // string
"environments": [{
"environmentName": "dev", // string
"environmentURL": "http//domain.com", // string
"embedCode": "I12343" // string
}],
"inputVariables": [{
"allowedValues": ["hk", "gb"], // string[]
"code": "country", // string
"inputType": "Custom", // string
"label": "Country" // string
}],
"printSettings": {
"printEngine": "Type 1", // string | ["Type 1", "Type 2", "Type 3"]
"paperSize": "A4", // string | ["A4", "A3", "Legal", "Letter"]
"paperMargin": "default", // string | ["default", "none", "minimum"]
"marginLeft": 10, // number
"marginRight": 10, // number
"marginTop": 10, // number
"marginBottom": 10, // number
"landscape": true, // boolean
"renderDelay": 5000 // number
"externalTemplateName": "Template Name" // string
}
}
Upsert Office Template
Create a new/update an existing Microsoft Office-type or InDesign template.
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertOfficeTemplate |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
Properties
Property |
Required On Insert |
Required On Update |
Description |
officeTemplateCode |
FALSE |
TRUE |
The unique identifier for the template, this will be automatically generated on insert |
title |
TRUE |
TRUE |
The title for the template |
description |
FALSE |
FALSE |
The description of the template |
fileType |
TRUE |
TRUE |
The file type (mime type) for the template |
fileName |
TRUE |
TRUE |
The file name of the template |
data |
TRUE |
FALSE |
The base64 representation of the file |
officeTemplateType |
TRUE |
TRUE |
The type of the template |
images |
TRUE |
FALSE |
Base64 images for the template. This only applies to InDesign templates |
Request Examples
Insert Office Template Example
{
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"fileName": "presentation1.pptx",
"data": "YXNkZmFzZGZhZmQ=.......",
"officeTemplateType": "office"
}
Insert InDesign Template Example
{
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/x-indesign",
"fileName": "presentation1.indd",
"data": "YXNkZmFzZGZhZmQ=.......",
"officeTemplateType": "indesign",
"images": {
"full": ["iVBORw0KGgoAAAANS..."],
"thumbnail": ["UhEUgAAABwAAAA..."]
},
"applicationData": [
{
"application": [
{
"applicationCode": "ebfc2eb5-0828-43a5-a8dd-b53d986ee9b2",
"configurationName": "default",
"height": 200,
"inputs": [],
"styleName": "default",
"widgetId": "df59bbda-b2d3-4d9d-b01b-733e72d71edf",
"widgetName": "Authentication",
"width": 300
},
{
"applicationCode": "1bbb6b92-d593-489d-8446-4b5acad496dd",
"configurationName": "default",
"height": 200,
"inputs": [
{
"code": "culture",
"label": "Culture",
"value": "en-GB"
},
{
"code": "client_codes",
"label": "Client Codes",
"value": "112233"
},
{
"code": "client_code",
"label": "Client Code",
"value": "223344"
}
],
"styleName": "default",
"widgetId": "56f10cc2-ede2-4e34-b981-e913e2a2ec34",
"widgetName": "fundcardQA",
"width": 300,
"cssReset": true,
"removeBackground": true
}
],
"pageIndex": 0
}
]
}
Update Office Template Example
{
"officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"fileName": "presentation1.pptx",
"officeTemplateType": "office"
}
Update InDesign Template Example
{
"officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/x-indesign",
"fileName": "presentation1.indd",
"officeTemplateType": "indesign",
"applicationData": [
{
"application": [
{
"applicationCode": "1bbb6b92-d593-489d-8446-4b5acad496dd",
"configurationName": "default",
"height": 200,
"inputs": [
{
"code": "culture",
"label": "Culture",
"value": "en-GB"
},
{
"code": "client_codes",
"label": "Client Codes",
"value": "112233"
},
{
"code": "client_code",
"label": "Client Code",
"value": "223344"
}
],
"styleName": "default",
"widgetId": "56f10cc2-ede2-4e34-b981-e913e2a2ec34",
"widgetName": "fundcardQA",
"width": 300,
"cssReset": true,
"removeBackground": true
}
],
"pageIndex": 0
}
]
}
Update Office Template Example (with file)
{
"officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"fileName": "presentation1.pptx",
"data": "YXNkZmFzZGZhZmQ=.......",
"officeTemplateType": "office"
}
Update InDesign Template Example (with file and images and applicationData)
{
"officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
"title": "Presentation 1",
"description": "This is the first presentation",
"fileType": "application/x-indesign",
"fileName": "presentation1.indd",
"data": "YXNkZmFzZGZhZmQ=.......",
"officeTemplateType": "indesign",
"images": {
"full": ["iVBORw0KGgoAAAANS..."],
"thumbnail": ["UhEUgAAABwAAAA..."]
},
"applicationData": [
{
"application": [
{
"applicationCode": "1bbb6b92-d593-489d-8446-4b5acad496dd",
"configurationName": "default",
"height": 200,
"inputs": [
{
"code": "culture",
"label": "Culture",
"value": "en-GB"
},
{
"code": "client_codes",
"label": "Client Codes",
"value": "112233"
},
{
"code": "client_code",
"label": "Client Code",
"value": "223344"
}
],
"styleName": "default",
"widgetId": "56f10cc2-ede2-4e34-b981-e913e2a2ec34",
"widgetName": "fundcardQA",
"width": 300,
"cssReset": true,
"removeBackground": true
}
],
"pageIndex": 0
}
]
}
Response Example
For inserted templates the officeTemplateCode
will be returned; for updates, existing officeTemplateCode
s will be returned.
{
"officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56"
}
List Office Templates
Returns a list of Office templates.
Parameter |
Value |
End Point |
https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/listOfficeTemplates |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
Properties
Property |
Required |
Description |
start |
FALSE |
The start index of the items |
limit |
FALSE |
The maximum number of items to be returned |
fileType |
FALSE |
The file types to filter on |
officeTemplateCode |
FALSE |
The office template codes to filter on |
includeDynamicData |
FALSE |
Include template dynamic data configuration |
Request Examples
Office document types
{
"start": 0,
"limit": 10,
"fileType": ["application/vnd.openxmlformats-officedocument.presentationml.presentation"]
}
InDesign document types
{
"start": 0,
"limit": 10,
"fileType": ["application/x-indesign"]
}
Office Template Codes
{
"start": 0,
"limit": 10,
"officeTemplateCode": ["1bf60ffc-5e6e-42d7-a051-e040a52f3722", "c6d560b3-917d-462d-a526-30586ce76ea2"]
}
Response Example
{
"values": [
{
"officeTemplateCode": "1bf60ffc-5e6e-42d7-a051-e040a52f3722",
"title": "Template Title",
"description": "Template Description",
"fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"fileName": "filename_1.pptx",
"storagePath": "c6d560b3-917d-462d-a526-30586ce76ea2/officeTemplates/1bf60ffc-5e6e-42d7-a051-e040a52f3722_filename_1.pptx"
}
],
"total": 1
}
Retrieve Office Template Thumbnail
Returns an image for an Office template.
Parameter |
Value |
End Point |
https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/retrieveOfficeTemplateAsset/{officeTemplateCode}/images/{size}/{slide} |
Headers |
X-KSYS-TOKEN |
HTTP Method |
GET |
Properties
Arguments |
Description |
officeTemplateCode |
Globally unique template code |
size |
Size of the image to retrieve |
-thumbnail |
Option to return a thumbnail sized image |
-full |
Option to return a full sized image |
slide |
Position of the slide |
Request Example
- https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/retrieveOfficeTemplateAsset/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000/images/full/0`
- https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/retrieveOfficeTemplateAsset/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000/iamges/thumbnail/1`
Response Example
If no template is found:
{
"error": "No template found"
}
If no thumbnail image is found:
{
"error": "No image found"
}
Delete Office Template Thumbnail
Will delete all officeTemplates
with matching officeTemplateCodes
.
Parameter |
Value |
End Point |
https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/deleteOfficeTemplates |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
Properties
Arguments |
Description |
officeTemplateCodes |
An array of officeTemplateCodes |
Request Example
{
"officeTemplateCodes": ["asdf-asdf-asdf-asdf-1", "asdf-asdf-asdf-asdf-2", "asdf-asdf-asdf-asdf-3"]
}
Response Example
"OK"
Bulk Download Office Templates
Will download a zip file of officeTemplates
that match the given array of officeTemplateCodes
.
Parameter |
Value |
End Point |
https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/bulkDownloadOfficeTemplate |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
Returns |
A zip file containing officeTemplates as pptx or docx |
Return Content type |
application/zip |
Properties
Arguments |
Description |
officeTemplateCodes |
An array of officeTemplateCodes |
Request Example
{
"officeTemplateCodes": ["asdf-asdf-asdf-asdf-1", "asdf-asdf-asdf-asdf-2", "asdf-asdf-asdf-asdf-3"]
}
Download Office Template
Will download a single Office template that matches the officeTemplateCode
.
Parameter |
Value |
End Point |
https://<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/downloadOfficeTemplate |
Headers |
X-KSYS-TOKEN |
Content Type |
application/json |
HTTP Method |
POST |
Returns |
A single Office template file |
Return Content type |
The content type of the requested document |
Content Types
Document Extension |
Content Type |
.pptx |
application/vnd.openxmlformats-officedocument.presentationml.presentation |
.docx |
application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.xlsx |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
Properties
Arguments |
Description |
officeTemplateCode |
An Office template code as a string |
Request Example
{
"officeTemplateCode": "asdf-asdf-asdf-asdf-1"
}
Upsert Page Template Asset
Creating a new/update page template asset
Parameter |
Value |
End Point |
https: //<US: api-us.kurtosys.app OR UK: api-uk.kurtosys.app>/layout/upsertPageTemplateAsset |
Headers |
X-KSYS-TOKEN |
Content Type |
multipart/form-data |
HTTP Method |
POST |
Value |
Required |
Description |
file |
true |
The file that is being uploaded |
pageTemplateId |
true |
The page template id associated with this asset |
pageTemplateEnvironment |
true |
can be LOCAL, DEVELOPMENT, RELEASE, PRODUCTION |
{
"file": "ABCDEFG",
"pageTemplateId": "asdfghj123456",
"pageTemplateEnvironment": "LOCAL",
}