Rules and errors
Message types
The MessageType, systemMessage.messageType, decides what a request does. Any other value is rejected with 400.
| MessageType | What it does | What it needs |
|---|
| New (1) | Creates the case and gives it a ChappCaseId. The case is stored as it was sent, and its service data is stored a moment later. The response has status Processing. | No ChappCaseId. serviceInfo.clientCaseOwnerId as a number that is your own company, and at least one event. |
| Event (2) | Merges the events of rsaCase.events into the case and changes nothing else. An event with the same eventTime and eventType as a stored one updates it; any other event is added; stored events that are not sent are kept. | A ChappCaseId, and at least one event. |
| Update (3) | Merges the fields of rsaCase into the case, and its events the same way as Event. Events already stored but not sent again are kept. The merge is done before the response is sent, and the response holds the case as stored. | A ChappCaseId, serviceInfo.clientCaseOwnerId as a number, and at least one event. The case owner cannot change. |
| Discard (4) | Marks the case as discarded: its status becomes Aborted and later Update, Event and Discard messages are refused. Only the ChappCaseId is used; the case in the body is not checked. Allowed also while the case is still being stored. | A ChappCaseId. |
A discarded case, status Aborted, is closed: Update, Event and Discard are then refused with 400 case is discarded, and the case can still be read. Event and Update sent right after New, before the case has been stored, are refused with 409 and change nothing; send them again a moment later. Discard is accepted at any time.
The event chain in the request
Each step of the Chapp event chain is one Event in rsaCase.events, told apart by its EventTypeEnum. The first event, RECEIVED, is sent with MessageType New (1) and no ChappCaseId; the response gives the case its ChappCaseId. Later events are sent with MessageType Event (2) and the case's ChappCaseId, carrying the new event in rsaCase.events. The events already stored are kept, so there is no need to send them again. Data that the step adds to the case itself, such as the service provider, is sent with MessageType Update (3).
| Step on the home page | eventType | Data it adds |
|---|
| 1 RECEIVED | ReceivedService (1) | serviceInfo, vehicle, endUser, serviceLocation |
| 2 ASSIGNED | AssignedService (2) | serviceProvider |
| 3 STARTED | StartedService (3) | the event's position |
| 4 ARRIVED | ArrivedAtServiceLocation (4) | the event's position |
| 5a SOLVED ON LOCATION | FinishedAtServiceLocation (5) | serviceInfo.incidentTypeConfirmedByTower, images |
| 5b LEFT | LeftServiceLocation (6) | serviceInfo.incidentTypeConfirmedByTower, dropOffLocation, images |
| 6 DROP OFF | FinishedAtDropoffLocation (7) | the event's position, dropOffLocation |
Rules
- Every request carries a valid access token (see Authentication).
- MessageType New (1) must not carry a ChappCaseId.
- MessageType Event (2), Update (3) and Discard (4) require a ChappCaseId.
- New, Event and Update carry at least one event in rsaCase.events, and none of them may be null.
- New, Event and Update carry serviceInfo.clientCaseOwnerId as a whole number, sent as a string such as "1000"; otherwise the request is rejected with 400. On New it must be your own company, otherwise the request is rejected with 403. The case owner cannot be changed by an Update.
- Event, Update, Discard and the read operation reach only cases created by your client. An unknown ChappCaseId and a case created by another client are both answered with 404. Event and Update check this first, so they answer 404 before the body is checked.
- Every field marked Required under Schemas must be present; otherwise the request is rejected with 400.
- A message that is accepted but has missing fields, or fields that differ from earlier messages, is still answered with 200. The response then carries a warning that lists them.
Errors
An error is returned with the HTTP status shown, as a ResponseModel<RSACaseResponse> whose data is null and whose error always holds message, statusCode as a number and errorData, which is null when there is no extra data. The message is exactly as shown. A request without a valid token, or with a token that does not identify a client, gets 401 with no body.
| Status | When | Message |
|---|
| 400 | MessageType is not 1, 2, 3 or 4 | messageType must be 1 (New), 2 (Event), 3 (Update) or 4 (Discard) |
| 400 | MessageType is New and a ChappCaseId is set | ChappCaseId should not be set when MessageType is New |
| 400 | MessageType is Event, Update or Discard and no ChappCaseId is set | Event request needs a ChappCaseId (Update request needs a ChappCaseId, Discard request needs a ChappCaseId) |
| 400 | serviceInfo or serviceInfo.clientCaseOwnerId is missing, or is not a whole number (New, Event, Update) | clientCaseOwnerId must be a number |
| 400 | The events are missing or empty (New, Event, Update) | At least one event is required |
| 400 | The events hold a null (New, Event, Update) | events must not contain null |
| 400 | The case has been discarded and an Update, Event or Discard is sent | case is discarded |
| 400 | An Update would change the case owner | clientCaseOwnerId cannot change on an existing case |
| 403 | New is sent with a clientCaseOwnerId that is not your own company | clientCaseOwnerId must be your own company |
| 400 | A required field is missing | Error envelope with message "Required fields are missing" |
| 401 | No access token, an invalid one, or a token that does not identify a client that has been set up for the API | None |
| 404 | The ChappCaseId is unknown, or belongs to a case created by another client. Event and Update are answered with 404 before their body is checked | Case not found |
| 409 | Event or Update is sent before the case created by New has been stored | Case is still being created, retry shortly |
| 500 | The case could not be stored or queued | The case could not be stored, or The case could not be queued for processing |
{
"chappCaseId": "00000000-0000-0000-0000-00000000c0de",
"data": null,
"error": { "message": "Case not found", "errorData": null, "statusCode": 404 }
}The answer to a missing required field has the same shape, and errorData tells which fields:
{
"chappCaseId": null,
"data": null,
"error": {
"message": "Required fields are missing",
"errorData": { "errors": { "<field>": "<message>" } },
"statusCode": 400
}
}Example
A new case at its first event, RECEIVED: an RSACaseRequest sent with Send an RSA case message · POST. All values are made up.
{
"chappCaseId": null,
"rsaCase": {
"chappCaseId": null,
"serviceInfo": {
"clientId": "100001",
"references": null,
"created": "2026-01-15T12:28:12+01:00",
"preBookTime": null,
"eta": null,
"serviceType": 3,
"incidentTypeReportedByEndUser": 6,
"incidentTypeConfirmedByTower": null,
"comment": null,
"clientCaseOwnerId": "1000",
"clientCaseOwnerName": "Example Insurance",
"caseOwnerProductID": "1",
"product": "Example product",
"personAtServiceLocation": null
},
"vehicle": {
"registrationNumber": "ABC123",
"brand": "EXAMPLE CAR 1.2 AUT",
"color": null,
"vehicleType": {
"type": "Car",
"subType": "Passenger car"
},
"vin": "XXXXXXXXXXX000000",
"weight": null,
"totalWeight": null,
"country": null,
"registrationDate": null,
"fourWheelDrive": null,
"gearType": null,
"fuelType": null,
"description": null,
"odometerReading": null,
"countryOfOrigin": null,
"chassiCode": null,
"chassiCodeAdditional": null,
"chassiCodeSpecial": null,
"drivingBan": null,
"drivingBanReason": null,
"drivingBanDate": null,
"firstRegistrationYear": null,
"registartionStatus": null,
"registrationStatusYear": null,
"searchedFor": null,
"searchedForDate": null,
"directImport": null,
"owner": null
},
"insuranceInfo": null,
"serviceProvider": null,
"endUser": {
"name": "Jane Doe",
"phone": "+46 70 000 00 00",
"mail": null,
"language": "SE",
"socialSecurityNumber": null,
"organizationNumber": null,
"address": null
},
"events": [
{
"clientEventId": "E-0001",
"eventType": 1,
"position": null,
"address": null,
"eventTime": "2026-01-15T12:30:00+01:00",
"comment": null
}
],
"comments": [],
"serviceLocation": {
"address": {
"streetAddress": "Example Street 1",
"city": "Exampletown",
"zip": "000 00",
"country": "SE"
},
"position": {
"latitude": 59,
"longitude": 18
},
"description": "",
"sourceType": 2
},
"images": [],
"dropOffLocation": null,
"instructions": []
},
"systemMessage": {
"messageTime": "2026-01-15T12:30:05+01:00",
"messageGuid": "00000000-0000-0000-0000-000000000001",
"messageType": 1,
"comment": null
}
}The response, a ResponseModel<RSACaseResponse>, shortened:
{
"chappCaseId": "00000000-0000-0000-0000-00000000c0de",
"data": {
"rsaCase": {
"chappCaseId": "00000000-0000-0000-0000-00000000c0de",
"serviceInfo": { "clientId": "100001", … },
…
},
"status": 1
}
}