ScalepointDeveloper Portal

Service Partners Integration with Scalepoints ClaimShop

Introduction

This page describes on how to integrate Scalepoint's ClaimShop repair & valuation webservice with Service Partner's webservice. In order to share information about repair or valuation tasks, we exchange JSON documents containing all information about the task.

Authentication

To ensure that a specific task is coming from a certain Service Partner, we use a pre-shared key. This is basically a string in the form of a GUID, which only Scalepoint and the Service Partner knows about. It must be specified in every request to Scalepoints webservices. This pre-shared key will be sent using form-data. Similarly if the Service Partner will be providing a webservice for Scalepoint to call, Scalepoint will use this key on all requests to the webservice.

Integrations

In order to share information about repair or valuation tasks, we exchange JSON documents containing all information about the task. This exchange of information will be done in both ways, from scalepoint to service partner and vice versa

Overview

There are 3 Scalepoint endpoints:

  1. S1 (Required) – endpoint for task feedback and invoices
  2. S2 – endpoint for posting statuses (statuses can be arbitrary)
  3. S3 – endpoint for posting messages

And there should be 3 endpoints implemented on the Service Partner side

  1. SP1 (Required) – endpoint for posting repair tasks
  2. SP2 (Required) – endpoint for posting statuses
  3. SP3 – endpoint for posting messages

The process is the following:

  1. Scalepoint (S) sends a repair task with data about the damage items and customer to Service partner (SP) endpoint SP1
  2. SP evaluate the repair cost (it can be predefined or SP can request a damage item for valuation)
  3. During the valuation and repair process SP can send statuses about the current state of the process (to S2 endpoint). Statuses can be arbitrary. It is not required, but it will give more information about the process for the Scalepoint
  4. When SP is ready to provide a repair cost it sends a so called task feedback to Scalepoint (S1 endpoint) with the repair price or with reject reason if an item cannot be repaired. In most cases task feedback can be sent just right after receiving repair task, since task will provide all the needed data about the damage item. But it also can be sent later. Feedback can be sent more than once – the last feedback will be taken into account.
  5. Scalepoint receives a task feedback and approves it (or rejects) by sending corresponding status to Service partner endpoint SP2.
  6. After receiving approval SP does the repair
  7. After repair was implemented SP sends invoice to Scalepoint (endpoint S1). Invoice can be sent more than once. Only last invoice will be taken into account.
  8. Scalepoint approves the invoice
Integrating from Service Partner to Scalepoint

Integration between Scalepoint and external service partner will happen via REST Web service. For this purpose Scalepoint provide 3 different web service URLs. With the web service URLs external service partner able to publish below 3 different things.

  1. Publish modified repair & valuation tasks
  2. Publish the status of the task
  3. Publish a chat message

By using above 3 different web services a Service partner could call one of the web service URL when something changed on Service partner side. Detailed description about these 3 different web service URLs functionality are described below.

Integrating from Scalepoint to Service Partner

In order to send the repair and valuation tasks to Service partner, Scalepoint would expect that you provide us these 3 different web service URL’s. Before we start doing the integrations we need to exchange these 3 different web service URLS from Scalepoint to Service Partner and Service Partner to Scalepoint. We have clear description on how we publish tasks, statuses and chat messages. So it is very important that your Web services are able to accept Scalepoint tasks. Detailed description could be found below on how we publish tasks, statuses and chat messages.

Integrations from Service Partner to Scalepoint

When a task is completed, comments are made or otherwise modified, it should be sent back to Scalepoint. For this process we have a web service where the Service Partner can send their modified task documents.

Posting task feedback to Scalepoint

Posting feedback containing service lines and payment invoice to Scalepoint

| Request details | |--------|--- | | Url | https://hostname/repairValuation/country/ws/v3.1/task_feedback.action| | Hostname | The hostname part will vary depending on environment. Scalepoint will supply specific hostname for production and test environments. | | Country | The country part will vary depending on country of operation. Scalepoint will supply the correct country value. | | Method | POST |

| Request Headers | | --- |--- | | Content-Type | multipart/form-data | | Accept | application/JSON |

| Request form data | | --- |--- | | securityToken | Static GUID for service partner | | jsonString | JSON document string | | attachemtnName1 | Binary file | | …. | Binary file | | attachemtnNameN | Binary file |

Usage notes

There is an identifier for the task being sent to service partner (uniqueId attribute of serviceTask element). The same identifier must be included in JSON document.

ServiceTask element contains three elements:

  • serviceLines element is mandatory. It contains service lines received from Scalepoint. Lines that are not changed must be included in the feedback without changes. If line is not included it is considered to be removed from task.

    Note: feedback service lines are mapped to ClaimShop service lines by claimLineId attribute:

    • if feedback line includes claimLineId and it corresponds to the existing line in ClaimShop then this is treated as update operation;
    • if feedback line does not include claimLineId attribute, then it is treated as a new line (i.e. insert operation);
    • if in the feedback there is no corresponding line then it is treated as line removal (i.e. delete operation).
  • invoice element is the invoice for payment. It is not mandatory. It is used only when invoice is issued

    • InvoiceNumber is invoice identification. It is mandatory and should be unique

    • invoiceDate is a date when invoice/credit note is issued

    • paymentDueDate is a due date when invoice/credit note should be payed

    • invoiceType can have two options:

      • "INVOICE" - Invoice is used to pay money to service partner
      • "CREDIT_NOTE" - credit note is used to pay (return) money to Scalepoint
    • Credit note usage:

      • invoiceNumber is mandatory and should be equal to invoice number that is credited
      • creditNoteNumber is mandatory and should be unique
  • servicePartner element is not mandatory. It contains bank information and other details. It is mandatory in case when there is an invoice in the feedback

Requirements:

The JSON document is validated according to the JSON schema (see Appendix A2). But there are other restrictions:

  • repairPrice valuation is required when serviceLine.taskType is "REPAIR"
  • ServicePartner element is mandatory when invoice is present in feedback
Request
Request form parameter jsonString Example

The request form parameter jsonString takes JSON form. You can see JSON example in Appendix A1.

Request form parameter JSON schema

The JSON schema for the document is in Appendix A2, description of elements is in Appendix A3.

Response

