ScalepointDeveloper Portal

LossData API

Introduction

This document describes the ClaimShop Self-Service loss data API. This API can be used to get loss items data (of specific case) from Scalepoint ClaimShop Self-Service solution. This API returns only loss items which are not deleted and not saved as draft.

Main consumer of this API is insurance company.

Overview

The process of obtaining settlement data can be divided into two steps:

  • Authentication
  • Get loss data

Overview

Authentication

You need an access_token in order to send data to the Loss Data Endpoint. This access token can be obtained from the Authentication Endpoint. Please refer to the documentation about details of authentication process.

API caller should request self-service:read scope from Authentication Endpoint.

Endpoints

Authentication endpoint

For authentication Scalepoint provides two endpoints – one for production and one for everything else.

Production endpoint https://accounts.scalepoint.com/connect/token

Non-production endpoint https://sandbox-accounts.scalepoint.com/connect/token

Loss Data API main endpoint

The endpoint which allows to obtain any loss case by its token is in the following format:

https://www.scalepoint.com/self-service/<country>/api/<tenant>/data/%<caseToken>%

Here is a loss case token which uniquely identifies ClaimShop Self-Service loss case.

The actual format of this will depend on the insurance company and the country in which it operates.

Assuming the following:

  • Country: Denmark
  • Tenant: ABC Insurance
  • Case token: d1a72df4-f7d5-402c-a495-cc31b8b39a59

The endpoint could look something like this:

https://www.scalepoint.com/self-service/dk/api/abcinsurance/data/d1a72df4-f7d5-402c-a495-cc31b8b39a59

For testing purposes, you will be given access to a project server and the hostname-part of the endpoint would change accordingly:

https://<hostname>/self-service/dk/api/abcinsurance/data/d1a72df4-f7d5-402c-a495-cc31b8b39a59

Please discuss with your account manager, which project server you have been assigned in order to determine the actual endpoint.

Loss Data

Get Loss Data Request

Loss data GET request contains request parameters as a part of endpoint URL (see above) and authorization header.

Authorization header has name 'Authorization'. It has value built from access_token in following format:

Bearer access_token

Note the important space character between Bearer and access_token value.

Get Loss Data Response

Settlement data GET response contains settlement fields in JSON format in case of success (HTTP status code 200). Fields are described in Appendix A.

Loss data GET response contains loss fields in JSON format in case of success (HTTP status code 200). Fields are described in Appendix A.

NOTE: there are links to attachments. These files can be downloaded using authorization as used for loss data request

Simplest successful response example:


{
  "case": {
    "externalReference": "",
    "companyCode": "trygforsikring",
    "token": "198E9596-F006-4FAB-B436-3F5FF5E71A1B",
    "draftItemsExist": false
  },

  "lossItems": [
    {
      "token" : "62AC85F7-D541-43C0-BC44-B4E2246432DC",
      "description": "Tokina AT-X 116 Pro DX II 11-16mm F/2.8 for Canon (Kameraobjektiver)",
      "quantity": 1,
      "age": 23,
      "categoryName": "Kamera Objektiver",
      "categoryGroupName": "Foto & Video",
      "newPrice": 1.00,
      "unableToUpload": false,
      "brand": "Tokina",
      "model": "AT-X 116 Pro DX II 11-16mm F/2.8 for Canon",
      "lossType": "1",
      "noDocumentation": false,
      "attachments": [
        {
          "fileGUID" : "27CFCE43-A6E3-4E75-8906-717501A28B90",
          "fileName": "",
          "fileLink": "https://project07.scalepoint.com/webapp/ScalePoint/dk/rest/file/somecompany/27CFCE43-A6E3-4E75-8906-717501A28B90"
        }
      ],
      "dateCreated": "2012-10-10",
      "dateModified": "2017-10-10"
    }
  ],
  "customerDetails": {
    "claimNumber": "",
    "firstName": "John",
    "lastName": "Doe",
    "zipCode": "2000",
    "city": "Frederiksberg",
    "email": "john.doe@gmail.com",
    "phone": "22 44 93 00",
    "loginUrl": ""
  }
}

In case of error response JSON can be ignored - instead HTTP status code should be used to determine error type.

Appendix A - loss data elements description

Root

JSON PathDescriptionRequired
caseCase dataYes
lossItemsLoss items dataYes
customerDetailscustomer details dataYes

Case

JSON PathDescriptionRequired
case.tokenCase token UUID which uniquely identifies loss caseYes
case.externalReferenceExternal reference of the loss case (i.e. Insurance company case number), max length is 50No
case.companyCodeCompany code, max length is 50Yes
case.draftItemsExisttrue if Loss has at least 1 item which is draft and is not deletedYes

LossItems[]

JSON PathDescriptionRequired
lossItems[].tokenLine id (UUID)Yes
lossItems[].descriptionItem description, max length is 510Yes
lossItems[].quantityItem quantityYes
lossItems[].purchaseDateItem purchase dateNo
lossItems[].ageItem ageNo
lossItems[].categoryNameCategory name, max length is 50Yes
lossItems[].categoryGroupNameCategory group name, max length is 254Yes
lossItems[].acquiredAcquisition type, max length is 256No
lossItems[].purchasePriceItem purchase price entered by userNo
lossItems[].newPriceItem new price entered by userNo
lossItems[].repairPriceItem repair price entered by user in case if item is being repairedNo
lossItems[].customerDemandCustomer demand price entered by userNo
lossItems[].customerNoteNote from customer, max length is 256No
lossItems[].noDocumentationtrue if user does not have documentation to provideYes
lossItems[].unableToUploadCan item documentation be uploaded by userNo
lossItems[].brandBrand of item, max length is 254No
lossItems[].modelModel of item, max length is 64No
lossItems[].lossTypeItem loss typeNo
lossItems[].repairStartedIs item repair startedNo
lossItems[].damageTypeItem damage type, max length is 100No
lossItems[].dateCreatedLoss item creation dateYes
lossItems[].dateModifiedLoss item last modification dateYes
lossItems[].additionalQuestionsAdditional questions, extra text for an itemNo
lossItems[].attachments[]List of uploaded AttachmentsYes

Attachments[]

JSON PathDescriptionRequired
lossItems[].attachments[].fileGUIDFile idYes
lossItems[].attachments[].fileNameFile name, max length is 256Yes
lossItems[].attachments[].fileLinkFile linkYes

CustomerDetails

JSON PathDescriptionRequired
customerDetails.claimNumberClaim number, max length is 50No
customerDetails.firstNameFirst name, max length is 100No
customerDetails.middleNameMiddle name, max length is 100No
customerDetails.lastNameLast name, max length is 100No
customerDetails.zipCodeZip code, max length is 20No
customerDetails.cityCity, max length is 30No
customerDetails.emailEmail, max length is 254No
customerDetails.phonePhone number, max length is 30No
customerDetails.loginUrlURL for customer login to ClaimShop Self-ServiceYes




see more about widget implementation:

Last updated on

On this page