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 tagging.

The challenge of most fund tools and factsheets implementations are that they require customizations 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 many products in a group.

The layout service achieves these design goals firstly by separating each page or factsheet into a number of components. Each component can have its own unique configurations, denoted by JSON. This JSON is governed by a JSON schema. The system now allows you to define these schemas and store them. A new configuration is entered and is comprised of multiple components. 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 our entities(of course funds or share classes, usually denoted by ISINs or CUSIPs). A single entity can be linked to at most one configuration of a certain 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 for bigger clients 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 we term as tags, but really correspond to properties of the entity. One feature of this scheme is that these rules can be layered. For example, if a client wishes to apply a generic rule to all funds with an "asset_class": "Equity" but has specific exceptions at an ISIN level, then they can create a two tag scheme.

In order to do this, they must set the propertyMatchOrder of the layoutConfigurationType to include both of these property definitions, like so "propertyMatchOrder": ["asset_class", "isin"]. Now when requesting these configurations the system will expect the caller to provide both the assetclass and isin of the underlying share class. When it received the request it will determine if there is an override rule for the assetclass+isin. IF this 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: //api.fundpress.io/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 lower snake case.
name Name of the component.
description Description of the component.
schema a valid json schema dictating how the component should be formed. Can be completely custom 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: //api.fundpress.io/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 lower snake case.
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 components configs together and associate them directly with funds or share classes, or multiple entities via tags.

Parameter Value
End Point https: //api.fundpress.io/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 components 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 end point is used to retrieve the correct configuration for use in a UI.

Parameter Value
End Point https: //api.fundpress.io/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 pay template

Parameter Value
End Point https: //api.fundpress.io/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

Creates a new or updates an existing office template.

Parameter Value
End Point https: //api.fundpress.io/layout/upsertOfficeTemplate
Headers X-KSYS-TOKEN
Content Type application/json
HTTP Method POST

Properties

Property Required On Insert Required On Upate 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 for 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

Request Examples

Insert Example

{
    "title": "Presentation 1",
    "description": "This this the first presentation",
    "fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
    "fileName": "presentation1.pptx",
    "data": "YXNkZmFzZGZhZmQ=......."
}

Update Example

{
    "officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
    "title": "Presentation 1",
    "description": "This this the first presentation",
    "fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
    "fileName": "presentation1.pptx"
}

Update Example (with file)

{
    "officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56",
    "title": "Presentation 1",
    "description": "This this the first presentation",
    "fileType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
    "fileName": "presentation1.pptx",
    "data": "YXNkZmFzZGZhZmQ=......."
}

Response Example

For inserted templates the newly created officeTemplateCode will be returned, for updates existing officeTemplateCode will be returned.

{
    "officeTemplateCode": "3f0015a4-8aaa-c70a-6b8d-3dac40ed6d56"
}

List Office Templates

Returns a list of office templates.

Parameter Value
End Point https://api.fundpress.io/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

Request Examples

{
    "start": 0,
    "limit": 10,
    "fileType": ["application/vnd.openxmlformats-officedocument.presentationml.presentation"]
}

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://api.fundpress.io/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://api.fundpress.io/layout/retrieveOfficeTemplateAsset/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000/images/full/0`
- https://api.fundpress.io/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://api.fundpress.io/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://api.fundpress.io/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://api.fundpress.io/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

Properties

Arguments Description
officeTemplateCode An office template code as a string

Request Example

{
    "officeTemplateCode": "asdf-asdf-asdf-asdf-1"
}