| Response Headers | | --- |--- | | Content-Type | application/JSON |

Successful responses
  1. Example of a successful response JOSN

Response code is 201 (Created)

{
   "status":"SUCCESS"
}
  1. There can be internal logic validation of the invoice. In this case, line feedback is successfully saved but invoice is not.

Response code is 201 (Created)

{
   "status":"SUCCESS",
   "message":"Validation failed",
   "validationErrors":{
      "errorList":[
         "You already submitted invoice with the same Invoice number and Invoice type, but with another Total invoice amount. Please send new invoice with new Invoice number and Credit Note related to the previously sent invoice. Thank you."
      ]
   }
}
Failure response

Here are some examples of the failure response JSON

  1. JSON structure is not valid

Response code is 400 (Bad request)

{
   "status":"FAILURE",
   "message":"JSON structure is not valid"
}
  1. Access denied in case security token of the service partner is not valid or absent

Response code is 403 (Forbidden)

{
   "status":"FAILURE",
   "message":"JSON structure is not valid",
   "validationErrors":{
      "errorList":[
         "#/servicePartner: required key [bank] not found"
      ]
   }
}
  1. Task GUID is empty or not valid

Response code is 400 (Bad request)

{
   "status":"FAILURE",
   "message":"Wrong task GUID"
}
Response JSON schema for Posting task feedback to Scalepoint
{
   "$schema":"http://json-schema.org/draft-07/schema#",
   "type":"object",
   "required":[
      "status"
   ],
   "properties":{
      "status":{
         "type":"string",
         "enum":[
            "SUCCESS",
            "FAILURE"
         ]
      },
      "message":{
         "type":"string"
      },
      "validationErrors":{
         "type":"object",
         "required":[
            "errorList"
         ],
         "properties":{
            "errorList":{
               "type":"array",
               "items":{
                  "type":"string"
               }
            }
         }
      }
   }
}

Posting task status to Scalepoint

Scalepoint provides optional service for posting task status

| Request details | | --- |--- | | Url | https://hostname/repairValuation/country/ws/v3/task_status.action | | Hostname | The hostname part will vary depending on environment. Scalepoint will supply specific hostname for production and test environments. | | Country | The country part will vary depending on country of operation. Scalepoint will supply the correct country value. | | Method | POST |

| Request Headers | | --- |--- | | Content-Type | application/x-www-form-urlencoded |

| Request form parameters | | --- |--- | | securityToken | Static GUID for service partner | | uniqueId | The uniqueId of the received task | | created (optional parameter) | Optional parameter with the Date of status update (mask "yyyy-MM-dd HH:mm:ss"). If mask is different than we create bad response. If parameter is empty than we use for it date of response receiving. | | status | Text description of task status. If size 100 characters than we create bad response. |

Response

Success response has HTTP status code 201 or 200. All others are considered to be failed.

Posting free text messages to Scalepoint

Service partner can send a message to Scalepoint system. This message is connected to specific RV task.

| Request details | | --- |--- | | Url | https://hostname/repairValuation/country/ws/v3/message.action | | Hostname | The hostname part will vary depending on environment. Scalepoint will supply specific hostname for production and test environments. | | Country | The country part will vary depending on country of operation. Scalepoint will supply the correct country value. | | Method | POST |

| Request Headers | | --- |--- | | Content-Type | multipart/form-data | | Accept | application/JSON |

| Request form data | | --- |--- | | securityToken | Static GUID for service partner | | taskGuid | Unique identifier of the task (GUID) | | textMessage | Text message | | file1 | Binary file | | …. | Binary file | | fileN | Binary file |

Usage notes

There is an identifier for the task – taskGuid being sent to service partner (uniqueId attribute of serviceTask element – see Fetching Repair or Valuation task or Posting repair or valuation task to service partner ).

Response

Success response has HTTP status code 201 or 200. All others are considered to be failed.

| Response Headers | | --- |--- | | Content-Type | application/JSON |

Successful response
  1. Example of a successful response JSON

Response code is 201 (Created)

{
   "status":"SUCCESS"
}

Integration from Scalepoint to Service Partner

When a new task is created for a Service Partner, a task document is created and pushed to the provided service partners web service. This document can then come into the Service Partners possession in one of two ways:

Service Partner Webservice

Service Partner should provide a webservice so scalepoint can push the document to this webservice. For this webservice, a return code needs to be agreed, which indicates a successful transfer of the task document. If the webservice is unavailable or returns an error, Scalepoint will try to send the task document again for a number of times.

Posting repair or valuation task to service partner

Service partner provides REST web service with the following parameters

Method: POST

| Request Headers | | --- |--- | | Content-Type | application/x-www-form-urlencoded |

| Request form parameters | | --- |--- | | securityToken | Static GUID for service partner | | jsonString | JSON document string |

Request

The request form parameter jsonString takes JSON form. You can see JSON example in Appendix B1.

The JSON schema for the document is in Appendix B2, description of elements is in Appendix B3.

Response

Success response has HTTP status code 201 or 200. All others are considered to be failed.

Posting status messages to Service Partner

If the Service Partner is able to provide a different webservice, Scalepoint can push various kind of service messages to this webservice. Service partner provides REST web service with the following parameters

Method: POST

| Request Headers | | --- |--- | | Content-Type | application/x-www-form-urlencoded |

| Request form parameters | | --- |--- | | securityToken | Static GUID for service partner | | jsonString | JSON document string |

Request

The request form parameter jsonString takes JSON form. You can see JSON example in Appendix C1.

The JSON schema for the document is in Appendix C2.

Response

Success response has HTTP status code 201 or 200. All others are considered to be failed.

Usage notes

This service is used to transfer only service messages about the various events of the repair&valuation task lifecycle. Each message contains:

  • code that describes event
  • task details
  • invoice summary

List of available message codes

