NAV Navbar
shell
  • Introduction
  • API Response Format
  • Pagination
  • CHANGELOG
  • Authentication
  • Quick Start
  • Nodes
  • Instrument
  • Client
  • Account
  • Payment
  • Order
  • Cash
  • Transaction Group
  • Portfolio
  • Model
  • Pay and Invest to Model
  • Account Cash Transfer
  • Illustration
  • Recommendation
  • Message
  • Documents
  • Notifications
  • Constants
  • Common interfaces
  • Introduction

    API endpoint

    https://pfolio-api-staging.seccl.tech
    

    Welcome to the Seccl API! You can use our REST API to access the Digital Custody service. This will allow client and account management, creating payments and orders, viewing portfolio details and listing available instruments.

    API Response Format

    API response

    {
      "data": "{} or []",
      "meta": {
        "count": 1000,
        "page": 1,
        "pageSize": 50
      },
      "error": {
        "errorMessage": "Error message",
        "type": "Error type",
        "fieldErrors": [
          {
            "fieldName": "Field name in error",
            "type": "fieldErrorType",
            "errorMessage": "Field error message"
          }
        ]
      }
    }
    

    Our API will return data in a specific format.

    An API response will return an object with data and error properties.

    A search response will return a slightly different object: data will be an array.
    There will also be an additional meta field. This will be useful for pagination etc.

    Response Success Codes

    Code Meaning
    200 OK -- The request has succeeded.
    201 Created -- The request has been fulfilled.

    Response Error Codes

    Code Meaning
    400 Bad Request -- Your request is invalid.
    403 Forbidden -- You are not allowed to access this route or data.
    404 Not Found -- The specified data record could not be found.
    412 Pre Condition Failed -- Your update request was for data that had been updated
    419 Authentication Timeout -- Your API token has expired
    500 Internal Server Error -- We had a problem with our server. Try again later.

    Response Data

    This returns the following data

    Field Description
    data Returned data - will be an object or array (search only)
    meta Meta information including pagination for API search requests only
    error An error object as described in the errors section

    Meta information

    Field Description
    page The current page of results returned
    pageSize The size of the dataset in a single page
    count The total number of items in the current search

    Error Response Data

    An error structure will look like the following.

    {
      "error": {
        "errorMessage": "Something went wrong",
        "type": "DataValidation",
        "fieldErrors": [
          {
            "fieldName": "name",
            "errorMessage": "Name must exist",
            "type": "presence"
          },
          {
            "fieldName": "address.postCode",
            "errorMessage": "This is not a valid postcode",
            "type": "format"
          },
          {
            "fieldName": "orders[0].assetId",
            "errorMessage": "This asset does not exist",
            "type": "inclusion"
          }
        ]
      }
    }
    
    Field Description
    type The type of error, for instance DataNotFound, DataValidationError
    errorMessage The specific error message
    fieldErrors An array of field level errors
    type - The type of the field level error, for instance numericality, format
    fieldName - The field name that has the error. This will be dot separated for nested errors and will have the following syntax for arrays arrayProperty[index].property
    errorMessage - The specific field error message

    Pagination

    Search requests are any requests which return an array of data. They are paginated by default.

    These are the pagination options.

    HTTP Request example

    GET https://pfolio-api-staging.seccl.tech/account/<firmId>?page=1&pageSize=50

    Query Description
    page The current page of results to return
    pageSize The size of the dataset to return in a single page

    CHANGELOG

    This will highlight important updates to the API, focusing on breaking changes and significant new features.

    2019-06

    Non-breaking change: todate and fromdate on /account/report changed to toDate and fromDate. Both will work although we are standardising these query strings to use common camel-casing.

    Planned breaking changes

    Default pageSize

    Currently pagination is not enabled by default, we will be setting the default pageSize to something like 50 within the next couple of months. If you are relying on an endpoint returning all results in a single request this will be a breaking change.

    v1.9.2

    Notable changes

    v0.4.29

    Breaking Changes

    Notable changes

    Authentication

    Acquire an access token

    This allows the user to login to the service and obtain an API token. The token returned must be used on all subsequent calls to the API in the api-token header field.

    To authorize, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/authenticate \
      -H "Content-Type: application/json" \
      -d '{
            "firmId": "<FIRM Id provided>",
            "id": "<User id provided>",
            "password": "<Passcode provided>"
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "token": "exampletoken",
            "userName": "User Name"
        }
    }
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/authenticate

    Body Data

    All fields listed below are required.

    Field Data Type Description
    firmId String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    id String The user Id we have created for you
    password String The password we have created for you

    Response Data

    This returns the following data

    Field Description
    token The authenticated token to be used in the header of all subsequent requests
    userName Your username

    Reset password request

    A Client or Professional User can request a password reset link to be sent to them. This is how to do it:

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/reset

    Reset password - Body Data

    To send an email to reset a client's password, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/reset> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "id": "<email address or id>",
              "surname": "McClient",
              "firmId": "FIRM1"
          }'
    
    Field Data Type Description
    id
    REQUIRED
    String The client's email address or id. For verification purposes.
    surname
    REQUIRED
    String The client's surname. For verification purposes.
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Set password from reset password token

    A Client or Professional User can set the current password with a valid reset token. This is how to do it:

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/setpassword

    Set password - Body Data

    To set the password, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/setpassword \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "id": "<client id>",
              "firmId": "FIRM1",
              "password": "<new password>",
              "passwordToken": "<password token emailed to the user>"
          }'
    
    Field Data Type Description
    id
    REQUIRED
    String The client's email address or id
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    password
    REQUIRED
    String The new password
    passwordToken
    REQUIRED
    String The password token emailed to the user after doing a reset

    Change password with an authenticated token

    An authenticated Client or Professional User can change the current password. This is how to do it:

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/changepassword

    Change password - Body Data

    To change the password, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/changepassword \
      -H 'Content-Type: application/json'  \
      -H ''api-token: yourtoken' \
      -d '{
              "id": "<client id>",
              "firmId": "FIRM1",
              "password": "<old password>",
              "newPassword": "<new password>"
          }'
    
    Field Data Type Description
    id
    REQUIRED
    String The client's email address or id
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    password
    REQUIRED
    String The old password
    newPassword
    REQUIRED
    String The new password

    Quick Start

    If you're in a hurry, use this code:

    Step 1

    curl -X POST https://pfolio-api-staging.seccl.tech/client \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": ["0"],
            "clientType": "Individual",
            "title": "Miss",
            "firstName": "Selene",
            "surname": "Love",
            "gender": "Female",
            "currency": "GBP",
            "addressDetail": {
                "address1": "160 Manchester Road",
                "address2": "Doncaster",
                "country": "GB",
                "postCode": "DN11 6RJ"
            },
            "nationality": "GB",
            "language": "en",
            "email": "Selene.Love107@email.com",
            "mobile": {
              "number": "07777000000",
              "locale": "en-GB",
              "isMobile": true
            }
            "nationalInsuranceNo": "XB952013A",
            "dateOfBirth": "1972-10-01T23:00:00.000Z",
            "taxDomicile": "GB",
            "amlStatus": "Approved",
            "termsAccepted": true
          }'
    

    Step 2

    curl -X POST https://pfolio-api-staging.seccl.tech/account \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": "0",
            "accountType": "Wrapper",
            "name": "My trading account",
            "status": "Active",
            "currency": "GBP",
            "clientId": "<client Id returned above>",
            "wrapperDetail": {
              "wrapperType": "GIA"
            }
          }'
    

    Step 3

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "accountId": "<account Id returned above>",
            "transactions": [{
              "firmId": "FIRM1",
              "accountId": "<account Id returned above>",
              "transactionType": "Payment",
              "transactionSubType": "Deposit",
              "movementType": "In",
              "currency": "GBP",
              "amount": 1000,
              "method": "Bank Transfer"
            },{
              "firmId": "FIRM1",
              "accountId": "<account Id returned above>",
              "transactionType": "Order",
              "transactionSubType": "At Best",
              "movementType": "Invest",
              "currency": "GBP",
              "amount": 1000,
              "assetId": "286Q5"
            }]
          }'
    

    Step 4

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?accountId=<accountId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Step 5

    curl -X GET https://pfolio-api-staging.seccl.tech/portfolioaccount/<firmId>/<accountId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Ok. So you want to crack on with things straight away? That's no problem. Once you've authenticated, follow the quick start examples.

    There are just four steps to it.

    Step 1 - Create a client

    The example shows the minimum information required to do this. Make sure you store the client Id returned in the response data. Full details of how to create a client can be found here.

    Step 2 - Create an account

    Now create an account for the client you've just created. The example is the minimum required, but you must make sure the clientId field is populated with the Id returned in the response to step 1. Full details of how to create an account can be found here.

    Step 3 - Create some transactions

    The example shows how to create a payment to deposit cash on the account and then subsequently create an order to buy some shares. We call this a transaction group. Make sure the accountId field is populated with the Id returned in the response to step 2.

    Step 4 - List your transactions

    The example shows how to query any transactions for a given account. Make sure the accountId field is populated with the Id returned in the response to 2. Your response will be the details of the payment and order created in step 3.

    Step 5 - Retrieve your account summary

    The example shows how to query the latest position for a given account. Make sure the accountId URL parameter is populated with the Id returned in the response to 2. Your response will be the details of the overall account value and growth, and the latest cash and stock positions.

    As ever, if you get stuck, drop us a line in the Seccl Slack community.

    Nodes

    What is a Node?

    You can have a hierarchy of different levels within your firm. This can be used for creating different business streams, regions, branches, teams or account managers. Each level is known as a Node in Seccl, and each Node will have an Id and a Name. In the future, we will have an API that facilitates the maintenance of nodes.

    Instrument

    Seccl will hold data for instruments that are available to your firm. We provide this as part of the service and will maintain the data daily which includes price updates. The instrument asset classes include equities, ETFs and Funds. APIs are provided to query this data.

    List instruments

    To list instruments, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/asset/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "id": "286D7",
                "type": "Asset",
                "firmId": "FIRM1",
                "isin": "GB00B2PDGW16",
                "shortName": "WH SMITH PLC",
                "longName": "WH Smith PLC",
                "instrumentType": "Equity",
                "currency": "GBP",
                "status": "Active",
                "primaryMarket": true,
                "quoteUnit": 1,
                "ticker": "SMWH",
                "mic": "XLON",
                "classifications": [
                    {
                        "classificationType": "LSE Sector",
                        "value": "F25F"
                    },
                    {
                        "classificationType": "LSE Segment",
                        "value": "STMM"
                    }
                ],
                "priceDate": "2018-01-18T00:00:00.000Z",
                "bid": 23.07,
                "ask": 23.05,
                "mid": 23.06,
                "minimumTransferUnit": 1,
                "ocfEstimated": 1,
                "ocfCalculated": 1,
                "initialCharge": 1,
                "exitCharge": 1,
                "kiddDocumentUrl": "http://www.fundslibrary.co.uk/FundsLibrary.DataRetrieval/Documents.aspx" 
            }
        ]
    }
    

    Instruments available in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/asset/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the instrument. This should be used on any subsequent data where it is required
    type The type of instrument, e.g. Asset
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    isin The ISIN of the instrument
    shortName The short name of the instrument
    longName The long name of the instrument
    instrumentType The instrument type, e.g. Equity, ETF, Fund
    currency The listed currency of the instrument
    status The status of the instrument, e.g. Active, Suspended, Delisted
    primaryMarket Flag to state whether this listing is the primary market of the instrument
    quoteUnit The unit for which the instrument is priced.
    ticker The Ticker of the instrument
    mic The MIC code of the instrument to identify the market it is traded on
    classifications An array of instrument classifications
    classificationType - The classification type, such as LSE Sector, LSE Segment, IMA
    value - The classification value
    priceDate The latest price date
    bid The latest close of business bid price
    ask The latest close of business ask price
    mid The latest close of business mid price
    minimumTransferUnit The minimum unit that the instrument can be transferred in. Typically equities will be 1 for whole shares. Funds could be fractions of shares such as 0.0001
    ocfEstimated If the fund is less than 12 months of history for calculations, it's ongoing charges are estimated
    ocfCalculated Ongoing charges percentage as calculated by group
    initialCharge Initial charge for the fund
    exitCharge Exit charge for the fund
    kiddDocumentUrl Link to key investor information about the Fund/ETF

    List instruments with filter

    To list instruments with an Id or Name filter, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/asset/<firmId>?idOrName=<filter> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    It is also possible to filter the instruments available by search on various Id types or a name.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/asset/<firmId>?parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    Parameter Description
    idOrName Text to filter the search of an instrument. This can be all or part of an ISIN, Ticker, Instrument Name, MexId or the Seccl Id

    Response Data

    The response data is as described in the List instruments section

    List prices for an instrument

    To list prices for an instrument, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/price/<firmId>/<assetId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "id": "5b914b5f3c16c1975ad70a83",
                "assetId": "286D7",
                "insertDate": "2018-09-01T00:00:00.000Z",
                "priceDate": "2018-01-18T00:00:00.000Z",
                "bid": 23.07,
                "ask": 23.05,
                "mid": 23.06,
                "quoteUnit": 1,
                "minimumTransferUnit": 1
            }
        ]
    }
    

    Historical prices for an instrument can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/price/<firmId>/<assetId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    assetId The Seccl Id of the instrument that can be obtained from by listing instruments.

    Query Parameters

    Parameter Description
    dateFrom The from Close of Business (COB) date
    dateTo The to COB date

    Response Data

    This returns an array of the following data

    Field Description
    id The Seccl Id of the price.
    assetId The Seccl Id of the instrument
    insertDate The COB date
    priceDate The actual price date of the instrument on that day
    bid The latest bid price
    ask The latest ask price
    mid The latest mid price
    minimumTransferUnit The minimum unit that the instrument can be transferred in. Typically equities will be 1 for whole shares. Funds could be fractions of shares such as 0.0001
    quoteUnit The unit for which the instrument is priced.

    Client

    Looking after clients, their data and their hard-earned assets, is what Seccl's Digital Custody service is all about. This section details how to create, retrieve, list and make updates to your clients data on our service.

    Create client

    To create a client, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/client \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": ["0"],
            "clientType": "Individual",
            "title": "Miss",
            "firstName": "Selene",
            "surname": "Love",
            "gender": "Female",
            "currency": "GBP",
            "addressDetail": {
                "department": "Test",
                "flatNumber": "12",
                "buildingName": "Testing Tower",
                "buildingNumber": "1",
                "address1": "Manchester Road",
                "address2": "Doncaster",
                "country": "GB",
                "postCode": "DN11 6RJ"
            },
            "nationality": "GB",
            "language": "en",
            "email": "Selene.Love107@email.com",
            "mobile": {
              "number": "07777000000",
              "locale": "en-GB",
              "isMobile": true
            },
            "nationalInsuranceNo": "XB952013A",
            "dateOfBirth": "1972-10-01",
            "bankDetails": {
                "sortCode": "999999",
                "accountNumber": "99999999"
            },
            "taxDomicile": "GB",
            "termsAccepted": true,
            "marketingConsent": false
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    You can create clients in your firm via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/client

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId
    REQUIRED
    String Array The array of nodeIds the client is linked to
    clientType
    REQUIRED
    String The type of client. This is an individual
    title
    OPTIONAL
    String Title of the client, for instance, Miss, Mr, Dr, Mrs
    firstName
    REQUIRED
    String First name of the client
    middleName String Middle name of the client (if set)
    surname
    REQUIRED
    String Surname of the client
    gender
    OPTIONAL
    String Gender of the client
    addressDetail
    REQUIRED
    Object The address of the client
    department: Department name (if set)
    flatNumber - Flat number (if set)
    buildingName - Building name (if set)
    buildingNumber - Building number (if set)
    address1 - Address line 1
    address2 - Address line 2 (if set)
    address3 - Address line 3 (if set)
    address4 - Address line 4 (if set)
    address5 - Address line 5 (if set)
    country - Country of residence
    postCode - Postal code
    nationality
    REQUIRED
    String Nationality of the client
    language
    REQUIRED
    String Language of the client
    email
    REQUIRED
    String Email address of the client
    mobile
    REQUIRED
    Object Mobile number of the client
    number - The mobile number
    locale - Locale of the number, e.g. en-GB
    isMobile - Set to true
    phone Object Phone number of the client (if set)
    number - The phone number
    locale - Locale of the number, e.g. en-GB
    isMobile - Set to false
    currency
    REQUIRED
    String The main currency of the client. All portfolio level values will be shown in this currency
    nationalInsuranceNo
    REQUIRED
    String National insurance number of the client
    dateOfBirth
    REQUIRED
    DateString Client date of birth
    taxDomicile
    REQUIRED
    String Tax domicile of the client
    bankDetails Object The bank details associated to the client
    sortCode - The sort code
    accountNumber - The account number
    termsAccepted Boolean Flag showing whether the client has accepted terms and conditions
    termsAcceptedDate Date The date the client accepted terms and conditions
    status String Status of the client, can be Active, Suspended or Pending
    marketingConsent Boolean Flag showing whether the client agrees to receive marketing material

    Verify client email address

    To verify a client email address, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/FIRM1/adsliug342564blubdlfrew2347
    

    This command returns JSON structured as follows:

    {
        "data": {
            "emailVerified": true
        }
    }
    

    The VerifyEmail endpoint receives the put token, verifies the relevant client's details and updates the client where relevant

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/verifyemail/<firmId>/<passwordToken>

    Retrieve client

    To return a client, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
              "id": "00D8555",
              "firmId": "FIRM1",
              "nodeId": [
                  "0"
              ],
              "clientType": "Individual",
              "title": "Miss",
              "firstName": "Selene",
              "surname": "Love",
              "gender": "Female",
              "addressDetail": {
                  "department": "Test",
                  "flatNumber": "12",
                  "buildingName": "Testing Tower",
                  "buildingNumber": 1,
                  "address1": "Manchester Road",
                  "address2": "Harworth",
                  "address3": "Doncaster",
                  "country": "GB",
                  "postCode": "DN11 6RJ"
              },
              "nationality": "GB",
              "language": "en",
              "email": "Selene.Love107@email.com",
              "emailVerified": false,
              "mobile": {
                "number": "07777000000",
                "locale": "en-GB",
                "isMobile": true
              },
              "currency": "GBP",
              "nationalInsuranceNo": "XB952013A",
              "dateOfBirth": "1972-10-01",
              "taxDomicile": "GB",
              "termsAccepted": true,
              "status": "Pending",
              "nodeName": [
                  "Firm 1"
              ],
              "updateId": "5a38d230773b790001e2a5bc",
              "amlData": {
                  "checkDate": "2017-01-01T00:00:00.000Z",
                  "checkNode": [
                      "0"
                  ],
                  "checkResult": "clear",
                  "checks": [
                      "identity"
                  ]
              },
              "marketingConsent": false
        }
    }
    

    Clients in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the client. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId The array of nodeIds the client is linked to
    clientType The type of client. This can be an individual or corporate
    title Title of the client, for instance, Miss, Mr, Dr, Mrs
    firstName First name of the client
    middleName Middle name of the client (if set)
    surname Surname of the client
    gender Gender of the client
    addressDetail The address of the client
    department - Department name or number (if set)
    flatNumber - Flat number (if set)
    buildingName - Building name (if set)
    buildingNumber - Building number (if set)
    address1 - Address line 1
    address2 - Address line 2 (if set)
    address3 - Address line 3 (if set)
    address4 - Address line 4 (if set)
    address5 - Address line 5 (if set)
    country - Country of residence
    postCode - Postal code
    nationality Nationality of the client
    language Language of the client
    email Email address of the client
    emailVerified This will be true if the client has verified their email address with the correct token
    mobile Mobile number of the client
    number - The mobile number
    locale - Locale of the number, e.g. en-GB
    isMobile - Flag to show if it is a mobile number
    phone Phone number of the client (if set)
    number - The phone number
    locale - Locale of the number, e.g. en-GB
    isMobile - Flag to show if it is a mobile number
    currency The main currency of the client. All portfolio level values will be shown in this currency
    nationalInsuranceNo National insurance number of the client
    dateOfBirth Client date of birth
    taxDomicile Tax domicile of the client
    bankDetails The bank details associated to the client (if set)
    sortCode - The sort code
    accountNumber - The account number
    termsAccepted Flag showing whether the client has accepted terms and conditions
    status Status of the client, can be Active, Suspended or Pending
    nodeName An array of names of the nodes the client belongs to
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record
    amlData The result of the AML check on the client's data (populated after creation of the first account)
    checkDate - the date the check was triggered
    checkNode - the node under which the client is registered at the time of the AML check
    checkResult - the response from the check, can be clear, consider or undefined
    checks - The type of the check executed on the client
    marketingConsent Flag showing whether the client agrees to receive marketing material

    List clients

    To list clients, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/client/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Clients in your firm can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/client/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Response Data

    The response data is an array of items described in the Retrieve Client section

    List clients with filter

    To list clients with various parameters, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/client/<firmId>?surname=<surname>&postCode=<postCode> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/client/<firmId>?parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    firstName The first name of the client. All or part of the first name can be used
    surname The surname of the client. All or part of the surname can be used
    nationalInsuranceNo The national insurance number of the client
    postCode The post code of the client. All or part of the code can be used.

    Response Data

    The response data is an array of items described in the Retrieve client section

    Update client

    You can update clients in your firm via the API. Updates are made on specific elements of the client data, or the client as a whole. Some fields are restricted: firmId, currency, id etc.

    Update client fields

    Multiple fields can be updated at once in your firm via the API. Here's how:

    HTTP Request

    PATCH https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update client - Body Data

    To update a client, use this code:

    curl -X PATCH https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateId": "5bfe62b859685b7c11ccbda5",
            "name": "Steven",
            "bankDetails": {
                "sortCode": "222222"
            },
            "email": "steven@example.com",
            "nodeId": ["0", "1", "2"]
        }'
    
    Field Data Type Description
    updateId
    REQUIRED
    An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    The body of the request can be populated with client fields and/or nested fields.

    Update client address

    You can update a client's address in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update address - Body Data

    To update a client's address, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendAddress",
              "updateReason": "This client address has been updated",
              "updateData": {
                    "addressDetail": {
                        "department": "Test 2",
                        "flatNumber": "123",
                        "buildingName": "Testing Tower 2",
                        "buildingNumber": "2",
                        "address1": "Manchester Road",
                        "address2": "Harworth",
                        "address3": "Doncaster",
                        "country": "GB",
                        "postCode": "DN11 6RJ"
                    },
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendAddress
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    addressDetail
    REQUIRED
    Object The address of the client
    department: Department name
    flatNumber - Flat number
    buildingName - Building name
    buildingNumber - Building number
    address1 - Address line 1
    REQUIRED
    address2 - Address line 2
    address3 - Address line 3
    address4 - Address line 4
    address5 - Address line 5
    country - Country of residence
    REQUIRED
    postCode - Postal code
    REQUIRED

    Update client bank details

    You can update a client's bank details in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update bank details - Body Data

    To update a client's bank details, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendBank",
              "updateReason": "This client bank details have been updated",
              "updateData": {
                    "bankDetails": {
                        "sortCode": "012345",
                        "accountNumber": "01234567"
                        "debitPaymentMandate": true,
                        "debitPaymentMandateAgreementDate": "2019-01-18"
                    },
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendBank
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    bankDetails
    REQUIRED
    Object The bank details associated to the client
    sortCode - The sort code
    REQUIRED
    accountNumber - The account number
    REQUIRED
    debitPaymentMandate - The direct debit agreement
    OPTIONAL
    debitPaymentMandateAgreementDate - The direct debit agreement date
    OPTIONAL

    Update client email address

    You can update a client's email address in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update email - Body Data

    To update a client's email address, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendEmailAddress",
              "updateReason": "This client email has been updated",
              "updateData": {
                    "email": "Selene.Love888@email.com"
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendEmailAddress
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    email
    REQUIRED
    String Email address of the client

    Update client name

    You can update a client's name in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update name - Body Data

    To update a client's name, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendName",
              "updateReason": "This client name has been updated",
              "updateData": {
                    "name": {
                      "firstName": "Selene",
                      "surname": "Jones"
                    }
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendName
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    name
    REQUIRED
    Object The name details of the client
    title - The title of the client
    firstName - The first name of the client
    REQUIRED
    middleName - The middle names of the client
    surname - The surname of the client
    REQUIRED

    Update client mobile phone details

    You can update a client's mobile phone details in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update mobile number - Body Data

    To update a client's mobile number, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendMobileNumber",
              "updateReason": "This client mobile number has been updated",
              "updateData": {
                    "mobile": {
                      "number": "07777777666",
                      "locale": "en-GB",
                      "isMobile": true
                    }
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendMobileNumber
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    mobile
    REQUIRED
    Object The mobile details of the client
    number - The new phone number
    REQUIRED
    locale - The phone locale
    REQUIRED
    isMobile - The new flag
    REQUIRED

    Update client date of death

    You can update a client's date of death in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update date of death - Body Data

    To set a client's date of death, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "SetDateOfDeath",
              "updateReason": "The Client passed away",
              "updateData": {
                    "dateOfDeath": "2020-10-10"
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to SetDateOfDeath
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    dateOfDeath
    REQUIRED
    DateString The date of the client's death
    dateOfDeathConfirmation
    DateString The date when the client's death is confirmed

    Update client date of death confirmation

    You can update the confirmation of the client's death in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Update confirm a client's date of death - Body Data

    To confirm a client's date of death, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "SetDateOfDeathConfirmation",
              "updateReason": "The Client passed away confirmed",
              "updateData": {
                    "dateOfDeathConfirmation": "2020-10-11"
              }
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to SetDateOfDeathConfirmation
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    dateOfDeathConfirmation
    REQUIRED
    Date The date when the client's death is confirmed

    This will set whether the client is willing to receive marketing emails.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    To change client's marketing consent, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendMarketingConsent",
              "updateReason": "The Client marketing consent changed",
              "updateData": {
                    "marketingConsent": true
              }
          }'
    

    Body Data

    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendMarketingConsent
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    marketingConsent
    REQUIRED
    Boolean The status of client's marketing consent

    Resend email address verification

    Email and sms validation and verification is also handled by client updates.
    Email address verification tokens expire after 24 hours. If the token has expired, this client update will send a new one.
    This will reset the client's status to pending until the token is verified.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Resend an email address verification message - Body Data

    To send a new message to verify a client's email address, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendResendEmailVerification",
              "updateReason": "This client requested a new verification email"
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendResendEmailVerification
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field is not required for this type of request.

    Resend mobile phone verification message

    Email and sms validation and verification is also handled by client updates.
    Mobile phone number verification tokens expire after 10 minutes. If the token has expired, this client update will send a new one.
    This will reset the client's status to pending until the token is verified.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Resend a mobile phone verification message - Body Data

    To send a new message to verify a client's mobile phone number, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendMobileVerification",
              "updateReason": "This client requested a new verification message"
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendMobileVerification
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field is not required for this type of request.

    Resend sms verification token (2FA)

    Email and sms validation and verification is also handled by client updates.
    SMS verification tokens expire after 10 minutes. If the token has expired, this client update will send a new one.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Resend a verification token by sms - Body Data

    To send a new message to verify a client's mobile phone number, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendResendSmsVerification",
              "updateReason": "This client requested a new verification message"
          }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendResendSmsVerification
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field is not required for this type of request.

    Update client National Insurance Number

    You can update the National Insurance Number of the client if it's changed.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    To change client's National Insurance Number, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/client/<firmId>/<clientId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "updateAction": "AmendNationalInsuranceNo",
              "updateReason": "The Client changed the National Insurance Number",
              "updateData": {
                    "fromNationalInsuranceNo": "XB952013A",
                    "toNationalInsuranceNo": "AC952013B"
              }
          }'
    

    Body Data

    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendNationalInsuranceNo
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made
    updateData
    REQUIRED
    Object The new data. See below for details

    The updateData field will be populated as follows

    Field Data Type Description
    fromNationalInsuranceNo String The old national insurance number
    toNationalInsuranceNo
    REQUIRED
    String The updated national insurance number

    Account

    Clients can have one or more accounts. These can be linked to various product types that we support, such as ISAs, Pensions or just normal trading accounts.

    Create account

    To create an account, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/account \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": "0",
            "accountType": "Wrapper",
            "name": "My trading account",
            "status": "Active",
            "adviserCharge": 0.0125,
            "discretionaryManagementCharge": 0.004,
            "adviserTieredCharges": {
              "fromDate": "2019-01-01T00:00:00.000Z",
              "toDate": "2019-06-01T00:00:00.000Z",
              "minimumAmount": 100,
              "maximumAmount": 100000,
              "instrumentTypes": [
                "ETF",
                "Equity"
              ],
              "tiers": [{
                "fromAmount": 0,
                "toAmount": 50000,
                "amount": 100,
                "rate": 0.0012
              }]
            },
            "currency": "GBP",
            "clientId": "<client Id>",
            "wrapperDetail": {
              "wrapperType": "GIA",
              "discretionary": false,
              "assetAllocationId": "0004"
            }
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    To create an account with a regular investment, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/account \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": "0",
            "accountType": "Wrapper",
            "name": "My trading account",
            "status": "Active",
            "currency": "GBP",
            "clientId": "<client Id>",
            "wrapperDetail": {
              "wrapperType": "GIA"
            }
            "bankDetails": {
                "sortCode": "999999",
                "accountNumber": "99999999"
            },
            "recurringPayment": {
                "movementType": "In",
                "amount": 1000,
                "paymentDay": 7,
                "method": "Direct Debit",
                "autoInvest": true
            },
            "recurringOrders": {
                "movementType": "Invest",
                "investmentType": "Bespoke",
                "orderDay": 7,
                "details": [{
                    "assetId": "0000D1",
                    "amount": 500
                }]
            },
            "adviserTieredCharges": {
                "fromDate": "2019-01-01T00:00:00.000Z",
                "toDate": "2019-06-01T00:00:00.000Z",
                "minimumAmount": 100,
                "maximumAmount": 100000,
                "instrumentTypes": [
                  "ETF",
                  "Equity",
                  "Fund"
                ],
                "tiers": [{
                  "fromAmount": 0,
                  "toAmount": 50000,
                  "amount": 100
                }]
            },
          }'
    

    You can create accounts for your clients via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/account

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId
    REQUIRED
    String The nodeId the account is linked to. The client the account belongs to must also be linked to this node.
    accountType
    REQUIRED
    String The type of account. Use the value Wrapper here.
    name
    REQUIRED
    String The name of this account
    status String Status of the client, can be Active, Suspended or Pending
    adviserCharge Number Ongoing fee percentage
    discretionaryManagementCharge Number Ongoing fee percentage
    adviserTieredCharges Object Custom charge applied for the account
    fromDate - Date - The date the charges are applied
    toDate - Date - The date the charges are suspended
    minimumAmount - Number - Minimum amount of the account
    maximumAmount - Number - Maximum amount of the account
    instrumentTypes - Array - List of financial instruments included
    tiers REQUIRED - Array - The details of the tiered charge
    fromAmount - Number - The minimum amount the charge is being applied
    toAmount - Number - The maximum amount the charge is being applied
    amount - Number - The charge applied for the specified values
    rate - Fraction - The charge applied for the specified values
    currency
    REQUIRED
    String The currency of the account
    clientId
    REQUIRED
    String The Seccl Id of the client that the account belongs to
    wrapperDetail Object The wrapper details of the account
    wrapperType REQUIRED - The product type of the wrapper account, for instance GIA or ISA
    discretionary - Boolean - If the account is managed by a Discretionary Manager
    advised - Boolean - If the account is advised
    trust - Boolean - If the account is a trust
    assetAllocationId - String - The model linked to the account. This can be retrieved from model list
    bankDetails Object The bank details associated to the account. These details will override client level bank account details for payments for this account
    sortCode - The sort code
    accountNumber - The account number
    recurringPayment Object Details of a recurring payment set up for this account
    movementType - Direction of the payment, either In or Out
    amount - The recurring payment amount
    paymentDay - The day of the month the payment is taken
    method - The method of payment. This can be Direct Debit or Bank Transfer
    autoInvest - Set to true if incoming payment is to be automatically invested in current model or recurring orders
    recurringOrders Object Details of a recurring orders set up for this account
    movementType - Set to Invest
    investmentType - This determines whether the investment should be made into a model or a list of instruments. Set to Asset Allocation for a model or Bespoke for a list of instruments. For bespoke, the details field will become a required field. For asset allocation, a model must be linked to the account.
    orderDay - The day of the month the orders are created
    details - Array of data showing which instruments the investments will be made into. See below for details

    The recurringOrders.details field is populated with the following data and is required for Bespoke recurring orders:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list
    amount String The amount to be invested
    percentage String The percentage of available cash to be invested

    Retrieve account

    To return an account, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00D8516",
            "firmId": "FIRM1",
            "nodeId": "1",
            "accountType": "Wrapper",
            "name": "Selene Love Trading Account",
            "currency": "GBP",
            "status": "Active",
            "wrapperDetail": {
                "wrapperType": "GIA"
            },
            "clientId": "00D8555",
            "bankDetails": {
                "sortCode": "998978",
                "accountNumber": "60279696"
            },
            "recurringPayment": {
                "movementType": "In",
                "amount": 1440,
                "paymentDay": 7,
                "method": "Direct Debit"
            },
            "nodeName": "Strawberry",
            "clientName": "Selene Love",
            "updateId": "5a38d230773b790001e2a5be"
        }
    }
    

    Accounts in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the account. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId The array of nodeIds the account is linked to
    accountType The type of account. Use the value Wrapper here.
    name The name of this account
    status Status of the client, can be Active, Suspended or Pending
    adviserCharge This is where you apply an ongoing adviser charge percentage to be charged against the account
    discretionaryManagementCharge This is where you apply an ongoing Discretionary Fund Manager charge percentage to be charged against the account
    currency The currency of the account
    clientId The Seccl Id of the client that the account belongs to
    wrapperDetail The wrapper details of the account
    wrapperType - The product type of the wrapper account, for instance GIA or ISA

    assetAllocationId - The model linked to the account discretionary - The account is being managed by a Discretionary Fund Manager. bankDetails | The bank details associated to the account. These details will override client level bank account details for payments for this account | sortCode - The sort code | accountNumber - The account number recurringPayment | Details of a recurring payment set up for this account | movementType - Direction of the payment, either In or Out | amount - The recurring payment amount | paymentDay - The day of the month the payment is taken | method - The method of payment. This can be Direct Debit or Bank Transfer recurringOrders | The recurring order details associated to the account | movementType - Set to Invest | investmentType - Can be Bespoke or Asset Allocation | orderDay - The day of the month the orders are created | details - Array of data showing which instruments the investments will be made into. Includes AssetId and Amount or Percentage nodeName | The name of the nodes the account belongs to clientName | The name of the client at the time of account creation updateId | An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    List accounts

    To list accounts, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/account/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Accounts in your firm can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/account/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Response Data

    The response data is an array of items described in the Retrieve account section

    List accounts with filter

    To list accounts with various parameters, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/account/<firmId>?clientId=<clientId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/account/<firmId>?parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    name The name of the account. All or part of the name can be used
    clientId The clientId that an account belongs to

    Response Data

    The response data is an array of items described in the Retrieve account section

    Update account

    You can update accounts in your firm via the API. Updates are made on specific elements of the account data, or the account as a whole. Some fields are restricted: firmId, currency, clientId, clients, wrapperType.

    Update account fields

    Multiple fields can be updated at once in your firm via the API. Here's how:

    HTTP Request

    PATCH https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Update account - Body Data

    To update an account, use this code:

    curl -X PATCH https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateId": "5bfe62b859685b7c11ccbda5",
            "name": "New account name",
            "recurringPayment": {
                "paymentDay": 5,
                "amount": 999
            },
            "bankDetails": {
                "sortCode": "222222"
            }
        }'
    
    Field Data Type Description
    updateId
    REQUIRED
    An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    The body of the request can be populated with account fields and/or nested fields.

    Update account node

    An account's node can be updated in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Update node - Body Data

    To update the node of an account, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateAction": "AmendNode",
            "updateReason": "Account node updated",
            "updateData": {
                "nodeId": "0"
          }
        }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendNode
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field will be populated as follows

    Field Data Type Description
    nodeId
    REQUIRED
    String Number of the new account node

    Update account recurring payment

    An account's recurring payment can be updated in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Update recurring payment - Body Data

    To update the recurring payment of an account, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateAction": "AmendRecurringPayments",
            "updateReason": "Account payment updated",
            "updateData": {
                "recurringPayment": {
                    "movementType": "In",
                    "amount": 500.12,
                    "paymentDay": 25,
                    "method": "Direct Debit"
                }
          }
        }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to AmendRecurringPayments
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field will be populated as follows

    Field Data Type Description
    recurringPayment
    REQUIRED
    Object The new recurring payment details of the account
    movementType - The current payment movement type
    DEFAULT
    amount - The new payment amount
    REQUIRED
    paymentDay - The new day of the month that payments should be made
    REQUIRED
    method - The current payment method
    DEFAULT

    Cancel account recurring payment

    An account's recurring payment can be cancelled in your firm via the API. Here's how:

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Cancel recurring payment - Body Data

    To cancel the recurring payment of an account, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/account/<firmId>/<accountId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateAction": "CancelRecurringPayment",
            "updateReason": "Account payment cancelled",
            "updateData": {
                "cancelledRecurringPayment": {
                    "movementType": "In",
                    "amount": 500.12,
                    "paymentDay": 25,
                    "method": "Direct Debit"
                }
          }
        }'
    
    Field Data Type Description
    updateAction
    REQUIRED
    String The update type. Set to CancelRecurringPayment
    updateReason
    REQUIRED
    String Free format narrative for the reason the update is made

    The updateData field will be populated as follows

    Field Data Type Description
    cancelledRecurringPayment
    REQUIRED
    Object The new recurring payment details of the account
    movementType - The current payment movement type
    DEFAULT
    amount - The new payment amount
    REQUIRED
    paymentDay - The new day of the month that payments should be made
    REQUIRED
    method - The current payment method
    DEFAULT

    Retrieve Account Summary

    To return a client's account summary, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/account/summary/<firmId>/<accountId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "00D8516",
        "firmId": "FIRM1",
        "name": "Selene Love Trading Account",
        "currency": "GBP",
        "accountType": "Wrapper",
        "wrapperType": "GIA",
        "status": "Active",
        "positions": [
          {
            "id": "00D8516|C|GBP",
            "positionType": "Cash",
            "currency": "GBP",
            "currentValue": 9502.40,
            "openingValue": 0,
            "growth": 0,
            "growthPercent": 0,
            "allocation": 0.9498
          },
          {
            "id": "00D8516|S|GB00B019KW72",
            "positionType": "Stock",
            "isin": "GB00B019KW72",
            "assetId": "284JP",
            "assetName": "J Sainsbury PLC",
            "quantity": 200,
            "bookValue": 497.60,
            "openingValue": 0,
            "currentValue": 501.80,
            "growth": 4.20,
            "currency": "GBP",
            "growthPercent": 0.0084,
            "currentPrice": 2.509,
            "currentPriceDate": "2018-02-16T00:00:00.000Z",
            "minimumTransferUnit": 1,
            "allocation": 0.0502
          }
        ],
        "bookValue": 10000.00,
        "openingValue": 0,
        "currentValue": 10004.20,
        "uninvestedCash": 9502.40,
        "growth": 4.20,
        "growthPercent": 0.0004
      }
    }
    

    The summary of an account's assets for a client in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/account/summary/<firmId>/<accountId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the account
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name The name of the account
    currency The main currency of the account. All account level values will be in this currency
    accountType The type of account. This will be Wrapper or Client Cash
    wrapperType For accounts that have a type of Wrapper this will be the tax wrapper type, for instance GIA or ISA
    status Status of the client, can be Active, Suspended or Pending
    positions An array of cash and stock positions held in the account (see below)
    bookValue The overall book value of the account
    openingValue The opening value of the account
    currentValue The current value of the account at the latest prices
    uninvestedCash The total amount of uninvested cash in the account. This can be used for further trading
    growth The monetary growth of the account
    growthPercent The percentage growth of the account

    Cash Position

    Field Description
    id The Seccl Id of the position
    positionType The type of the position. This will be set to Cash
    currency The currency of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    allocation The value of the position as a percentage of the total value of all positions

    Stock Position

    Field Description
    id The Seccl Id of the position
    positionType The type of the position. This will be set to Stock
    isin The ISIN of the instrument of the position
    assetId The Seccl Id of the instrument of the position
    assetName The name of the instrument of the position
    currency The currency of the position
    quantity The quantity or units held
    bookValue The book value of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    currentPrice The current price of the position. This will use the sell price if available, otherwise the mid price
    currentPriceDate The date of the latest price
    minimumTransferUnit The minimum unit that the instrument can be traded in
    allocation The value of the position as a percentage of the total value of all positions

    Retrieve Account Report

    To return a client's account report, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/account/report/<firmId>/<accountId>?type=Report&fromDate=2000-01-01T00:00:00Z&toDate=2000-01-02T00:00:00Z \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00D854B",
            "name": "GIA",
            "firmId": "FIRM1",
            "currency": "GBP",
            "accountType": "Wrapper",
            "wrapperType": "GIA",
            "payments": {
                "transactionsIn": [{
                    "transactionId": "0000003B4",
                    "transactionCode": "CPIN",
                    "narrative": "Client Payment",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "transactionsOut": [{
                    "transactionId": "0000003B5",
                    "transactionCode": "CPOU",
                    "narrative": "Client Payment",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "totalIn": 0,
                "totalOut": 0
            },
            "charges": {
                "transactions": [{
                    "transactionId": "0000003B6",
                    "transactionCode": "PFOF",
                    "narrative": "Platform fee",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "total": 0
            },
            "income": {
                "transactions": [{
                    "transactionId": "0000003B7",
                    "transactionCode": "CDIV",
                    "narrative": "Dividend",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "total": 0
            },
            "transfers": {
                "transactionsIn": [
                    {
                        "transactionId": "0000023Q2",
                        "transactionCode": "MGSI",
                        "narrative": "Stock Transfer",
                        "postDate": "2018-10-09T12:16:05.234Z",
                        "valueDate": "2018-10-09T12:16:01.570Z",
                        "reversal": null,
                        "quantity": 200.01,
                        "bookValue": 777.66,
                        "profitLoss": 0
                    },
                    {
                        "transactionId": "0000023Q1",
                        "transactionCode": "MGCI",
                        "narrative": "Cash Transfer",
                        "postDate": "2018-10-09T12:17:53.420Z",
                        "valueDate": "2018-06-14T07:46:29.166Z",
                        "reversal": null,
                        "amount": 555.44
                    },
                    {
                        "transactionId": "0000023PQ",
                        "transactionCode": "MGCI",
                        "narrative": "Cash Transfer",
                        "postDate": "2018-10-09T12:19:02.613Z",
                        "valueDate": "2018-06-14T07:46:29.166Z",
                        "reversal": null,
                        "amount": 555.44
                    }
                ],
                "transactionsOut": [],
                "totalIn": 1888.54,
                "totalOut": 0
            },
            "internalTransfers": {
                "transactionsIn": [
                    {
                        "transactionId": "0000023Q9",
                        "transactionCode": "ACST",
                        "narrative": "Internal Transfer In",
                        "valueDate": "2018-10-09T12:16:01.570Z",
                        "amount": 100.00
                    }
                ],
                "transactionsOut": [
                    {
                        "transactionId": "0000023Q0",
                        "transactionCode": "ACST",
                        "narrative": "Internal Transfer Out",
                        "valueDate": "2018-06-14T07:46:29.166Z",
                        "amount": -100.00
                    }
                ],
                "totalIn": 100.00,
                "totalOut": -100.00
            },
            "performance": {
                "transactionsRealised": [
                  {
                    "transactionId": "0000003B8",
                    "transactionCode": "SELL",
                    "narrative": "Sell of 100 units",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "quantity": 100
                  }
                ],
                "positionsRetained": [
                    {
                        "isin": "GB00B019KW72",
                        "assetName": "J Sainsbury PLC",
                        "quantity": 20,
                        "bookValue": 49.76,
                        "currentValue": 50.18,
                        "growth": 0.42
                    },
                    {
                        "isin": "GB00B2PDGW16",
                        "assetName": "WH Smith PLC",
                        "quantity": -789,
                        "bookValue": -18487.19,
                        "currentValue": -18186.45,
                        "growth": 300.74
                    },
                    {
                        "isin": "LU0292097747",
                        "assetName": "db x-trackers FTSE All-Share UCITS ETF DR",
                        "quantity": -1447,
                        "bookValue": -5669.45,
                        "currentValue": -6024.58,
                        "growth": -355.13
                    },
                    {
                        "isin": "GB00B1VZ0M25",
                        "assetName": "Hargreaves Lansdown PLC",
                        "quantity": -1244,
                        "bookValue": -25048.44,
                        "currentValue": -25048.44,
                        "growth": 0
                    },
                    {
                        "isin": "IE00B0M63730",
                        "assetName": "iShares MSCI AC Far East ex-Japan UCITS ETF",
                        "quantity": -5,
                        "bookValue": -219.04,
                        "currentValue": -212.8,
                        "growth": 6.24
                    },
                    {
                        "isin": "IE00B14X4M10",
                        "assetName": "iShares MSCI North America UCITS ETF",
                        "quantity": 20,
                        "bookValue": -747.28,
                        "currentValue": 734.4,
                        "growth": 1481.68
                    },
                    {
                        "isin": "LU0292107645",
                        "assetName": "db x-trackers MSCI Emerging Markets Index UCITS ETF",
                        "quantity": 104,
                        "bookValue": 3927.46,
                        "currentValue": 3406,
                        "growth": -521.46
                    },
                    {
                        "isin": "IE00B42WWV65",
                        "assetName": "Vanguard UK Government Bond UCITS ETF",
                        "quantity": 21,
                        "bookValue": 494.97,
                        "currentValue": 469.56,
                        "growth": -25.41
                    },
                    {
                        "isin": "GB00B5YKQK23",
                        "assetName": "BlackRock UK D Acc",
                        "quantity": 25.0281,
                        "bookValue": 100,
                        "currentValue": 104.19,
                        "growth": 4.19
                    }
                ],
                "totalRealised": 100,
                "totalRetained": 891.27
            },
            "openingValue": 0,
            "closingValue": 155068.91
        }
    }
    

    The account report shows activity on the specified account within a particular time period.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/account/report/<firmId>/<accountId>?type=Report&fromDate=2000-01-01T00:00:00Z&toDate=2000-01-02T00:00:00Z

    URL Query Options

    Query Description
    type=Report Return a full report
    fromDate ISO formatted datetime from which to calculate the report data
    toDate ISO formatted datetime to calculate the data before and not including

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the client
    firmId The firm Id we have created for you. It is used to segregate your data in a differ
    name The name of the client
    currency The main currency of the client. All portfolio level values will be in this currency
    accountType The type of account. This will be Wrapper or Client Cash
    wrapperType For accounts that have a type of Wrapper this will be the tax wrapper type, for instance GIA or ISA
    openingValue The opening value of the account
    closingValue The closing value of the account
    payments Cash transactions received or paid out for the account during the period
    charges Charges paid out from the account during the period
    income Transactions showing income received during the period
    transfers Transactions showing transfers in and out during the period
    internalTransfers Transactions showing transfers in and out between accounts during the period
    performance Realised and unrealised transactions for the account during the period
    Field Data Type Description
    cancelledRecurringPayment
    REQUIRED
    Object The new recurring payment details of the account
    movementType - The payment movement type
    REQUIRED
    amount - The payment amount
    REQUIRED
    paymentDay - The day of the month that payments should be made
    REQUIRED
    method - The payment method
    REQUIRED

    Payment

    Payments are made to and from accounts in Seccl.

    Bank transfer in

    To create a payment to an account, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "firmId": "FIRM1",
              "accountId": "<account Id>",
              "transactionType": "Payment",
              "transactionSubType": "Deposit",
              "movementType": "In",
              "currency": "GBP",
              "amount": 1000,
              "method": "Bank Transfer"
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    Bank transfer out

    To create a withdrawal from an account, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "firmId": "FIRM1",
              "accountId": "<account Id>",
              "transactionType": "Payment",
              "transactionSubType": "Withdrawal",
              "movementType": "Out",
              "currency": "GBP",
              "amount": 1000,
              "method": "BACS Credit"
          }'
    

    You can create payments via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransaction

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account the payment is made on
    transactionType
    REQUIRED
    String Set to Payment
    transactionSubType
    REQUIRED
    String The type of payment. This can be Deposit or Withdrawal
    movementType
    REQUIRED
    String The direction of the payment. This can be In or Out
    currency
    REQUIRED
    String The currency of the payment
    amount
    REQUIRED
    Number The payment amount
    method
    REQUIRED
    String The method of the payment. This can be Direct Debit or Bank Transfer for payments in. For Withdrawal the method has to be 'BACS Credit'.
    transactionDate Date The date of the transaction

    Retrieve payment

    To get a single payment, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>/<paymentId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "0000003B4",
            "firmId": "FIRM1",
            "transactionType": "Payment",
            "transactionSubType": "Deposit",
            "movementType": "In",
            "accountId": "00D8516",
            "currency": "GBP",
            "amount": 100000,
            "method": "Bank Transfer",
            "accountName": "Selene Love Trading Account",
            "accountType": "Wrapper",
            "transactionDate": "2018-01-16T00:00:00.000Z",
            "status": "Completed",
            "nodeId": "1",
            "statusChanges": [
                {
                    "status": "Pending",
                    "statusDate": "2018-01-16T11:52:31.959Z",
                    "description": "Payment request created"
                },
                {
                    "status": "Completed",
                    "statusDate": "2018-01-16T11:53:19.858Z",
                    "description": "Payment received"
                }
            ],
            "updateId": "5a5de7b0c8c064000149e92e"
        }
    }
    

    Payments can be returned individually from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>/<paymentId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    paymentId The Seccl Id of the payment

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the transaction.
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    transactionType The transaction type. This will be set to Payment
    transactionSubType The type of payment. This can be Deposit or Withdrawal
    movementType The direction of the payment. This will be In or Out
    accountId The Seccl account Id the payment is made for
    currency The currency of the account
    amount The amount of the payment
    method The method of the payment. This will be Direct Debit or Bank Transfer for payments in and for Withdrawal the method will be 'BACS Credit'.
    accountName The name of the account the payment is made for
    accountType The type of the account the payment is made for
    transactionDate The transaction date of the payment
    status The current status of the payment
    nodeId The nodeId the transaction is linked to. The account it belongs to must also be linked to this node.
    investToModel Boolean flag for group payments in to be divided across a model's allocations
    statusChanges An array of status changes the payment has had. Each record will include the following fields
    status - The status of payment
    statusDate - The date of the status change
    description - The description of the change
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    List payments

    To list payments, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Payment \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "id": "0000003B4",
                "firmId": "FIRM1",
                "transactionType": "Payment",
                "transactionSubType": "Deposit",
                "movementType": "In",
                "accountId": "00D8516",
                "currency": "GBP",
                "amount": 100000,
                "method": "Bank Transfer",
                "accountName": "Selene Love Trading Account",
                "accountType": "Wrapper",
                "transactionDate": "2018-01-16T00:00:00.000Z",
                "status": "Completed",
                "nodeId": "1",
                "statusChanges": [
                    {
                        "status": "Pending",
                        "statusDate": "2018-01-16T11:52:31.959Z",
                        "description": "Payment request created"
                    },
                    {
                        "status": "Completed",
                        "statusDate": "2018-01-16T11:53:19.858Z",
                        "description": "Payment received"
                    }
                ],
                "updateId": "5a5de7b0c8c064000149e92e"
            }
        ]
    }
    

    Payments can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Payment

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    transactionType This must be set to Payment
    accountId The accountId that the payments are made on
    transactionDateFrom The transaction date from (inclusive)
    transactionDateTo The transaction date to (inclusive)
    currency The currency of the payments
    amount The amount of the payment
    incomplete Flag to return incomplete payments, that is, those that have not cleared. Set to true if required

    Response Data

    The response data is an array of items described in the Retrieve payment section

    Order

    Orders are made for accounts in Seccl. This allows the purchase and withdrawal of different assets on the account.

    Create order

    To create an invest order for an account, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "firmId": "FIRM1",
              "accountId": "<account Id>",
              "transactionType": "Order",
              "transactionSubType": "At Best",
              "movementType": "Invest",
              "currency": "GBP",
              "amount": 1000,
              "assetId": "286Q5"
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    To create a sell order for an account, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "firmId": "FIRM1",
              "accountId": "<account Id>",
              "transactionType": "Order",
              "transactionSubType": "At Best",
              "movementType": "Sell",
              "currency": "GBP",
              "quantity": 234,
              "assetId": "286Q5"
          }'
    

    You can create orders via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransaction

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account the order is made for
    transactionType
    REQUIRED
    String Set to Order
    transactionSubType
    REQUIRED
    String The execution type of the order. This can be At Best or Limit
    movementType
    REQUIRED
    String The direction of the order. This can be Invest or Sell
    currency
    REQUIRED
    String The currency of the order amount
    amount Number The investment amount
    quantity Number The sell quantity
    transactionDate Date The date of the transaction
    assetId
    REQUIRED
    String The Seccl Id of the instrument to be invested into or sold. This Id can be found by listing the available instruments.
    limitPrice Number The limit price. To be set for Limit orders only
    limitExpiryType String The limit price expiry type.

    Retrieve order

    To get a single order, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>/<orderId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "0000003DC",
            "firmId": "FIRM1",
            "transactionType": "Order",
            "transactionSubType": "At Best",
            "movementType": "Invest",
            "accountId": "00D8516",
            "currency": "GBP",
            "amount": 250,
            "assetId": "286BB",
            "accountName": "Selene Love Trading Account",
            "accountType": "Wrapper",
            "transactionDate": "2018-02-21T00:00:00.000Z",
            "status": "Completed",
            "nodeId": "1",
            "statusChanges": [
                {
                    "status": "Pending",
                    "statusDate": "2018-02-21T13:13:30.204Z",
                    "description": "Order request created"
                },
                {
                    "status": "Completed",
                    "statusDate": "2018-02-21T13:13:44.599Z",
                    "description": "Order executed"
                }
            ],
            "assetName": "iShares MSCI AC Far East ex-Japan UCITS ETF",
            "isin": "IE00B0M63730",
            "ticker": "IFFF",
            "mic": "XLON",
            "instrumentType": "ETF",
            "intendedSettlementDate": "2018-02-23T00:00:00.000Z",
            "updateId": "5a8d70888bf1640001726e4b"
        }
    }
    

    Orders can be returned individually from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>/<orderId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    orderId The Seccl Id of the order

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the transaction.
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    transactionType The transaction type. This will be set to Order
    transactionSubType The type of order. This can be At Best or Limit
    movementType The direction of the order. This will be Invest or Sell
    accountId The Seccl account Id the order is made for
    currency The currency of the account
    amount The investment amount of the order
    quantity The quantity of the order
    assetId The Seccl Id of the instrument to be invested into or sold. This Id can be found by listing the available instruments.
    accountName The name of the account the order is made for
    accountType The type of the account the order is made for
    transactionDate The transaction date of the order
    status The current status of the order
    nodeId The nodeId the transaction is linked to. The account it belongs to must also be linked to this node.
    statusChanges An array of status changes the order has had. Each record will include the following fields
    status - The status of order
    statusDate - The date of the status change
    description - The description of the change
    assetName The name of the instrument to be invested into or sold
    isin The ISIN of the instrument to be invested into or sold
    ticker The Ticker of the instrument to be invested into or sold
    mic The MIC of the instrument to be invested into or sold
    instrumentType The type of the instrument to be invested into or sold. This can be Equity, ETF or Fund
    intendedSettlementDate The intended settlement date of the order
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    List orders

    To list orders, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Order \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "id": "0000003DC",
                "firmId": "FIRM1",
                "transactionType": "Order",
                "transactionSubType": "At Best",
                "movementType": "Invest",
                "accountId": "00D8516",
                "currency": "GBP",
                "amount": 250,
                "assetId": "286BB",
                "accountName": "Selene Love Trading Account",
                "accountType": "Wrapper",
                "transactionDate": "2018-02-21T00:00:00.000Z",
                "status": "Completed",
                "nodeId": "1",
                "statusChanges": [
                    {
                        "status": "Pending",
                        "statusDate": "2018-02-21T13:13:30.204Z",
                        "description": "Order request created"
                    },
                    {
                        "status": "Completed",
                        "statusDate": "2018-02-21T13:13:44.599Z",
                        "description": "Order executed"
                    }
                ],
                "assetName": "iShares MSCI AC Far East ex-Japan UCITS ETF",
                "isin": "IE00B0M63730",
                "ticker": "IFFF",
                "mic": "XLON",
                "instrumentType": "ETF",
                "intendedSettlementDate": "2018-02-23T00:00:00.000Z",
                "updateId": "5a8d70888bf1640001726e4b"
            }
        ]
    }
    

    Orders can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Order

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    transactionType This must be set to Order
    accountId The accountId that the orders are made for
    transactionDateFrom The transaction date from (inclusive)
    transactionDateTo The transaction date to (inclusive)
    incomplete Flag to return incomplete orders, that is, those that have not been executed in the market. Set to true if required

    Response Data

    The response data is an array of items described in the Retrieve order section

    Cash

    Cash movements are made to and from accounts in Seccl.

    Create cash transaction

    To create an internal transaction, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
              "firmId": "FIRM1",
              "accountId": "<account Id>",
              "transactionType": "Cash",
              "transactionSubType": "Platform Fee",
              "movementType": "Out",
              "currency": "GBP",
              "amount": 500.00
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    You can create cash transactions via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransaction

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account the transaction is made on
    transactionType
    REQUIRED
    String Set to Cash
    transactionSubType
    REQUIRED
    String The type of transaction. This can be Ex Gratia Payment, Platform Fee, Interest, Dividend, Equalisation, Fractional Payment or Redemption
    movementType
    REQUIRED
    String The direction of the transaction. This can be In or Out
    currency
    REQUIRED
    String The currency of the transaction
    amount
    REQUIRED
    Number The transaction amount

    List cash transactions

    To list cash transactions, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Cash \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "id": "0000003B4",
                "firmId": "FIRM1",
                "transactionType": "Cash",
                "transactionSubType": "Platform Fee",
                "movementType": "Out",
                "accountId": "00D8516",
                "currency": "GBP",
                "amount": 500,
                "accountName": "Selene Love Trading Account",
                "accountType": "Wrapper",
                "transactionDate": "2018-01-16T00:00:00.000Z",
                "status": "Completed",
                "nodeId": "1",
                "externalCounterpartyAccountId": "Firm-1",
                "externalCounterpartyFirmId": "Firm",
                "statusChanges": [
                    {
                        "status": "Completed",
                        "statusDate": "2018-01-16T11:52:31.959Z",
                        "description": "Cash request created"
                    }
                ],
                "updateId": "5a5de7b0c8c064000149e92e"
            }
        ]
    }
    

    Cash transactions can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?transactionType=Cash

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    transactionType This must be set to Cash
    accountId The accountId that the transactions are made on
    transactionDate The transaction date of the transactions
    transactionDateFrom The transaction date from (inclusive)
    transactionDateTo The transaction date to (inclusive)
    currency The currency of the transactions
    amount The amount of the transactions
    incomplete Flag to return incomplete transactions, that is, those that have not cleared. Set to true if required

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the transaction.
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    transactionType The transaction type. This will be set to Cash
    transactionSubType The type of transaction. This can be Ex Gratia Payment, Platform Fee, Interest, Dividend, Equalisation, Fractional Payment or Redemption
    movementType The direction of the transaction. This will be In or Out
    accountId The Seccl account Id the transaction is made for
    currency The currency of the account
    amount The amount of the transaction
    transactionDate The transaction date
    status The current status of the transaction. this will be Completed for Cash transactions
    accountName The name of the account the transaction is made for
    accountType The type of the account the transaction is made for
    nodeId The nodeId the transaction is linked to. The account it belongs to must also be linked to this node.
    externalCounterpartyAccountId The counter party's firm id - node id
    externalCounterpartyFirmId The counter party's node id
    statusChanges An array of status changes the transaction has had. Each record will include the following fields
    status - The status of transaction
    statusDate - The date of the status change
    description - The description of the change
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    Transaction Group

    A portfolio transaction group allows you to combine payments and orders to be executed as a group.

    Create a group

    Pay in and Buy example

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "accountId": "<accountId>",
            "transactions": [
              {
                "firmId": "FIRM1",
                "accountId": "<accountId>",
                "transactionType": "Payment",
                "transactionSubType": "Deposit",
                "movementType": "In",
                "currency": "GBP",
                "amount": 1000,
                "method": "Bank Transfer"
              },
              {
                "firmId": "FIRM1",
                "accountId": "<accountId>",
                "transactionType": "Order",
                "transactionSubType": "At Best",
                "movementType": "Invest",
                "currency": "GBP",
                "amount": 1000,
                "assetId": "286Q5"
              }
            ]
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account the order is made for. This must match with all account ids across the transactions.
    transactions
    REQUIRED
    Array An array including orders and payments

    Transactions

    A POST request will respond with the newly created id for the transaction group. The transactions themselves will be queued in the background. This means that there is potential for them to fail. See List Transactions in a Group section for help with this.

    There are a few rules and restrictions to the transactions that are given.

    Switch Transaction Group

    Instruct a Buy as a percentage of Sells

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
           "firmId": "FIRM1",
           "accountId": "<accountId>",
           "transactions": [
                {
                 "firmId": "FIRM1",
                 "transactionType": "Order",
                 "transactionSubType": "At Best",
                 "movementType": "Sell",
                 "accountId": "<accountId>",
                 "currency": "GBP",
                 "assetId": "26NHB",
                 "quantity": 6397.953
               },
               {
                 "firmId": "FIRM1",
                 "transactionType": "Order",
                 "transactionSubType": "At Best",
                 "movementType": "Invest",
                 "accountId": "<accountId>",
                 "currency": "GBP",
                 "assetId": "284PF",
                 "percentage": 1
               }
           ]
        }'
    

    Each item in the transactions array can be an order. You can combine Sells and Buys so that the buys are a percentage of the sell amount.

    If the percentage does not add up to a whole (1) anything remaining will be added to the account's available cash.

    Pay and Fee Transaction Group

    Instruct a Fee once a payment has cleared.

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
             "firmId": "FIRM1",
             "accountId": "<accountId>",
             "transactions": [
                 {
                     "firmId": "FIRM1",
                     "transactionType": "Payment",
                     "transactionSubType": "Deposit",
                     "movementType": "In",
                     "accountId": "<accountId>",
                     "currency": "GBP",
                     "amount": 450,
                     "method": "Transfer"
                 },
                 {
                     "firmId": "FIRM1",
                     "transactionType": "Cash",
                     "transactionSubType": "Adviser Adhoc Fee",
                     "movementType": "Out",
                     "accountId": "<accountId>",
                     "currency": "GBP",
                     "amount": 100
                 }
             ]
          }'
    

    Each item in the transactions array can be an order, fee or a payment. You can combine Payments, Fees and Buys so that the fees and buys are instructed once the payments clear.
    A fee can have a transactionSubType of Adviser Adhoc Fee or Adviser Initial Fee.
    The fee amount will be deducted from the payment when it has cleared - before any invest amounts are calculated.

    Pay and Buy Transaction Group

    Instruct a Buy once a payment has cleared.

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
             "firmId": "FIRM1",
             "accountId": "<accountId>",
             "transactions": [
                 {
                     "firmId": "FIRM1",
                     "transactionType": "Payment",
                     "transactionSubType": "Deposit",
                     "movementType": "In",
                     "accountId": "<accountId>",
                     "currency": "GBP",
                     "amount": 450,
                     "method": "Transfer"
                 },
                 {
                   "firmId": "FIRM1",
                   "transactionType": "Order",
                   "transactionSubType": "At Best",
                   "movementType": "Invest",
                   "accountId": "<accountId>",
                   "currency": "GBP",
                   "assetId": "286D7",
                   "amount": 450
                 }
             ]
          }'
    

    Each item in the transactions array can be an order or a payment. You can combine Payments and Buys so that the buys are instructed once the payments clear.

    Sell and Withdraw Transaction Group

    Instruct a Withdrawal once a sell order has cleared.

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
             "firmId": "FIRM1",
             "accountId": "<accountId>",
             "transactions": [
                 {
                     "firmId": "FIRM1",
                     "transactionType": "Order",
                     "transactionSubType": "At Best",
                     "movementType": "Sell",
                     "accountId": "<accountId>",
                     "currency": "GBP",
                     "assetId": "26NHB",
                     "quantity": 6397.953
                 },
                 {
                     "firmId": "FIRM1",
                     "transactionType": "Payment",
                     "transactionSubType": "Withdrawal",
                     "movementType": "Out",
                     "accountId": "<accountId>",
                     "currency": "GBP",
                     "method": "BACS Credit"
                 }
             ]
          }'
    

    Each item in the transactions array can be a sell order or a payment out. You can combine multiple sells to increase the withdrawal value. As part of a sell/withdraw switch, the payment out does not need an amount - this will be calculated once the sells are completed.

    List Transactions in a Group

    List all transactions in a group

    curl -X GET https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>?linkId=<transactionGroupId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Response

    {
        "data": [
            {
                "id": "000001234",
                "firmId": "FIRM1",
                "accountId": "<accountId>",
                "transactionType": "Order",
                "transactionSubType": "At Best",
                "movementType": "Invest",
                "currency": "GBP",
                "amount": 450,
                "assetId": "286Q5",
                "status": "Waiting",
                "linkId": "<transactionGroupId>",
                "transactionDate": "2019-02-01T00:00:00.000Z",
                "intendedSettlementDate": "2019-02-05T00:00:00.000Z",
                "assetName": "db x-trackers FTSE All-Share UCITS ETF DR",
                "isin": "LU0292097747",
                "ticker": "XASX",
                "mic": "XLON",
                "instrumentType": "ETF",
                "statusChanges": [
                    {
                        "status": "Waiting",
                        "statusDate": "2019-02-01T14:43:15.726Z",
                        "description": "Order request created, waiting for transactions to complete"
                    }
                ],
                "nodeId": "0",
                "tradingChargeData": {
                    "instrumentTypes": [
                        "ETF",
                        "Equity"
                    ],
                    "tiers": [
                        {
                            "rate": 0.0004
                        }
                    ]
                },
                "createdDate": "2019-02-01T14:43:15.759Z",
                "updateId": "5c545b03469902c5938cb9e6"
            },
            {
                "id": "000001234",
                "firmId": "FIRM1",
                "accountId": "<accountId>",
                "transactionType": "Payment",
                "transactionSubType": "Deposit",
                "movementType": "In",
                "currency": "GBP",
                "amount": 450,
                "method": "Bank Transfer",
                "status": "Pending",
                "linkId": "<transactionGroupId>",
                "transactionDate": "2019-02-01T00:00:00.000Z",
                "accountName": "Blarn",
                "accountType": "Wrapper",
                "statusChanges": [
                    {
                        "status": "Pending",
                        "statusDate": "2019-02-01T14:43:15.842Z",
                        "description": "Payment request created"
                    }
                ],
                "nodeId": "0",
                "createdDate": "2019-02-01T14:43:17.837Z",
                "updateId": "5c545b0546990296d28cb9e7"
            }
        ],
        "meta": {
            "count": 2
        }
    }
    

    You can list the underlying transactions created by a group.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransaction/<firmId>/?linkId=<transactionGroupId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    linkId The transaction group id given when the group was created

    Response Data

    The response data is an array of transactions successfully added to the group.

    Portfolio

    This is the important bit! What assets your clients hold, and how are they performing. This section details how to analyse the portfolio of clients at various different levels.

    List portfolios

    To list portfolios, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfolio/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": [
            {
                "firmId": "FIRM1",
                "id": "00D8555",
                "name": "Miss Selene Love",
                "nodeId": ["0", "1"],
                "nodeName": ["Node 0", "Node 1"],
                "status": "Active",
                "currency": "GBP",
                "accounts": 1,
                "currentValue": 10004.20,
                "uninvestedCash": 9502.40,
                "growth": 4.20,
                "growthPercent": 0.0004
            }
        ]
    }
    

    Portfolios in your firm can be returned in bulk from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfolio/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the portfolio
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name The name of the portfolio
    nodeId The array of node ids of the portfolio
    nodeName The array of node names of the portfolio
    status The status of the portfolio
    currency The main currency of the portfolio. All portfolio level values will be in this currency
    accounts The number of accounts that make up the portfolio
    currentValue The current value of the portfolio at the latest prices
    uninvestedCash The total amount of uninvested cash in the portfolio. This can be used for further trading
    growth The monetary growth of the portfolio
    growthPercent The percentage growth of the portfolio

    List portfolios with filter

    To list portfolios with various parameters, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/portfolio/<firmId>?surname=<surname>&postCode=<postCode> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfolio/<firmId>?parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    firstName The first name of the client. All or part of the first name can be used
    surname The surname of the client. All or part of the surname can be used
    postCode The post code of the client. All or part of the code can be used.

    Response Data

    The response data is an array of items described in the List portfolios section

    Retrieve Portfolio Summary

    To return a client's portfolio, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfolio/summary/<firmId>/<id> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
      "data": {
        "firmId": "FIRM1",
        "id": "00D8555",
        "name": "Miss Selene Love",
        "nodeId": ["0", "1"],
        "nodeName": ["Node 0", "Node 1"],
        "status": "Active",
        "currency": "GBP",
        "accounts": [
          {
            "id": "00D8516",
            "name": "Selene Love Trading Account",
            "nodeId": "0",
            "nodeName": "Node 0",
            "status": "Active",
            "accountType": "Wrapper",
            "currency": "GBP",
            "wrapperType": "GIA",
            "bookValue": 10000,
            "openingValue": 0,
            "currentValue": 10004.20,
            "uninvestedCash": 9502.40,
            "growth": 4.20,
            "growthPercent": 0.0004,
            "allocation": 1,
            "recurringPayment": false,
            "assetAllocationId": "0000001D",
            "assetAllocationName": "The one true model"
          }
        ],
        "positions": [
          {
            "positionType": "Cash",
            "currency": "GBP",
            "currentValue": 9502.40,
            "openingValue": 0,
            "growth": 0,
            "growthPercent": 0,
            "allocation": 0.9498
          },
          {
            "positionType": "Stock",
            "isin": "GB00B019KW72",
            "assetId": "284JP",
            "assetName": "J Sainsbury PLC",
            "quantity": 200,
            "bookValue": 497.60,
            "openingValue": 0,
            "currentValue": 501.80,
            "growth": 4.20,
            "currency": "GBP",
            "growthPercent": 0.0084,
            "currentPrice": 2.509,
            "currentPriceDate": "2018-02-16T00:00:00.000Z",
            "minimumTransferUnit": 1,
            "allocation": 0.0502
          }
        ],
        "bookValue": 10000.00,
        "openingValue": 0,
        "currentValue": 10004.20,
        "uninvestedCash": 9502.40,
        "growth": 4.20,
        "growthPercent": 0.0004
      }
    }
    

    The portfolio summary for clients in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfolio/summary/<firmId>/<id>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    id The Seccl Id of the client.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the client
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name The name of the client
    nodeId The array of node ids of the client
    nodeName The array of node names of the client
    status The status of the client
    currency The main currency of the client. All portfolio level values will be in this currency
    accounts An array of accounts that the client owns
    id - The Seccl Id of the account
    name - The name of the account
    accountType - The type of account. This will be Wrapper or Client Cash
    currency - The currency of the account.
    wrapperType - For accounts that have a type of Wrapper this will be the tax wrapper type, for instance GIA or ISA
    bookValue - The overall book value of the account
    openingValue - The opening value of the account
    currentValue - The current value of the account at the latest prices
    uninvestedCash - The total amount of uninvested cash in the account. This can be used for further trading
    growth - The monetary growth of the account
    growthPercent - The percentage growth of the account
    allocation - The value of the account as a percentage of the total value of all accounts
    positions An array of cash and stock positions held by the client, aggregated across all accounts (see below)
    bookValue The overall book value of the portfolio
    openingValue The opening value of the portfolio
    currentValue The current value of the portfolio at the latest prices
    uninvestedCash The total amount of uninvested cash in the portfolio. This can be used for further trading
    growth The monetary growth of the portfolio
    growthPercent The percentage growth of the portfolio

    Cash Position

    Field Description
    positionType The type of the position. This will be set to Cash
    currency The currency of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    allocation The value of the position as a percentage of the total value of all positions

    Stock Position

    Field Description
    positionType The type of the position. This will be set to Stock
    isin The ISIN of the instrument of the position
    assetId The Seccl Id of the instrument of the position
    assetName The name of the instrument of the position
    currency The currency of the position
    quantity The quantity or units held
    bookValue The book value of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    currentPrice The current price of the position. This will use the sell price if available, otherwise the mid price
    currentPriceDate The date of the latest price
    minimumTransferUnit The minimum unit that the instrument can be traded in
    allocation The value of the position as a percentage of the total value of all positions

    Retrieve Cash Position

    To return a cash position summary, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/position/<firmId>/<positionId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "00D8516|C|GBP",
        "firmId": "FIRM1",
        "accountId": "00D8516",
        "accountType": "Wrapper",
        "positionType": "Cash",
        "currency": "GBP",
        "accountName": "Selene Love Trading Account",
        "transactions": [
          {
            "transactionId": "0000003B4",
            "transactionCode": "CPIN",
            "narrative": "Client Payment",
            "postDate": "2018-01-16T11:53:26.556Z",
            "valueDate": "2018-01-16T11:53:13.461Z",
            "amount": 10000
          },
          {
            "transactionId": "0000003B5",
            "transactionCode": "BUY",
            "narrative": "Buy 200 J Sainsbury PLC",
            "postDate": "2018-01-16T11:56:36.839Z",
            "valueDate": "2018-01-18T00:00:00.000Z",
            "amount": -497.60
          }
        ],
        "currentValue": 9502.4,
        "growth": 0,
        "growthPercent": 0,
        "openingValue": 0
      }
    }
    

    The summary of cash position can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/position/<firmId>/<positionId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    positionId The Seccl Id of the position. This can be obtained by retrieving the account summary

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the position
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account that holds the position
    accountName The name of the account that holds the position
    nodeId The node id of the account that holds the position
    nodeName The node name of the account that holds the position
    status The status of the account that holds the position
    currency The currency of the position.
    accountType The type of account. This will be Wrapper or Client Cash
    wrapperType For accounts that have a type of Wrapper this will be the tax wrapper type, for instance GIA or ISA
    positionType The type of the position. This will be set to Cash
    transactions An array of cash transactions that make up the position (see below)
    currency The currency of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    recurringPayment Whether a recurring payment exists on the account that holds the position
    assetAllocationId The id of the asset allocation (model) on the account that holds the position
    assetAllocationName The name of the asset allocation (model) on the account that holds the position

    The cash transaction data is as follows:

    Field Description
    transactionId The Seccl Id of the transaction
    transactionCode The transaction code
    narrative The narrative of the transaction
    postDate The date the transaction was posted
    valueDate The date the transaction has value, that is, when money moved between physical bank accounts
    amount The amount of the transaction

    Retrieve Stock Position

    To return a stock position summary, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/position/<firmId>/<positionId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "00D8516|S|GB00B019KW72",
        "firmId": "FIRM1",
        "accountId": "00D8516",
        "accountType": "Wrapper",
        "positionType": "Stock",
        "currency": "GBP",
        "isin": "GB00B019KW72",
        "accountName": "Selene Love Trading Account",
        "assetName": "J Sainsbury PLC",
        "assetId": "284JP",
        "transactions": [
          {
            "transactionId": "0000003B5",
            "transactionCode": "BUY",
            "narrative": "Buy 200 J Sainsbury PLC",
            "postDate": "2018-01-16T11:56:32.277Z",
            "valueDate": "2018-01-18T00:00:00.000Z",
            "quantity": 200,
            "value": 497.60,
            "bookValue": 497.60,
            "profitLoss": 0
          }
        ],
        "quantity": 200,
        "bookValue": 497.60,
        "growth": 4.20,
        "currentPrice": 2.509,
        "minimumTransferUnit": 1,
        "currentPriceDate": "2018-02-16T00:00:00.000Z",
        "currentValue": 501.80,
        "openingValue": 0,
        "growthPercent": 0.0084
      }
    }
    

    The summary of stock position can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/position/<firmId>/<positionId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    positionId The Seccl Id of the position. This can be obtained by retrieving the account summary

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the position
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId The Seccl Id of the account that holds the position
    accountName The name of the account that holds the position
    currency The currency of the position.
    accountType The type of account. This will be Wrapper for stock positions
    wrapperType For accounts that have a type of Wrapper this will be the tax wrapper type, for instance GIA or ISA
    positionType The type of the position. This will be set to Stock
    isin The ISIN of the instrument of the position
    assetId The Seccl Id of the instrument of the position
    assetName The name of the instrument of the position
    transactions An array of stock transactions that make up the position (see below)
    quantity The quantity or units held
    bookValue The book value of the position
    openingValue The opening value of the position
    currentValue The currency value of the position
    growth The monetary growth of the position
    growthPercent The percentage growth of the position
    currentPrice The current price of the position. This will use the sell price if available, otherwise the mid price
    currentPriceDate The date of the latest price
    minimumTransferUnit The minimum unit that the instrument can be traded in

    The stock transaction data is as follows:

    Field Description
    transactionId The Seccl Id of the transaction
    transactionCode The transaction code
    narrative The narrative of the transaction
    postDate The date the transaction was posted
    valueDate The date the transaction has value, that is, when stock changed ownership
    quantity The quantity of the transaction
    value The amount of money paid for the transaction
    bookValue The book value of the transaction
    profitLoss The realised profit or loss of the transaction. This will only be populated on sell or outward transactions

    Retrieve Portfolio Report

    To return a client's portfolio report, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/portfolio/report/<firmId>/<clientId>?type=Report&fromdate=2000-01-01T00:00:00Z&todate=2000-01-02T00:00:00Z \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00D8555",
            "name": "Miss Selene Love",
            "firmId": "FIRM1",
            "currency": "GBP",
            "payments": {
                "transactionsIn": [{
                    "transactionId": "0000003B4",
                    "transactionCode": "CPIN",
                    "narrative": "Client Payment",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "transactionsOut": [{
                    "transactionId": "0000003B5",
                    "transactionCode": "CPOU",
                    "narrative": "Client Payment",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "totalIn": 0,
                "totalOut": 0
            },
            "charges": {
                "transactions": [{
                    "transactionId": "0000003B6",
                    "transactionCode": "PFOF",
                    "narrative": "Platform fee",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "total": 0
            },
            "income": {
                "transactions": [{
                    "transactionId": "0000003B7",
                    "transactionCode": "CDIV",
                    "narrative": "Dividend",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "amount": 10000
                }],
                "total": 0
            },
            "performance": {
                "transactionsRealised": [
                  {
                    "transactionId": "0000003B8",
                    "transactionCode": "SELL",
                    "narrative": "Sell of 100 units",
                    "postDate": "2018-01-16T11:53:26.556Z",
                    "valueDate": "2018-01-16T11:53:13.461Z",
                    "quantity": 100
                  }
                ],
                "positionsRetained": [
                    {
                        "isin": "GB00B019KW72",
                        "assetName": "J Sainsbury PLC",
                        "quantity": 20,
                        "bookValue": 49.76,
                        "currentValue": 50.18,
                        "growth": 0.42
                    },
                    {
                        "isin": "GB00B2PDGW16",
                        "assetName": "WH Smith PLC",
                        "quantity": -789,
                        "bookValue": -18487.19,
                        "currentValue": -18186.45,
                        "growth": 300.74
                    },
                    {
                        "isin": "LU0292097747",
                        "assetName": "db x-trackers FTSE All-Share UCITS ETF DR",
                        "quantity": -1447,
                        "bookValue": -5669.45,
                        "currentValue": -6024.58,
                        "growth": -355.13
                    },
                    {
                        "isin": "GB00B1VZ0M25",
                        "assetName": "Hargreaves Lansdown PLC",
                        "quantity": -1244,
                        "bookValue": -25048.44,
                        "currentValue": -25048.44,
                        "growth": 0
                    },
                    {
                        "isin": "IE00B0M63730",
                        "assetName": "iShares MSCI AC Far East ex-Japan UCITS ETF",
                        "quantity": -5,
                        "bookValue": -219.04,
                        "currentValue": -212.8,
                        "growth": 6.24
                    },
                    {
                        "isin": "IE00B14X4M10",
                        "assetName": "iShares MSCI North America UCITS ETF",
                        "quantity": 20,
                        "bookValue": -747.28,
                        "currentValue": 734.4,
                        "growth": 1481.68
                    },
                    {
                        "isin": "LU0292107645",
                        "assetName": "db x-trackers MSCI Emerging Markets Index UCITS ETF",
                        "quantity": 104,
                        "bookValue": 3927.46,
                        "currentValue": 3406,
                        "growth": -521.46
                    },
                    {
                        "isin": "IE00B42WWV65",
                        "assetName": "Vanguard UK Government Bond UCITS ETF",
                        "quantity": 21,
                        "bookValue": 494.97,
                        "currentValue": 469.56,
                        "growth": -25.41
                    },
                    {
                        "isin": "GB00B5YKQK23",
                        "assetName": "BlackRock UK D Acc",
                        "quantity": 25.0281,
                        "bookValue": 100,
                        "currentValue": 104.19,
                        "growth": 4.19
                    }
                ],
                "totalRealised": 100,
                "totalRetained": 891.27
            },
            "openingValue": 0,
            "closingValue": 155068.91
        }
    }
    

    The portfolio report shows activity for the specified client within a particular time period.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/portfolio/report/<firmId>/<clientId>?type=Report&fromdate=2000-01-01T00:00:00Z&todate=2000-01-02T00:00:00Z

    URL Query Options

    Query Description
    type=Report Return a full report
    fromdate ISO formatted datetime from which to calculate the report data
    todate ISO formatted datetime to calculate the data before and not including

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the client
    firmId The firm Id we have created for you. It is used to segregate your data in a differ
    name The name of the client
    currency The main currency of the client. All portfolio level values will be in this currency
    openingValue The opening value of the portfolio
    closingValue The closing value of the portfolio
    payments Cash transactions received or paid out for any account the client has during the period
    charges Charges paid out from any client account during the period
    income Transactions showing income received during the period
    performance Realised and unrealised transactions for all client accounts during the period

    Model

    You can currently create a model portfolio. This will adjust the passed cash allocation after stock percentages are taken into account.

    Create Model

    To create a model, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/model/ \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '
      {
          "firmId": "FIRM1",
          "name": "Model 1",
          "suspendRebalances": false,
          "allocations": [
            {
              "assetId": "26MPM",
              "percentage": 0.333
            },
            {
              "assetId": "27HNC",
              "percentage": 0.444
            }
          ],
          "cashAllocation": 0.13,
          "productType": ["GIA", "ISA"],
          "vatable": true,
          "commentary": "This model has been created to make the investor one billion dollars in the space of one week",
          "aim": "To make one billion dollars",
          "riskRating": 1,
          "modelCharge": 0.025,
          "availableToNodeId": ["0"]
      }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00001"
        }
    }
    

    You can create an model via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/model/

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name
    REQUIRED
    String Your name for the model.
    suspendRebalances
    REQUIRED
    Boolean Whether this model should have rebalances suspended.
    allocations
    REQUIRED
    Array Array of data showing assets and the required allocation percentage. See below for details:
    cashAllocation
    REQUIRED
    Fraction The required cash allocation.
    productType
    REQUIRED
    Array The type of products the model can be use with, eg: "ISA", 'GIA' etc.
    vatable
    REQUIRED
    Boolean Whether VAT can be applied to the model.
    commentary
    String A summary or information about the model.
    aim
    String The aim of the model.
    riskRating
    Number The risk rating of the model on a scale of 1 - 10.
    modelCharge
    Fraction The charge percentage for the model.
    availableToNodeId Array Currently, this will limit which users have access to view, edit and assign the model. Future validation will use this field to limit which client accounts the model can be assigned to.

    The allocations field is an array populated with the following data:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list.
    percentage
    REQUIRED
    Fraction The amount to be allocated to this asset.

    Retrieve model

    To return a model, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/model/<firmId>/<modelId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00001",
            "firmId": "FIRM1",
            "name": "Model 1",
            "suspendRebalances": false,
            "aim": "To make one billion dollars",
            "riskRating": 5,
            "status": "Active",
            "statusReason": "Activated to enable users to invest using this model",
            "vatable": true,
            "commentary": "This model has been created to make the investor one billion dollars in the space of one week",
            "modelCharge": 0.025,
            "productType": [
                "ISA",
                "GIA"
            ],
            "cashAllocation": 0.223,
            "allocations": [
                {
                    "assetId": "26MQ9",
                    "assetName": "SCOT MUT NORTH AMERICAN INC",
                    "percentage": 0.333,
                    "status": "Active",
                    "currency": "GBP"
                },
                {
                    "assetId": "27HNC",
                    "assetName": "SAINSBURY (J) PLC",
                    "percentage": 0.444,
                    "status": "Active",
                    "currency": "EUR"
                }
            ],
            "availableToNodeId": ["0"],
            "availableToNodeName": ["Node 1"],
            "updateId": "5bfe62b859685b7c11ccbda5"
        }
    }
    

    Models in your firm can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/model/<firmId>/<modelId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    modelId The Seccl Id of the model.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the model. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name Name of the model
    aim Aim of the model
    suspendRebalances Whether this model should have rebalances suspended
    riskRating Risk rating of the model, a value between 1 and 10
    status Status of the model, will be Active, Suspended or Deleted
    statusReason The reason set for the status of the model
    vatable Whether vat can be applied to the model
    commentary Textual information about the model
    productType Product types the model can be applied to
    cashAllocation The percentage of the total allocated to cash
    allocations Information on each asset included in the model
    assetId - The Seccl Id of the asset
    assetName - The shortName of the asset
    percentage - The percentage of investment to be allocated to this asset
    status - The asset status
    currency - Currency of the asset
    availableToNodeId Currently, this will limit which users have access to view, edit and assign the model. Future validation will use this field to limit which client accounts the model can be assigned to.
    availableToNodeName An automatically generated field - the names of nodes in availableToNodeId.
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    List models

    To search for a model using a name parameter, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/model/<firmId>?name=<name>&productType=GIA&productType=ISA \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/model/<firmId>?parameter=<name>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    The following parameters can be used.

    Parameter Description
    name The name of the model. All or the first part of the name can be used
    productType The Product type(s) of the model. This can be one or many product types.

    Response Data

    The response data is an array of items described in the Get model section

    Update Model

    To update an existing model, use this code:

    curl -X PUT https://pfolio-api-staging.seccl.tech/model/<firmId>/<modelId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '
      {
          "id": "00001",
          "updateId": "5bfe62b859685b7c11ccbda5",
          "firmId": "FIRM1",
          "name": "Model 1",
          "suspendRebalances": false,
          "status": "Active",
          "statusReason": "Activated to enable users to invest using this model",
          "allocations": [
            {
              "assetId": "26MPM",
              "percentage": 0.333
            },
            {
              "assetId": "27HNC",
              "percentage": 0.444
            }
          ],
          "cashAllocation": 0.13,
          "productType": ["GIA", "ISA"],
          "vatable": true,
          "commentary": "This model has been created to make the investor one billion dollars in the space of one week",
          "aim": "To make one billion dollars",
          "riskRating": 1,
          "modelCharge": 0.025,
          "availableToNodeId": ["0", "1"]
      }'
    

    This command returns JSON structured as follows:

    {
        "data": {
        }
    }
    

    You can update a model via the API.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/model/<firmId>/<modelId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    modelId The Seccl Id of the model.

    Body Data

    Field Data Type Description
    id
    REQUIRED
    String The model Id we have created for you.
    updateId
    REQUIRED
    String The Id assigned to the record when it was last updated. This value should be sent with any update requests to the record
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name
    REQUIRED
    String Your name for the model.
    status
    REQUIRED
    String The status you wish to set the model to. This can be updated when later. It can be Active, Pending or Deleted.
    statusReason
    String The reason for the current model status.
    suspendRebalances
    REQUIRED
    Boolean Whether this model should have rebalances suspended.
    allocations
    REQUIRED
    Array Array of data showing assets and the required allocation percentage. See below for details:
    cashAllocation
    REQUIRED
    Fraction The required cash allocation.
    productType
    REQUIRED
    Array The type of products the model can be use with, eg: "ISA", 'GIA' etc.
    vatable
    REQUIRED
    Boolean Whether VAT can be applied to the model.
    commentary
    String A summary or information about the model.
    aim
    String The aim of the model.
    riskRating
    Number The risk rating of the model on a scale of 1 - 10.
    modelCharge
    Fraction The charge percentage for the model.
    availableToNodeId
    Array Currently, this will limit which users have access to view, edit and assign the model. Future validation will use this field to limit which client accounts the model can be assigned to.

    The allocations field is an array populated with the following data:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list.
    percentage
    REQUIRED
    Fraction The amount to be allocated to this asset.

    Retrieve model with prices

    To return a model with the latest prices for each allocation, use this code:

    curl -X GET https://pfolio-api-staging.seccl.tech/model/prices/<firmId>/<modelId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00001",
            "firmId": "FIRM1",
            "name": "Model 1",
            "suspendRebalances": false,
            "aim": "To make one billion dollars",
            "riskRating": 5,
            "status": "Active",
            "statusReason": "Activated to enable users to invest using this model",
            "vatable": true,
            "commentary": "This model has been created to make the investor one billion dollars in the space of one week",
            "modelCharge": 0.025,
            "productType": [
                "ISA",
                "GIA"
            ],
            "cashAllocation": 0.223,
            "allocations": [
                {
                    "assetId": "26MQ9",
                    "assetName": "SCOT MUT NORTH AMERICAN INC",
                    "percentage": 0.333,
                    "status": "Active",
                    "currency": "GBP",
                    "buyPrice": 12.75,
                    "sellPrice": 12.74
                },
                {
                    "assetId": "27HNC",
                    "assetName": "SAINSBURY (J) PLC",
                    "percentage": 0.444,
                    "status": "Active",
                    "currency": "GBP",
                    "buyPrice": 5.33,
                    "sellPrice": 5.30
                }
            ],
            "availableToNodeId": ["0"],
            "availableToNodeName": ["Node 1"],
            "updateId": "5bfe62b859685b7c11ccbda5"
        }
    }
    

    Models with the latest prices can be obtained from the API.

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/model/<firmId>/<modelId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    modelId The Seccl Id of the model.

    Response Data

    This returns the following data

    Field Description
    id The Seccl Id of the model. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    name Name of the model
    aim Aim of the model
    suspendRebalances Whether this model should have rebalances suspended
    riskRating Risk rating of the model, a value between 1 and 10
    status Status of the model, will be Active, Suspended or Deleted
    statusReason The reason set for the status of the model
    vatable Whether vat can be applied to the model
    commentary Textual information about the model
    productType Product types the model can be applied to
    cashAllocation The percentage of the total allocated to cash
    allocations Information on each asset included in the model
    assetId - The Seccl Id of the asset
    assetName - The shortName of the asset
    percentage - The percentage of investment to be allocated to this asset
    status - The asset status
    currency - Currency of the asset
    buyPrice - The current buy price of the asset
    sellPrice - The current sell price of the asset
    availableToNodeId Currently, this will limit which users have access to view, edit and assign the model. Future validation will use this field to limit which client accounts the model can be assigned to.
    availableToNodeName An automatically generated field - the names of nodes in availableToNodeId.
    updateId An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record

    Initiate Rebalance

    To initiate a rebalance for a particular model, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/event/ \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '
      {
          "firmId": "FIRM1",
          "eventType": "Rebalance",
          "assetAllocationId": "0000C"
          "confirmedDetails": {
            "confirmedCashAllocation": 0.223,
            "confirmedAllocations": [
              {
                  "assetId": "26MQ9",
                  "percentage": 0.333,
                  "currency": "GBP",
                  "buyPrice": 12.75,
                  "sellPrice": 12.74
              },
              {
                  "assetId": "27HNC",
                  "percentage": 0.444,
                  "currency": "GBP",
                  "buyPrice": 5.33,
                  "sellPrice": 5.30
              }
          ],
        }
      }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00001"
        }
    }
    

    You can initiate a rebalance of a model via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/event/

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    eventType
    REQUIRED
    String Set to Rebalance.
    assetAllocationId
    REQUIRED
    String The model to be rebalanced. This can be retrieved from model list.
    accountId String The account Id if a rebalance of a specific account is required. This can be retrieved from account list.
    confirmedDetails
    REQUIRED
    Object The confirmed details of the rebalance
    confirmedCashAllocation - Fraction - The confirmed cash allocation
    REQUIRED
    confirmedAllocations - Array - The confirmed allocations. See below for details
    REQUIRED

    The confirmedAllocations field is an array populated with the following data:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list.
    currency
    REQUIRED
    String The currency of the instrument to be traded.
    percentage
    REQUIRED
    Fraction The percentage to be allocated to this asset.
    buyPrice
    REQUIRED
    Number The confirmed buy price of the asset.
    sellPrice
    REQUIRED
    Number The confirmed sell price of the asset.

    Pay and Invest to Model

    You can make a payment in and invest it automatically to a model. This will be triggered by a group payment in with the investToModel flag set to true.

    Create a Pay and Invest payment in:

    To create a payment in to invest automatically to a model, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "accountId": "<accountId>",
            "transactions": [
              {
                "firmId": "FIRM1",
                "accountId": "<accountId>",
                "transactionType": "Payment",
                "transactionSubType": "Deposit",
                "movementType": "In",
                "currency": "GBP",
                "amount": 1000,
                "method": "Bank Transfer",
                "investToModel": true
              }
            ]
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00001"
        }
    }
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransactiongroup

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account the order is made for. This must match with all account ids across the transactions.
    transactions
    REQUIRED
    Array An array containing the single payment in

    Transactions

    A POST request will respond with the newly created id for the transaction group. The generated order transactions themselves will be queued in the background. This means that there is potential for them to fail. See List Transactions in a Group section for help with this.

    There are a few rules and restrictions to the transactions that are given.

    Account Cash Transfer

    Create transfer

    You can create cash transfers between accounts via the API, using this code:

    To create a payment between accounts, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/portfoliotransaction \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "accountId": "00D86B5",
            "transactionType": "Cash Transfer",
            "transactionSubType": "Internal",
            "destinationAccount": "00D8744",
            "amount": 1000,
            "currency": "GBP"
        }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/portfoliotransaction

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you.
    accountId
    REQUIRED
    String The Seccl Id of the account the payment is made FROM
    transactionType
    REQUIRED
    String Set to Cash Transfer
    transactionSubType
    REQUIRED
    String The type of payment. This must be Internal
    destinationAccount
    REQUIRED
    String The Seccl Id of the account the payment is made TO
    amount
    REQUIRED
    Number The transfer amount
    currency
    REQUIRED
    String The currency of the transfer

    Illustration

    You can currently create an illustration for a trade, or group of trades. This will calculate accumulated charges and growth over the specified period for the specified growth amount.

    Illustrate trade

    To create an illustration for a trade/set of trades, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/illustration/trade/ \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '
      {
          "firmId": "FIRM1",
          "accountId": "00D8516",
          "period": 60,
          "growthPercentage": 0.05,
          "illustrationType": "Trade",
          "periodType": "MONTHS",
          "transactions": [
              {
                  "assetId": "286D7",
                  "amount": 750,
                  "currency": "GBP"
              },
              {
                  "assetId": "286D8",
                  "amount": 750,
                  "currency": "GBP"
              }, {
                  "assetId": "286D9",
                  "amount": 750,
                  "currency": "GBP"
              }
          ]
      }'
    

    You can create an illustration for a trade/set of trades via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/illustration/trade/

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    accountId
    REQUIRED
    String The Seccl Id of the account.
    period
    REQUIRED
    String The number of periods the calculation should be based on. Maximum is 60.
    growthPercentage
    REQUIRED
    Fraction Required growth percentage
    illustrationType
    REQUIRED
    String The type of illustration. Can only be "Trade".
    periodType
    REQUIRED
    String The type of period. Can only be "MONTHS".
    transactions Array Array of data showing which trades the illustration will be based on. See below for details:

    The transactions field is populated with the following data:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list
    amount
    REQUIRED
    Number The amount to be invested
    currency
    REQUIRED
    String The currency of the instrument to be traded

    This command returns JSON structured as follows:

    {
        "data": {
            "firmId": "FIRM1",
            "accountId": "00D8516",
            "accountName": "Selene Love Trading Account",
            "currency": "GBP",
            "initialCharges": [
                {
                    "assetId": "286D7",
                    "assetName": "WH SMITH PLC",
                    "charges": [
                        {
                            "chargeType": "Initial",
                            "currency": "GBP",
                            "amount": 64.75
                        }
                    ],
                    "totalCharges": 64.75
                }
            ],
            "ongoingCharges": {
                  "portfolioCharges": [
                        {
                            "chargeType": "Platform",
                            "currency": "GBP",
                            "amount": 120
                        }
                  ],
                  "assetCharges": [
                        {
                            "assetId": "286D7",
                            "assetName": "WH SMITH PLC",
                            "charges": [
                                {
                                    "chargeType": "Initial",
                                    "currency": "GBP",
                                    "amount": 64.75
                                }
                            ],
                            "totalCharges": 64.75
                        }
                  ]
            },
            "calculationsAfterEachPeriod": [
                  {
                        "periodIndex": 1,
                        "currency": "GBP",
                        "openingAmount": 2176.5,
                        "growthAmount": 8.87,
                        "ongoingCharges": {
                              "portfolioCharges": [
                                    {
                                        "chargeType": "Platform",
                                        "currency": "GBP",
                                        "amount": 2
                                    }
                              ],
                              "assetCharges": [
                                    {
                                        "assetId": "286D7",
                                        "assetName": "WH SMITH PLC",
                                        "charges": [
                                            {
                                                "chargeType": "OCF",
                                                "currency": "GBP",
                                                "amount": 4.75
                                            }
                                        ],
                                        "totalCharges": 4.75
                                    }
                              ]
                        },
                        "totalCharges": 6.75,
                        "closingAmount": 2178.62
                  }
            ],
            "investmentAmount": 2250,
            "finalAmount": 2116.39,
            "totalInitialCharges": 73.5,
            "totalOngoingCharges": 584.16,
            "totalCharges": 657.66,
            "totalChargesPercent": 0.29,
            "totalGrowth": 524.05
        }
    }
    

    Response Data

    The response body will be made up of these fields:

    Field Data Type Description
    firmId String The firm Id we have created for you.
    accountId String The Seccl Id of the account.
    accountName String The name of the account used for the illustration.
    currency String The currency of the account used for the illustration.
    initialCharges Array Array of data showing a breakdown by instrument of the upfront charges. See asset charge below.
    ongoingCharges Object Collection of data showing charges broken down by portfolio and instrument. See ongoing charges below.
    calculationsAfterEachPeriod Array Array of data showing growth and charges over each individual period. See period calculation below.
    investmentAmount Number The initial amount invested.
    finalAmount Number The total investment, added growth and deducted charges over the full length of the illustration.
    totalInitialCharges Number The total upfront charges for the illustration.
    totalOngoingCharges Number The total ongoing charges over the full length of the illustration.
    totalCharges Number The total charges over the full length of the illustration.
    totalChargesPercent Number The percentage of total charges over the full length of the illustration.
    totalGrowth Number The total growth over the full length of the illustration.

    Ongoing charges

    The ongoingCharges field is populated with the following data:

    Field Data Type Description
    portfolioCharges Array Array of charges broken down by type. See single charge below.
    assetCharges Array Array of data showing a breakdown by instrument of the ongoing charges. See asset charge below.

    Period calculation

    The calculationsAfterEachPeriod field is populated with the following data:

    Field Data Type Description
    periodIndex Number The number of the period in the complete illustration. Initial period (no growth or charges) is 0.
    currency String The currency of the instrument to be traded.
    openingAmount Number The closing amount from the previous period.
    growthAmount Number The amount of growth over the current period.
    ongoingCharges Object Collection of data showing charges broken down by portfolio and instrument. See ongoing charges.
    totalCharges Number The total charges over the full length of the illustration.
    closingAmount Number The opening amount, added growth and deducted charges.

    Asset charge

    An assetCharge is populated with the following data:

    Field Data Type Description
    assetId String The SecclId of the instrument the charge relates to.
    assetName String The long name of the instrument.
    charges Array Array of charges relating to the instrument, separated by type. See single charge below.
    totalCharges Number The total charges for the instrument.

    Single charge

    A singleCharge is populated with the following data:

    Field Data Type Description
    chargeType String The type of the charge to be applied.
    currency String The currency of the instrument the charge is to be applied to.
    amount Number The amount of the charge.

    Recommendation

    Recommendations can be created in Seccl with accounts, payments, models as well as orders. These can be sent to clients, amended, accepted and rejected.

    Create recommendation

    To create an recommendation, use this code:

    curl -X POST https://pfolio-api-staging.seccl.tech/recommendation \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "firmId": "FIRM1",
            "nodeId": "0",
            "clientId": "00D7CBF",
            "recommendationType": "Other",
            "notes": "Recommendation for new client with GIA and attached model.",
            "accounts": [
                  {
                      "wrapperDetail": {
                        "wrapperType": "GIA",
                        "assetAllocationId": "00002"
                      },
                      "clients": "00D7CBF",
                      "initialPayment": 5000
                  }
            ]
          }'
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "00000001"
        }
    }
    

    You can create recommendations for your clients via the API.

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/recommendation

    Body Data

    Field Data Type Description
    firmId
    REQUIRED
    String The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId
    REQUIRED
    String The nodeId the recommendation is linked to. The client and any accounts the recommendation belongs to must also be linked to this node.
    clientId
    REQUIRED
    String The Seccl Id of the client that the recommendation is created for
    recommendationType
    REQUIRED
    String The type of the recommendation. Currently, the only available option is Other
    notes String Any notes relating to the recommendation
    accounts
    REQUIRED
    Array Array of objects showing which products should be created when the recommendation is accepted. See below for details:

    An accounts field should be populated with the following data:

    Field Data Type Description
    id String The SecclId of an existing account the recommendation should be applied to. If no id is passed here, a new account will be created on acceptance of the recommendation
    bankDetails Object The bank details associated to the account (if different to the client bank details), see: bank details
    adviserCharge Number Ongoing adviser charge percentage to be charged against the account
    adviserTieredCharges Object Custom charges can be applied to the account, see: adviser tiered charges
    discretionaryManagementCharge Number Ongoing fee percentage
    clients
    REQUIRED
    String The SecclId of a client the account relates to
    recurringPayments Array Details of any recurring payments to be set up for this account, see: recurring payments
    wrapperDetail
    REQUIRED
    Object The wrapper details of the account, see: wrapper detail
    initialPayment Number One-off,initial payment in amount to the account
    initialAdviserCharge Number One-off, initial adviser charge percentage to be charged against the account
    transfers Array Details of any products to be transferred in to this account
    previousProvider - Previous provider id
    previousProviderRef - The account reference from the previous provider
    transferAccountAddress - Address the product to transfer in was registered to, see: address detail
    recurringOrders Object Details of a recurring orders set up for this account, see: recurring orders

    Get a recommendation

    To get a single recommendation by Id, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/recommendation/FIRM1/<recommendationId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "0000005",
            "firmId": "FIRM1",
            "nodeId": "0",
            "status": "Pending",
            "clientId": "00D7CBF",
            "recommendationType": "Other",
            "createdDate": "2019-05-15T00:00:00.000Z",
            "accounts": [
                {
                    "wrapperDetail": {
                        "wrapperType": "ISA",
                        "assetAllocationId": "00002"
                    },
                    "clients": "00D7CBF",
                    "initialPayment": 5000
                }
            ],
            "notes": "Recommendation for new client with GIA and attached model.",
            "updateId": "5cdbec738221bb1c3e136262"
        }
    }
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/recommendation/<firmId>/<recommendationId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    recommendationId The Id of the recommendation

    Response Data

    Field Description
    id The Seccl Id of the recommendation. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    nodeId The node id of the recommendation
    status The current status of the recommendation
    clientId The Seccl Id of the client that the recommendation is created for
    recommendationType The type of the recommendation
    createdDate The date the recommendation was created
    accounts The accounts array will be populated as set up in a new recommendation
    notes Any notes relating to the recommendation
    updateId An Id assigned to the record when it was last updated
    statusChanges An array of status changes the recommendation has had - this will include updates to notes, see status changes

    List recommendations with filter

    To list recommendations with various parameters, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/recommendation/<firmId>?clientId=00A1234&status=Pending \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/recommendation/<firmId>?parameter=<value>&parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    id The id to filter recommendations by
    clientId The clientId to filter recommendations by
    status The status to filter recommendations by
    creationDate ISO formatted datetime from which to filter the recommendation creation date

    Response Data

    The response is an object that contains a data and a meta field
    The response data is an array of items described in the get a single recommendation section

    Update recommendation

    You can update recommendations in your firm via the API. Updates are made on specific elements of the recommendation data, or the recommendation as a whole. Some fields are restricted: firmId, updateId, id etc.

    Update recommendation fields

    accounts and notes can be updated at once in your firm via the API. Here's how:

    HTTP Request

    PATCH https://pfolio-api-staging.seccl.tech/recommendation/<firmId>/<recommendationId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    recommendationId The Seccl Id of the recommendation.

    Update recommendation - Body Data

    To update a recommendation, use this code:

    curl -X PATCH https://pfolio-api-staging.seccl.tech/recommendation/<firmId>/<recommendationId> \
      -H 'Content-Type: application/json'  \
      -H 'api-token: yourtoken' \
      -d '{
            "updateId": "5bfe62b859685b7c11ccbda5",
            "notes": "Changed GIA account to ISA and new model",
            "accounts": [
                  {
                      "wrapperDetail": {
                        "wrapperType": "ISA",
                        "assetAllocationId": "00022"
                      },
                      "clients": "00D7CBF",
                      "initialPayment": 5000
                  }
            ]
        }'
    
    Field Data Type Description
    updateId
    REQUIRED
    An Id assigned to the record when it was last updated. This value should be sent with any update requests to the record
    notes Any notes relating to the recommendation
    accounts FULL ACCOUNT INFORMATION as described in the new recommendation section

    Reject Recommendation

    A recommendation can be rejected by a client.

    To reject a recommendation, use this code:

    curl -X PUT \
      https://pfolio-api-staging.seccl.tech/recommendation/action/reject/<firmId>/<recommendationId> \
      -H 'Content-Type: application/json' \
      -H 'api-token: yourtoken' \
      -d '{
          "updateReason": "Unacceptable model allocations",
          "updateDate": "2019-06-10"
      }'
    

    This command returns JSON structured as follows:

    {
        "data": {}
    }
    

    You can reject recommendations for your clients via the API.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/recommendation/action/reject/FIRM1/0000005

    Body Data

    Field Data Type Description
    updateReason
    REQUIRED
    String The reason the recommendation was rejected
    updateDate DateString The date the recommendation was rejected, if other than today

    Send Recommendation

    You are able to notify a client of a recommendation being available to them to review. Depending on which of our services are activated, this will provide different notifications:

    To send a recommendation, use this code:

    curl -X PUT \
      https://pfolio-api-staging.seccl.tech/recommendation/action/send/<firmId>/<recommendationId> \
      -H 'Content-Type: application/json' \
      -H 'api-token: yourtoken' \
      -d '{
          "updateReason": "Ready to go"
      }'
    

    This command returns JSON structured as follows:

    {
        "data": {}
    }
    

    You can send recommendations to your clients via the API.

    HTTP Request

    PUT https://pfolio-api-staging.seccl.tech/recommendation/action/send/FIRM1/0000005

    Body Data

    Field Data Type Description
    updateReason
    REQUIRED
    String The reason the recommendation was sent
    updateDate DateString The date the recommendation was sent, if other than today

    Message

    Manage client messages, their data and their status.

    Get a count of unread messages

    To get a count of the messages unread from the client, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/message/stats/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/message/stats/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Response Data

    The response data is an object that contains a unreadMessageCount field with the number of unread messages

    Get a single message

    To get a single message by Id, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/message/FIRM1/0000000002 \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    This command returns JSON structured as follows:

    {
        "data": {
            "id": "0000000002",
            "firmId": "FIRM1",
            "clientId": "00A1234",
            "messageType": "NEW_ACCOUNT",
            "read": false,
            "archived": false,
            "subject": "New Account",
            "payload": {
                "body": "Congratulations, you have set up a new account!"
            },
            "created": "Tue May 08 2018 20:29:02 GMT+0000 (UTC)",
            "updateId": "5af2088e8e0db3df4c2ed1fd"
        }
    }
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/message/<firmId>/<messageId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    messageId The Id of the message

    Response Data

    Field Description
    id The Seccl Id of the message. This should be used on any subsequent data where it is required
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client that the message belongs to
    messageType The type of the message
    read The read status of the message
    archived The archived status of the message
    subject The subject of the message
    payload The wrapper details of the account
    body - A string that makes up the body of the message
    id - For messages that relate to a document, CONTRACT_NOTE, TAX_STATEMENT etc. will have this field. This is the id of the document it relates to
    created The date the message was created
    updateId An Id assigned to the record when it was last updated

    List messages with filter

    To list messages with various parameters, use this code:

    curl -X GET \
      https://pfolio-api-staging.seccl.tech/message/<firmId>?clientId=00A1234&messageType=ACCOUNT_UPDATE \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/message/<firmId>?parameter=<value>&parameter=<value>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Query Parameters

    One or many of the following parameters can be used.

    Parameter Description
    clientId The clientId to filter messages by
    messageType The message type to filter messages by
    fromDate ISO formatted datetime from which to filter the message creation date from
    toDate ISO formatted datetime from which to filter the message creation date to

    Response Data

    The response is an object that contains a data and a meta field
    The response data is an array of items described in the Get a single message section

    Documents

    Retrieve saved documents.

    Contract Note - Get Stream

    To get a stream of a contract note pdf, use this code:

    curl -O -X GET \
      https://pfolio-api-staging.seccl.tech/files/contractnote/<firmId>/<clientId>/<transactionId>.pdf \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/files/contractnote/<firmId>/<clientId>/<id>.pdf

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Seccl Id of the transaction the contract note relates to

    Response Data

    The response data is an stream that can be piped to where you need it

    Contract Note - Pre-authenticated Signed URL

    To get a url to download a contract note pdf, use this code:

    curl -X POST \
      https://pfolio-api-staging.seccl.tech/files/contractnote \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken" \
      -d '{
              "id": "000000001",
              "firmId": "FIRM1",
              "clientId": "01234A1"
          }'
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/files/contractnote

    Get signed URL - Body Data

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Id of the transaction the contract note relates to

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "000000001",
        "url": "https://www.securesite.com/000000001.pdf"
      }
    }
    

    This returns the following data

    Field Description
    id The Id of the transaction the contract note relates to
    url A link to download the relevant file

    Advance Direct Debit Notice - Get Stream

    To get a stream of a set direct debit notice pdf, use this code:

    curl -O -X GET \
      https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandatenotice/<firmId>/<clientId>/<directDebitNoticeId>.pdf \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandatenotice/<firmId>/<clientId>/<id>.pdf

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Seccl Id of the direct debit notice relates to

    Response Data

    The response data is an stream that can be piped to where you need it

    Direct Debit Notice - Pre-authenticated Signed URL

    To get a url to download a contract note pdf, use this code:

    curl -X POST \
      https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandatenotice \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken" \
      -d '{
              "id": "000000001",
              "firmId": "FIRM1",
              "clientId": "01234A1"
          }'
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandatenotice/<firmId>/<clientId>/<directDebitNoticeId>.pdf

    Get signed URL - Body Data

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Id of the direct debit notice relates to

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "000000001",
        "url": "https://www.securesite.com/000000001.pdf"
      }
    }
    

    This returns the following data

    Field Description
    id The Id of the advance direct debit confirmation relates to
    url A link to download the relevant file

    Advance Direct Debit Confirmation - Get Stream

    To get a stream of a advance direct debit confirmation pdf, use this code:

    curl -O -X GET \
      https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandateconfirmation/<firmId>/<clientId>/<advanceDirectDebitConfirmationId>.pdf \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandateconfirmation/<firmId>/<clientId>/<advanceDirectDebitConfirmationId>.pdf

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Seccl Id of the advance direct debit confirmation relates to

    Response Data

    The response data is an stream that can be piped to where you need it

    Direct Debit Confirmation - Pre-authenticated Signed URL

    To get a url to download a advance direct debit confirmation pdf, use this code:

    curl -X POST \
      https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandateconfirmation \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken" \
      -d '{
              "id": "000000001",
              "firmId": "FIRM1",
              "clientId": "01234A1"
          }'
    

    HTTP Request

    POST https://pfolio-api-staging.seccl.tech/files/advancedirectdebitmandateconfirmation /

    Get signed URL - Body Data

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    clientId The Seccl Id of the client
    id The Id of the advance direct debit confirmation relates to

    This command returns JSON structured as follows:

    {
      "data": {
        "id": "000000001",
        "url": "https://www.securesite.com/000000001.pdf"
      }
    }
    

    This returns the following data

    Field Description
    id The Id of the advance direct debit confirmation relates to
    url A link to download the relevant file

    Notifications

    Notifications are business level notices, exceptions and warnings based on activity within the firm.

    List Notifications

    List all the notifications for a firm

    curl -X GET https://pfolio-api-staging.seccl.tech/notification/<firmId> \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/notification/<firmId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    List Exceptions

    List all the exceptions for a firm

    curl -X GET https://pfolio-api-staging.seccl.tech/notification/<firmId>/?notificationType=Exception \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    Response showing an exception

    {
        "data": [
            {
                "id": "0000001234",
                "firmId": "FIRM1",
                "notificationType": "Exception",
                "created": "2018-12-03T09:39:51.201Z",
                "systemArea": "Portfolio",
                "exceptionFirmId": "FIRM1",
                "status": "Open",
                "message": "Insufficient stock for this transaction",
                "systemAreaAction": "Post",
                "queue": "pfolio",
                "queueMessage": {
                    "firmId": "FIRM1",
                    "accountId": "00D1234",
                    "transactionType": "Order",
                    "transactionSubType": "At Best",
                    "movementType": "Sell",
                    "quantity": 1,
                    "assetId": "2851G",
                    "currency": "GBP",
                    "status": "Pending",
                    "linkId": "000001234",
                    "type": "Create"
                },
                "exceptionType": "Business",
                "updateId": "5c04f9e773c2d947edc6ba65"
            }
        ],
        "meta": {
            "count": 100
        }
    }
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/notification/<firmId>/?notificationType=Exception

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service

    Body Data

    Field Data Type Description
    id The unique id for this notification
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    notificationType ..
    created The date and time this notification was created
    systemArea ..
    exceptionFirmId The firm ...
    status ..
    message A message describing the notification
    systemAreaAction ..
    queue If this was raised by a job queue, it will be listed here
    queueMessage The data sent to the queue
    exceptionType ..
    updateId A random id changed every time this document is updated

    Get a single notification

    Get a notification

    curl -X GET https://pfolio-api-staging.seccl.tech/notification/<firmId>/?notificationType=Exception \
      -H "Content-Type: application/json"  \
      -H "api-token: yourtoken"
    

    HTTP Request

    GET https://pfolio-api-staging.seccl.tech/notification/<firmId>/<notificationId>

    URL Parameters

    Parameter Description
    firmId The firm Id we have created for you. It is used to segregate your data in a different database to other users of the service
    notificationId The id of the notification to retrieve

    Constants

    A list of constant values within our system in alphabetical order.

    Account Status

    Client Status

    Message Type

    Portfolio Transaction Type

    Common interfaces

    A list of interfaces shared within our system in alphabetical order.

    Address Detail

    Field Data Type Description
    department String Department name (if set)
    flatNumber String Flat number (if set)
    buildingName String Building name (if set)
    buildingNumber String Building number (if set)
    address1 String Address line 1
    address2 String Address line 2 (if set)
    address3 String Address line 3 (if set)
    address4 String Address line 4 (if set)
    address5 String Address line 5 (if set)
    country String Country
    postCode String Postal code

    Adviser Tiered Charges

    Field Data Type Description
    fromDate Date The date the charges are applied
    toDate Date The date the charges are suspended
    minimumAmount Number Minimum amount of the account
    maximumAmount Number Maximum amount of the account
    instrumentTypes Array List of financial instruments included
    tiers REQUIRED Number The details of the tiered charge, see below:

    A single tier is made of:

    Field Data Type Description
    fromAmount Number The minimum amount the charge is being applied
    toAmount Number The maximum amount the charge is being applied
    amount Number The charge applied for the specified values
    rate Fraction The charge applied for the specified values

    Bank Details

    Field Data Type Description
    sortCode String The sort code
    accountNumber Date The account number

    Recurring Orders

    Field Data Type Description
    movementType String Set to Invest
    investmentType String This determines whether the investment should be made into a model or a list of instruments. Set to Asset Allocation for a model or Bespoke for a list of instruments. For bespoke, the details field will become a required field. For asset allocation, a model must be linked to the account.
    orderDay String The day of the month the orders are created
    details String Array of data showing which instruments the investments will be made into. See below for details

    The recurringOrders.details field is populated with the following data and is required for Bespoke recurring orders:

    Field Data Type Description
    assetId
    REQUIRED
    String The SecclId of the instrument to be traded. These can be retrieved from the instrument list
    amount String The amount to be invested
    percentage String The percentage of available cash to be invested

    Recurring Payments

    Field Data Type Description
    movementType String Direction of the payment, either In or Out
    amount Number The recurring payment amount
    paymentDay String The day of the month the payment is taken
    method String The method of payment. This can be Direct Debit or Bacs Transfer
    autoInvest boolean Set to true if incoming payment is to

    be automatically invested in current model or recurring orders

    Status Changes

    Field Data Type Description
    status String The status of the item
    statusDate Date The date of the status change
    description String The description of the change

    Wrapper Detail

    Field Data Type Description
    wrapperType REQUIRED String The product type of the wrapper account, for instance GIA or ISA
    discretionary Boolean If the account is managed by a Discretionary Manager
    advised Boolean If the account is advised
    trust Boolean If the account is a trust
    assetAllocationId String The model linked to the account. This can be retrieved from model list