CodeDescription
RVInvoiceWasReceivedMailInvoice was received
RVInvoiceWasRejectedMailInvoice was rejected
RVInvoiceWasUnrejectedMailInvoice rejection was undone
RVAutoApprovalSuccessNotificationToClaimantNotification about successful auto approval process completion
RVAutoApprovalSuccessNotificationToServicePartnerNotification about successful auto approval process completion
RVReminderEmailNotificationToClaimantReminder about not completed task
RVDeductibleNegativeAmountNotificationToCustomerNotification about repaired line with negative total claim amount
RVAutoApprovalInvoicePayToServicePartnerNotificationToClaimantNotification aboutpayment
RVTaskCancelNotificationToSPTask was cancelled by claim handler
RVTaskApprovedNotificationToServicePartnerTask Approved
RVTaskRejectedNotificationToServicePartnerTask Rejected
NotificationToClaimantNote to claimant sent

Task details

ParameterDescription
taskGuidUnique identifier of the task
insuranceCompanyNameName of Insurance Company
claimNumberClaim number
policyNumberPolicy number
claimantNameClaimant name
servicePartnerNameService partner name

Invoice summary data

ParameterDescription
countTotal count of invoices
amountSum of amounts of all invoices
paymentDatePayment date

Posting free text messages to Service partner

Service partner provides REST web service with the following parameters

Method: POST

| Request Headers | | --- |--- | | Content-Type | application/x-www-form-urlencoded |

| Request form parameters | | --- |--- | | securityToken | Static GUID for service partner | | jsonString | JSON document string |

Request

The request form parameter jsonString takes JSON form. You can see JSON example in Appendix D1.

The JSON schema for the document is in Appendix Appendix D2.

Response

Success response has HTTP status code 201 or 200. All others are considered to be failed.

Appendix A1 – Feedback example JSON

{
  "uniqueId": "dc100952-2005-4fbf-bbdf-badd1ec5a912",
  "servicePartner": {
    "name": "Service partner 1",
    "address1": "Fisketorvet Shopping Center, 201 Kalvebod Brygge",
    "address2": "some address",
    "phone": "88 81 80 01",
    "email": "shop@servicepartner1.com",
    "postalCode": "1560",
    "cvrNumber": "10166896",
    "city": "København V",
    "bank": {
      "bankName": "big bank",
      "regNumber": "1233",
      "accountNumber": "1222222342321112",
      "iban": "CH93 0076 2011 6238 5295 7",
      "giro": "123eee3333",
      "fikType": "123456",
      "fikCreditorCode": "CODE1",
      "fikNumber": "fik12345d"
    }
  },
  "serviceLines": [
    {
      "claimLineId": 10882352,
      "uniqueId": "75f7f1f6-719c-424a-ae17-21eff191c202",
      "taskType": "REPAIR",
      "repairType": "STANDARD_REPAIR",
      "repairTypeReason": "SHORT_CIRCUIT_WO_LIQUID",
      "supplierCaseNo": "supplierCaseNo text",
      "usedco2": 0,
      "newitemco2": 0,
      "category": {
        "name": "Handy",
        "parentCategory": "Telefon",
        "uniqueId": "8E22CEE8-0C44-4F33-A6A9-694EED215672"
      },
      "item": {
        "age": 24,
        "quantity": 1,
        "customerDescription": "APPLE iPhone 7 128GB Jetsort",
        "productMatchDescription": "APPLE iPhone 7 128GB Jetsort",
        "totalDamage": false,
        "servicePartnerNote": "Some text from service partner to scalepoint",
        "rejectReasonId": 1,
        "rejectReasonExplanation": "repair is rejected",
        "ean": "eanText",
        "serialNumber": "serialNumber text",
        "imei": "imei text"
      },
      "valuations": {
        "purchasePrice": 5200.0,
        "newPrice": 5000.0,
        "customerDemand": 3200.0,
        "discretionaryValuation": 3700.0,
        "usedPrice": 3500.0,
        "repairEstimate": 1500.0,
        "repairPrice": 400.0
      }
    }
  ],
  "invoice":{
    "invoiceType":"INVOICE",
    "invoiceNumber":"Invoice_12345678",
    "creditNoteNumber":"CreditNote_12345678", //used only for credit notes
    "invoiceDate":"2020-02-21T16:00:00Z",
    "paymentDueDate":"2020-02-21T16:00:00Z",
    "nameOfValuationResponsible": "John Doe",
    "dateOfValuation": "2020-02-21T16:00:00Z",
    "netAmount":400.00,
    "vat":100.00,
    "totalAmount":500.00,
    "invoiceLines":[
      {
        "description":"invoice for iphone",
        "units": "item",
        "quantity":1,
        "unitNetAmount":400.00,
        "unitVatAmount":100.00,
        "unitPrice":500.00,
        "lineTotal":500.00
      },
      {
        "description":"invoice for iphone",
        "units": "item",
        "quantity":1,
        "unitNetAmount":200.00,
        "unitVatAmount":50.00,
        "unitPrice":250.00,
        "lineTotal":250.00
      }
    ]
  }
}

Appendix A2 – Feedback JSON schema

{
   "$schema":"http://json-schema.org/draft-07/schema#",
   "definitions":{
      "uniqueId":{
         "type":"string",
         "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
      },
      "bank":{
         "type":"object",
         "title":"The Bank details",
         "required":[

         ],
         "properties":{
            "bankName":{
               "type":"string"
            },
            "regNumber":{
               "type":"string"
            },
            "accountNumber":{
               "type":"string"
            },
            "iban":{
               "type":"string"
            },
            "giro":{
               "type":"string"
            },
            "fikNumber":{
               "type":"string"
            },
            "fikType":{
               "type":"string"
            },
            "fikCreditorCode":{
               "type":"string"
            }
         }
      },
      "servicePartner":{
         "type":"object",
         "title":"The Service partner details",
         "required":[
            "name",
            "bank"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "address1":{
               "type":"string"
            },
            "address2":{
               "type":"string"
            },
            "phone":{
               "type":"string"
            },
            "email":{
               "type":"string"
            },
            "postalCode":{
               "type":"string"
            },
            "cvrNumber":{
               "type":"string"
            },
            "city":{
               "type":"string"
            },
            "bank":{
               "$ref":"#/definitions/bank"
            }
         }
      },
      "item":{
         "type":"object",
         "title":"The Item Schema",
         "required":[
            "productMatchDescription",
            "quantity"
         ],
         "properties":{
            "customerDescription":{
               "type":"string"
            },
            "productMatchDescription":{
               "type":"string"
            },
            "quantity":{
               "type":"integer"
            },
            "age":{
               "type":"integer"
            },
            "servicePartnerNote":{
               "type":"string"
            },
            "totalDamage":{
               "type":"boolean"
            },
            "rejectReasonId": {
              "type": "integer"
            },
            "rejectReasonExplanation": {
              "type": "string"
            },
            "ean": {
              "type": "string"
            },
            "serialNumber": {
              "type": "string"
            },
            "imei": {
              "type": "string"
            }
         }
      },
      "valuations":{
         "type":"object",
         "required":[

         ],
         "properties":{
            "purchasePrice":{
               "type":"number"
            },
            "newPrice":{
               "type":"number"
            },
            "customerDemand":{
               "type":"number"
            },
            "discretionaryValuation":{
               "type":"number"
            },
            "usedPrice":{
               "type":"number"
            },
            "repairEstimate":{
               "type":"number"
            },
            "repairPrice":{
               "type":"number"
            }
         }
      },
      "category":{
         "type":"object",
         "required":[
            "name",
            "uniqueId",
            "parentCategory"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "uniqueId":{
               "$ref":"#/definitions/uniqueId"
            },
            "parentCategory":{
               "type":"string"
            }
         }
      },
      "serviceLine":{
         "type":"object",
         "required":[
            "taskType",
            "item",
            "valuations",
            "claimLineId",
            "category"
         ],
         "properties":{
            "claimLineId":{
               "type":"number"
            },
            "uniqueId":{
               "$ref":"#/definitions/uniqueId"
            },
            "taskType":{
               "type":"string",
               "enum":[
                  "REPAIR",
                  "REPAIR_ESTIMATE",
                  "VALUATION",
                  "MATCH_SERVICE"
               ]
            },
            "repairType": {
              "type": "string"
            },
            "repairTypeReason": {
              "type": "string"
            },
            "supplierCaseNo": {
              "type": "string"
            },
            "usedco2": {
              "type": "integer"
            },
            "newitemco2": {
              "type": "integer"
            },
            "item":{
               "$ref":"#/definitions/item"
            },
            "valuations":{
               "$ref":"#/definitions/valuations"
            },
            "category":{
               "$ref":"#/definitions/category"
            }
         }
      },
      "invoiceLine":{
         "type":"object",
         "required":[
            "description",
            "quantity",
            "unitNetAmount",
            "unitVatAmount",
            "unitPrice",
            "lineTotal"
         ],
         "properties":{
            "description":{
               "type":"string"
            },
            "units":{
               "type":"string"
            },
            "unitNetAmount":{
               "type":"number"
            },
            "unitVatAmount":{
               "type":"number"
            },
            "unitPrice":{
               "type":"number"
            },
            "quantity":{
               "type":"number"
            },
            "lineTotal":{
               "type":"number"
            }
         }
      },
      "invoice":{
         "type":"object",
         "required":[
            "invoiceType",
            "invoiceNumber",
            "invoiceDate",
            "paymentDueDate",
            "netAmount",
            "vat",
            "totalAmount",
            "invoiceLines"
         ],
         "properties":{
            "invoiceType":{
               "type":"string",
               "enum":[
                  "INVOICE",
                  "CREDIT_NOTE"
               ]
            },
            "invoiceNumber":{
               "type":"string"
            },
            "invoiceDate":{
               "type":"string"
            },
            "paymentDueDate":{
               "type":"string"
            },
            "creditNoteNumber":{
               "type":"string"
            },
            "nameOfValuationResponsible":{
               "type":"string"
            },
            "dateOfValuation":{
               "type":"string"
            },
            "netAmount":{
               "type":"number"
            },
            "vat":{
               "type":"number"
            },
            "totalAmount":{
               "type":"number"
            },
            "invoiceLines":{
               "type":"array",
               "items":{
                  "$ref":"#/definitions/invoiceLine"
               }
            }
         }
      }
   },
   "type":"object",
   "title":"RV Task feedback",
   "required":[
      "uniqueId",
      "serviceLines",
      "servicePartner"
   ],
   "properties":{
      "uniqueId":{
         "$ref":"#/definitions/uniqueId"
      },
      "createdDate":{
         "type":"string"
      },
      "takenSelfRisk":{
         "type":"number"
      },
      "updateClaimSelfRisk":{
         "type":"number"
      },
      "updateClaimSelfRiskReason":{
         "type":"string"
      },
      "invoice":{
         "$ref":"#/definitions/invoice"
      },
      "serviceLines":{
         "type":"array",
         "title":"The task lines details",
         "items":{
            "$ref":"#/definitions/serviceLine"
         }
      },
      "servicePartner":{
         "$ref":"#/definitions/servicePartner"
      }
   }
}


Appendix A3 – Description of feedback json elements

ElementParent ElementAttributePatternUseDescriptionFeedback specific*
serviceTaskRequiredContainer for the whole feedback-
serviceTaskuniqueIdRequiredThe unique identifier of the task. It is contained in the received JSON document by service partner.-
serviceTaskcreatedDateRequiredDate and time of JSON creation-
serviceTasktakenSelfRiskOptionalSelfrisk taken by service partner+
serviceTaskupdateClaimSelfRiskOptionalThe value of the Selfrisk that will be set in claim after the accept this feedback+
serviceTaskupdateClaimSelfRiskReasonOptionalDescription with reason why Selfrisk for claim should be updated+
invoiceserviceTaskOptionalContainer of payment invoice+
invoiceinvoiceTypeRequiredType of the invoice. Possible values: "INVOICE", "CREDIT_NOTE"+
InvoiceinvoiceNumberRequiredUnique invoice identification+
InvoiceinvoiceDateyyyy-MM-ddRequiredInvoice date+
invoicepaymentDueDateyyyy-MM-ddRequiredInvoice payment due date+
InvoicecreditNoteNumberOptionalUnique credit note identification+
InvoicenameOfValuationResponsibleOptionalName of the person in charge of current task+
invoicedateOfValuationyyyy-MM-ddOptionalDate of valuation+
InvoicenetAmount#0.00RequiredNet amount of the invoice+
Invoicevat#0.00RequiredVAT amount of the invoice+
invoicetotalAmount#0.00RequiredTotal amount of the invoice+
invoiceLinesinvoiceRequiredContainer for invoice lines+
invoiceLineinvoiceLinesRequiredInvoice line details+
invoiceLinedescriptionRequiredInvoice line description+
invoiceLinequantity#0.00RequiredQuantity of invoice line units+
invoiceLineunitsOptionalUnits+
invoiceLineunitPrice#0.00RequiredPrice per 1 invoice line unit+
invoiceLineunitVatAmount#0.00RequiredVAT * unitPrice * quantity+
invoiceLineunitNetAmount#0.00RequiredunitPrice * quantity+
invoiceLinelineTotal#0.00RequiredunitVatAmount + unitNetAmount+
serviceLinesserviceTaskRequiredContainer for service lines-
serviceLineserviceLinesRequiredService line details-
serviceLineclaimLineIdOptionalId of the ClaimShop service line, required for posting existing line in feedback and must be empty if line is new-
serviceLineuniqueIdOptionalGUID of the ClaimShop service line, required for posting existing line in feedback and must be empty if line is new-
serviceLinetaskTypeRequiredType of the R&V task. Possible values: REPAIR, REPAIR_ESTIMATE, VALUATION, MATCH_SERVICE-
serviceLinerepairTypeOptionalPossible values: STANDARD_REPAIR, SWAP, ONSITE_REPAIR-
serviceLinerepairTypeReasonOptionalPossible values: MALFUNCTION, SHORT_CIRCUIT_WO_LIQUID, LIQUID_DAMAGE, PHYSICAL_DAMAGE, DRAINAGE_FAULT, WATER_SUPPLY_FAULT, ELECTRICAL_INSTALLATION_FAULT, FAULT_BY_VERMIN-
serviceLinesupplierCaseNoOptional-
serviceLineusedco2Optional-
serviceLinenewitemco2Optional-
categoryserviceLineRequiredCategory of the service line-
categoryNameRequiredName of the category-
categoryuniqueIdRequiredGUID of the category (received from Scalepoint)-
categoryparentCategoryRequiredName of the parent category-
itemserviceLineRequiredService line details-
itemcustomerDescriptionOptionalItem description by claimant-
itemproductMatchDescriptionRequiredItem description-
itemquantityRequiredQuantity-
itemageOptionalAge in months-
itemservicePartnerNoteOptionalService partner note+
itemtotalDamageOptionalTotal damage+
itemrejectReasonIdOptionalId of the reject reason (please ask product manager for the predefined list of reject reasons)+
itemrejectReasonExplanationOptionalNote about reject reason+
itemeanOptional+
itemserialNumberOptional+
itemimeiOptional+
valuationsserviceLineRequiredService line valuations-
valuationspurchasePrice#0.00OptionalPurchase price-
valuationsnewPrice#0.00Optionalprice of the new item-
valuationscustomerDemand#0.00OptionalCustomer demand price-
valuationsdiscretionaryValuation#0.00OptionalDiscretionary valuation-
valuationsusedPrice#0.00OptionalUsed item price-
valuationsrepairEstimate#0.00OptionalRepair estimate-
valuationsrepairPrice#0.00OptionalRepair price-
servicePartnerserviceTaskRequiredService partner details-
servicePartnernameRequiredService partner name-
servicePartneraddress1OptionalService partner address-
servicePartneraddress2OptionalService partner second address-
servicePartnerphoneOptionalService partner phone-
servicePartneremailOptionalService partner email-
servicePartnerpostalCodeOptionalService partner postal code-
servicePartnercvrNumberOptionalService partner company number (CVR for DK)-
servicePartnercityOptionalService partner city-
bankservicePartnerRequiredBank details-
bankbankNameOptionalBank name+
bankregNumberOptionalBank registration number-
bankaccountNumberOptionalBank account number-
bankfikTypeOptionalBank FIK type-
bankfikNumberOptionalBank FIK number+
bankfikCreditorCodeOptionalBank FIK creditor code-
bankIBANOptionalBank IBAN-
bankGIROOptionalBank GIRO-

* feedback specific - the field specific only to a feedback, meaning that it is not presented in a task sent to service partner (see Appendix B)

Appendix B1 – Task example JSON

{
  "serviceTasks": [
    {
      "uniqueId": "dc100952-2005-4fbf-bbdf-badd1ec5a912",
      "noteToServicePartner": "Hello, here is a broken iphone",
      "replyAddress": "http+185562+dk+LT-ATU.spcph.local@sandbox65938.mailgun.org",
      "invoicePaidBy": "Scalepoint",
      "damageType": "type1",
      "damageCauseDescription": "Damage cause description 1",
      "allowedToCollectSelfRisk": false,
      "allowedToUpdateSelfRisk": false,
      "createdDate": "2020-10-20T13:14:46Z",
      "claimant": {
        "name": "Dorthey Tieman",
        "mobilePhone": "44444444",
        "phone": "+45 81-53-44-28",
        "address1": "Random Street",
        "address2": "3/14",
        "postalCode": "2300",
        "city": "København S",
        "email": "johndoe@mail.com"
      },
      "claim": {
        "insuranceCompanyId": 7,
        "insuranceCompanyName": "Zurich",
        "claimHandlerName": "johndoe",
        "claimHandlerFullName": "John Doe",
        "claimHandlerEmail": "johndoe@mail.com",
        "claimReferenceNumber": 2897103,
        "claimNumber": "claimnumber1234",
        "selfRisk": 200.0,
        "claimDate": "2020-10-19T22:00:00Z",
        "customerNoteToClaim": "some notes",
        "policyNumber": "12345678",
        "policyType": "type1"
      },
      "servicePartner": {
        "name": "Service partner 1",
        "address1": "Fisketorvet Shopping Center, 201 Kalvebod Brygge",
        "address2": "some address",
        "phone": "88 81 80 01",
        "email": "shop@servicepartner1.com",
        "postalCode": "1560",
        "cvrNumber": "10166896",
        "city": "København V",
        "serviceAgreementName": "Service partner 1 sa",
        "bank": {
          "regNumber": "1233",
          "accountNumber": "1222222342321112",
          "iban": "CH93 0076 2011 6238 5295 7",
          "giro": "123eee3333",
          "fikType": "123456",
          "fikCreditorCode": "CODE1"
        },
        "location": {
          "name": "Bahne - Aalborg",
          "address1": "Nørregade 20",
          "address2": "some address",
          "postalCode": "9000",
          "city": "Aalborg",
          "phone": "38 40 50 16",
          "email": "johndoe@mail.com"
        }
      },
      "serviceLines": [
        {
          "claimLineId": 10882352,
          "uniqueId": "75f7f1f6-719c-424a-ae17-21eff191c202",
          "category": {
            "name": "Mobiltelefoner",
            "parentCategory": "Telefoni",
            "uniqueId": "09F7146D-26B6-4F6D-AE3C-2118F833B4FD"
          },
          "taskType": "REPAIR",
          "item": {
            "age": 24,
            "quantity": 1,
            "manufacturer": "APPLE",
            "serialNumber": "2567915",
            "damageDescription": "broken glass",
            "damageType": "type1",
            "repairLimit": 2000,
            "depreciation": 20,
            "model": "7 128GB",
            "customerNotesToClaimLine": "I broke the phone",
            "customerDescription": "APPLE iPhone 7 128GB Jetsort",
            "productMatchDescription": "APPLE iPhone 7 128GB Jetsort",
            "ean": "0190198069702"
          },
          "valuations": {
            "purchasePrice": 5200.0,
            "newPrice": 5000.0,
            "customerDemand": 3200.0,
            "discretionaryValuation": 3700.0,
            "usedPrice": 3500.0,
            "repairEstimate": 1500.0,
            "productPrice": 4213.02,
            "retailPrice": 4299.0
          },
          "attachments": [
            {
              "name": "photo.png",
              "link": "https://www.scalepoint.com/webapp/ScalePoint/dk/rest/file/56EFF336-2A1D-42C3-A074-1E4377D4916B"
            }
          ],
          "rejectReasons": [
            {
              "id": 1,
              "text": "The item cannot be repaired",
              "locale": "da-DK"
            },
            {
              "id": 2,
              "text": "The item has not been received",
              "locale": "da-DK"
            }
          ]
        }
      ]
    }
  ]
}

Appendix B2 – Task JSON schema

{
   "$schema":"http://json-schema.org/draft-07/schema#",
   "definitions":{
      "uniqueId":{
         "type":"string",
         "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
      },
      "claimant":{
         "type":"object",
         "title":"The Claimant details",
         "required":[
            "name"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "mobilePhone":{
               "type":"string"
            },
            "phone":{
               "type":"string"
            },
            "address1":{
               "type":"string"
            },
            "address2":{
               "type":"string"
            },
            "postalCode":{
               "type":"string"
            },
            "city":{
               "type":"string"
            },
            "email":{
               "type":"string"
            }
         }
      },
      "claim":{
         "type":"object",
         "title":"The Claim details",
         "required":[
            "claimNumber"
         ],
         "properties":{
            "insuranceCompanyId":{
               "type":"integer"
            },
            "insuranceCompanyName":{
               "type":"string"
            },
            "claimHandlerName":{
               "type":"string"
            },
            "claimHandlerFullName":{
               "type":"string"
            },
            "claimHandlerEmail":{
               "type":"string"
            },
            "claimReferenceNumber":{
               "type":"number"
            },
            "claimNumber":{
               "type":"string"
            },
            "selfRisk":{
               "type":"number"
            },
            "takenSelfRisk": {
               "type": "number"
            },
            "updateClaimSelfRisk": {
               "type": "number"
            },
            "updateSelfRiskReason": {
               "type": "string"
            },
            "claimDate":{
               "type":"string"
            },
            "customerNoteToClaim":{
               "type":"string"
            },
            "policyType":{
               "type":"string"
            },
            "policyNumber":{
               "type":"string"
            }
         }
      },
      "bank":{
         "type":"object",
         "title":"The Bank details",
         "required":[

         ],
         "properties":{
            "regNumber":{
               "type":"string"
            },
            "accountNumber":{
               "type":"string"
            },
            "iban":{
               "type":"string"
            },
            "giro":{
               "type":"string"
            },
            "fikType":{
               "type":"string"
            },
            "fikCreditorCode":{
               "type":"string"
            }
         }
      },
      "location":{
         "type":"object",
         "title":"The Location details",
         "required":[

         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "address1":{
               "type":"string"
            },
            "address2":{
               "type":"string"
            },
            "postalCode":{
               "type":"string"
            },
            "city":{
               "type":"string"
            },
            "phone":{
               "type":"string"
            },
            "email":{
               "type":"string"
            }
         }
      },
      "servicePartner":{
         "type":"object",
         "title":"The Servicepartner details",
         "required":[
            "name",
            "serviceAgreementName"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "address1":{
               "type":"string"
            },
            "address2":{
               "type":"string"
            },
            "phone":{
               "type":"string"
            },
            "email":{
               "type":"string"
            },
            "postalCode":{
               "type":"string"
            },
            "cvrNumber":{
               "type":"string"
            },
            "city":{
               "type":"string"
            },
            "serviceAgreementName":{
               "type":"string"
            },
            "bank":{
               "$ref":"#/definitions/bank"
            },
            "location":{
               "$ref":"#/definitions/location"
            }
         }
      },
      "item":{
         "type":"object",
         "title":"The Item Schema",
         "required":[
            "productMatchDescription",
            "quantity"
         ],
         "properties":{
            "customerDescription":{
               "type":"string"
            },
            "productMatchDescription":{
               "type":"string"
            },
            "manufacturer":{
               "type":"string"
            },
            "model":{
               "type":"string"
            },
            "serialNumber":{
               "type":"string"
            },
            "quantity":{
               "type":"integer"
            },
            "age":{
               "type":"integer"
            },
            "depreciation":{
               "type":"number"
            },
            "damageDescription":{
               "type":"string"
            },
            "damageType":{
               "type":"string"
            },
            "repairLimit":{
               "type":"number"
            },
            "customerNotesToClaimLine":{
               "type":"string"
            },
            "ean":{
               "type":"string",
               "title":"EAN - European Article Number"
            }
         }
      },
      "valuations":{
         "type":"object",
         "required":[

         ],
         "properties":{
            "purchasePrice":{
               "type":"number"
            },
            "newPrice":{
               "type":"number"
            },
            "customerDemand":{
               "type":"number"
            },
            "discretionaryValuation":{
               "type":"number"
            },
            "usedPrice":{
               "type":"number"
            },
            "repairEstimate":{
               "type":"number"
            },
            "repairPrice":{
               "type":"number"
            },
            "productPrice":{
               "type":"number"
            },
            "retailPrice":{
               "type":"number"
            }
         }
      },
      "category":{
         "type":"object",
         "required":[
            "name",
            "uniqueId",
            "parentCategory"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "uniqueId":{
               "$ref":"#/definitions/uniqueId"
            },
            "parentCategory":{
               "type":"string"
            }
         }
      },
      "serviceLine":{
         "type":"object",
         "required":[
            "item",
            "valuations",
            "claimLineId",
            "uniqueId",
            "category",
            "taskType"
         ],
         "properties":{
            "claimLineId":{
               "type":"number"
            },
            "uniqueId":{
               "$ref":"#/definitions/uniqueId"
            },
            "taskType":{
               "type":"string",
               "enum":[
                  "REPAIR",
                  "REPAIR_ESTIMATE",
                  "VALUATION",
                  "MATCH_SERVICE"
               ]
            },
            "item":{
               "$ref":"#/definitions/item"
            },
            "valuations":{
               "$ref":"#/definitions/valuations"
            },
            "category":{
               "$ref":"#/definitions/category"
            },
            "rejectReasons": {
              "type": "array",
              "title": "The list of reject reasons",
              "items": {
                "$ref": "#/definitions/rejectReason"
              }
            }
         }
      },
      "attachment":{
         "type":"object",
         "required":[
            "name",
            "link"
         ],
         "properties":{
            "name":{
               "type":"string"
            },
            "link":{
               "type":"string"
            }
         }
      },
      "serviceTask":{
         "type":"object",
         "title":"RV Task",
         "required":[
            "uniqueId",
            "createdDate",
            "replyAddress",
            "claimant",
            "claim",
            "serviceLines",
            "noteToServicePartner"
         ],
         "properties":{
            "uniqueId":{
               "$ref":"#/definitions/uniqueId"
            },
            "createdDate":{
               "type":"string"
            },
            "replyAddress":{
               "type":"string"
            },
            "invoicePaidBy":{
               "type":"string"
            },
            "allowedToCollectSelfRisk":{
               "type":"boolean"
            },
            "allowedToUpdateSelfRisk":{
               "type":"boolean"
            },
            "noteToServicePartner":{
               "type":"string"
            },
            "damageType":{
               "type":"string"
            },
            "damageCauseDescription":{
               "type":"string"
            },
            "claimant":{
               "$ref":"#/definitions/claimant"
            },
            "claim":{
               "$ref":"#/definitions/claim"
            },
            "servicePartner":{
               "$ref":"#/definitions/servicePartner"
            },
            "serviceLines":{
               "type":"array",
               "title":"The task lines details",
               "items":{
                  "$ref":"#/definitions/serviceLine"
               }
            },
            "attachments":{
               "type":"array",
               "title":"The attached files array",
               "items":{
                  "$ref":"#/definitions/attachment"
               }
            }
         }
      },
      "rejectReason": {
        "type": "object",
        "required": [
          "id",
          "text"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "text": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          }
        }
      }
   },
   "type":"object",
   "required":[
      "serviceTasks"
   ],
   "properties":{
      "serviceTasks":{
         "type":"array",
         "title":"Container for RV tasks",
         "items":{
            "$ref":"#/definitions/serviceTask"
         }
      }
   }
}

Appendix B3 – Description of task JSON elements

ElementParent ElementAttributeUseDescription
serviceTasksRequiredContainer for R&V tasks
serviceTaskserviceTasksRequiredContainer for a single R&V task
serviceTaskuniqueIdRequiredThe unique identifier of the task.
serviceTaskcreatedDateRequiredDate and time of json creation
serviceTaskreplyAddressRequiredEmail address to which service partner can send any attachments
serviceTaskdamageTypeOptionalDamage type
serviceTaskdamageCauseDescriptionOptionalDamage cause description
serviceTaskinvoicePaidByOptional
serviceTaskallowedToCollectSelfRiskOptionalRepresent if service partner can collect some amount from self-risk
serviceTaskallowedToUpdateSelfRiskOptionalRepresent if service partner can update claim self risk
claimserviceTaskRequiredClaim details
claimclaimNumberOptionalClaim number
claimclaimReferenceNumberOptionalClaim identification
claimclaimDateOptionalDate of the claim creation
claimclaimHandlerFullNameOptionalFull name of the claim handler
claimclaimHandlerEmailOptionalClaim handler email
claimclaimHandlerNameOptionalClaim handler login name
claimcustomerNoteToClaimOptionalClaimant note to claim
claiminsuranceCompanyIdOptionalInsurance company identification
claiminsuranceCompanyNameOptionalInsurance company name
claimpolicyNumberOptionalPolicy number
claimpolicyTypeOptionalPolicy type
claimselfRiskOptionalSelf risk amount
claimlanguageOptionallanguage of the claim (only for multi-language countries)
claimantserviceTaskRequiredClaimant details
claimantnameOptionalClaimant name
claimantaddress1OptionalClaimant address
claimantaddress2OptionalClaimant second address
claimantcityOptionalClaimant city
claimantemailOptionalClaimant email
claimantmobilePhoneOptionalClaimant mobile phone
claimantphoneOptionalClaimant phone
claimantpostalCodeOptionalClaimant postal code
serviceLinesserviceTaskRequiredContainer for service lines
serviceLineserviceLinesRequiredService line details
serviceLineclaimLineIdRequiredId of the ClaimShop service line
serviceLineuniqueIdRequiredGUID of the ClaimShop service line
serviceLinetaskTypeRequiredType of the R&V task. Possible values: REPAIR, REPAIR_ESTIMATE, VALUATION, MATCH_SERVICE
categoryserviceLineRequiredCategory of the service line
categorynameRequiredName of the category
categoryuniqueIdRequiredGUID of the category (received from Scalepoint)
categoryparentCategoryRequiredName of the parent category
itemserviceLineRequiredService line data
itemcustomerDescriptionOptionalItem description by customer
itemproductMatchDescriptionRequiredItem description
itemmanufacturerOptionalItem manufacturer
itemmodelOptionalItem model
itemserialNumberOptionalItem serial number
itemquantityRequiredQuantity
itemageOptionalAge in months
itemdepreciationOptionaldepreciation
itemdamageDescriptionOptionalDamage description
itemrepairLimitOptionalRepair limit amount
itemcustomerNotesToClaimLineOptionalClaimant note to the item
ItemEANOptionalProduct EAN
itemdamageTypeOptionalDamage type for line chosen from pseudo category
valuationsserviceLineRequiredService line details
valuationspurchasePriceOptionalPurchase price
valuationsnewPriceOptionalprice of the new item
valuationscustomerDemandOptionalCustomer demand price
valuationsproductPriceOptionalProduct price
valuationsretailPriceOptionalRetail price
valuationsdiscretionaryValuationOptionalDiscretionary valuation
valuationsusedPriceOptionalUsed item price
valuationsrepairEstimateOptionalRepair estimate
valuationsrepairPriceOptionalRepair price
rejectReasonsserviceLineRequiredItem reject reasons
rejectReasonsidRequiredReject reason id
rejectReasonstextRequiredReject reason text
rejectReasonslocaleOptionalReject reason text locale
servicePartnerserviceTaskOptionalService partner details
servicePartnernameRequiredService partner name
servicePartneraddress1OptionalService partner address
servicePartneraddress2OptionalService partner second address
servicePartnerphoneOptionalService partner phone
servicePartneremailOptionalService partner email
servicePartnerpostalCodeOptionalService partner postal code
servicePartnercvrNumberOptionalService partner company number (CVR for DK)
servicePartnercityOptionalService partner city
servicePartnerserviceAgreementNameRequiredName of the service agreement
bankservicePartnerOptionalBank details
bankregNumberOptionalBank registration number
bankaccountNumberOptionalBank account number
bankfikTypeOptionalBank FIK type
bankfikCreditorCodeOptionalBank FIK creditor code
bankIBANOptionalBank IBAN
bankGIROOptionalBank GIRO
locationservicePartnerRequiredService partner location details
locationnameOptionalService partner location name
locationaddress1OptionalService partner location address
locationaddress2OptionalService partner location second address
locationcityOptionalService partner location city
locationemailOptionalService partner location email
locationphoneOptionalService partner location phone
locationpostalCodeOptionalService partner location postal code
noteToServicePartnerserviceTaskRequiredNote to service partner
attachmentsserviceTaskOptionalFiles attached to service task
attachmentsserviceLineOptionalFiles attached to service line
attachmentattachmentsOptionalAttached file
attachmentnameRequiredFile name
attachmentlinkRequiredLink to the file

Appendix C1 – Sample message JSON

{
   "type":"RVInvoiceWasReceivedMail",
   "details":{
      "taskGuid":"0829a953-5f85-4d41-a30c-a582101812f4",
      "insuranceCompanyName":"InsCompany1",
      "claimNumber":"number123",
      "policyNumber":"",
      "claimantName":"Larry Henry",
      "servicePartnerName":"ServPart1"
   },
   "invoice":{
      "count":2,
      "amount":1000.00
   },
   "selfRisk":{
      "claimSelfRisk":0.00,
      "updatedClaimSelfRisk":0,
      "claimSelfRiskUpdateReason":""
   }
}

Appendix C2 – Sample message schema


{
   "$schema":"http://json-schema.org/draft-07/schema#",
   "type":"object",
   "required":[
      "type",
      "details",
      "invoice",
      "selfRisk"
   ],
   "properties":{
      "type":{
         "type":"string"
      },
      "text":{
         "type":"string"
      },
      "details":{
         "type":"object",
         "required":[
            "taskGuid",
            "insuranceCompanyName",
            "claimNumber",
            "claimantName",
            "servicePartnerName"
         ],
         "properties":{
            "taskGuid":{
               "type":"string"
            },
            "insuranceCompanyName":{
               "type":"string"
            },
            "claimNumber":{
               "type":"string"
            },
            "policyNumber":{
               "type":"string"
            },
            "claimantName":{
               "type":"string"
            },
            "servicePartnerName":{
               "type":"string"
            }
         }
      },
      "invoice":{
         "type":"object",
         "required":[
            "count",
            "amount"
         ],
         "properties":{
            "count":{
               "type":"integer"
            },
            "amount":{
               "type":"number"
            },
            "paymentDate":{
               "type":"string"
            }
         },
         "selfRisk":{
            "type":"object",
            "required":[

            ],
            "properties":{
               "claimSelfRisk":{
                  "type":"number"
               },
               "updatedClaimSelfRisk":{
                  "type":"number"
               },
               "claimSelfRiskUpdateReason":{
                  "type":"string"
               }
            }
         }
      }
   }
}

Appendix D1 – Sample free text message JSON

{
  "taskGuid":"9a4da5d2-ec13-4d10-9949-0461c7ad15c6",
  "textMessage":"Chat message text",
  "attachments":[
    {
      "name":"Test.pdf",
      "link":"https://www.scalepoint.com/webapp/ScalePoint/dk/rest/file/00000001-3E87-474C-BCE5-E15657DF736E"
    },
    {
      "name":"13_22.png",
      "link":"https://www.scalepoint.com/webapp/ScalePoint/dk/rest/file/00000002-9AA4-4B87-B419-6B70726CF5F6"
    }
  ]
}

Appendix D2 – Sample free text message schema

{
  "$schema":"http://json-schema.org/draft-07/schema#",
  "definitions":{
    "attachment":{
      "type":"object",
      "required":[
        "name",
        "link"
      ],
      "properties":{
        "name":{
          "type":"string"
        },
        "link":{
          "type":"string"
        }
      }
    }
  },
  "type":"object",
  "required":[
    "taskGuid",
    "textMessage"
  ],
  "properties":{
    "taskGuid": {
      "type": "string",
      "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "textMessage": {
      "type": "string"
    },
    "attachments":{
      "type":"array",
      "title":"The attached files array",
      "items":{
        "$ref":"#/definitions/attachment"
      }
    }
  }
}

Service Partners Integration Testing Before Go Live

Last updated on

On this page