Create a journalized case
The endpoint is used to create a new journalized case for a specific diary.
- URL:
{{baseUrl}}/api/v7/diaries/{id}/journalized-cases - Method:
POST
Path Parameters
id(ApiId): The unique identifier of the diary.
Request Body
The request body consists of the following fields:
diaryNumber(string, nullable): Custom diary number (if not specified, then Platina automatically assigns diary number to the created case).registrationDate(string): Date of registration.inOutDate(string): Inbound/outbound date of the case.statusId(ApiId): Unique identifier referring to a status of journalized case (can be obtained using/api/v7/reference-data/journalized-case-statusesAPI endpoint).origin(object): Origin of the journalized case (can be obtained using/api/v7/reference-data/journalized-case-originsAPI endpoint).businessCodeId(ApiId, nullable): Unique identifier referring to a business code (can be obtained using/api/v7/reference-data/business-codesAPI endpoint).
Note: The field is required whenDiary_EnableBusinessCodePlatina setting is set totrue.caseTypeId(ApiId): Unique identifier referring to a case type (can be obtained using/api/v7/reference-data/case-typesor/api/v7/diaries/{id}/case-typesAPI endpoints).pulLevel(integer): PUL level (supported levels can be obtained using/api/v7/reference-data/journalized-case-pul-levelsAPI endpoint).secrecyLevel(integer): Secrecy level (supported levels can be obtained using/api/v7/reference-data/journalized-case-secrecy-levelsAPI endpoint).confidentialParagraphs(array of ApiIds, nullable): List of confidential paragraphs (defined paragraphs can be obtained using/api/v7/reference-data/confidential-paragraphsAPI endpoint).
Note: The field is required whensecrecyLevelis1or2.title(string): The title of the journalized case (max length: 200, min length: 1).description(string): The description of the journalized case (max length: 4000, min length: 1).initiators(array): List of initiators.- Information about initiator includes the following fields:
name(string): Name of the initiator.countryId(ApiId, nullable): Unique identifier referring to a country.city(string, nullable): City of the initiator.zipCode(string, nullable): Zip code of the initiator.co(string, nullable): C/o of the initiator.streetAddress(string, nullable): Street address of the initiator.phoneNumber(string, nullable): Phone number of the initiator.cellular(string, nullable): Cellular number of the initiator.email(string, nullable): Email address of the initiator.personOrgNumber(string, nullable): Personal/organization number of the initiator.
- Information about initiator includes the following fields:
handlingOfficers(array, nullable): List of handling officers.- Information about handling officer includes the following fields:
id(ApiId): ID of the handling officer (can be obtained using/api/v7/diaries/{id}/handling-officersAPI endpoint).message(string, nullable): Message to the handling officer.isMain(boolean): Indicates whether handlig officer is the main one.
- Information about handling officer includes the following fields:
organizationId(ApiId, nullable): Unique identifier referring to an organization associated with the case.customFields(object, nullable): Custom fields.
Responses
- 201 Created: When the journalized case is created. The
Locationresponse header contains a URL to the created journalized case.
Additionally, response includesX-Platina-DiaryNumberheader that contains a value of assigned diary number to the case. The{{baseUrl}}/api/v7/journalized-cases/with-diary-number/{diaryNumber}API endpoint can be used to get information about journalized case by diary number instead of ID. - 404 NotFound: When some of the related data (e.g. diary) does not exist, or requesting user does not have access to it.
- 400 BadRequest: When some of the business rules violated, or invalid data in request was provided.
- 409 Conflict: When data in request contradicts Platina configuration (like not specifying
businessCodeIdwhen business code is enabled in Platina settings). - 500 InternalServerError: Indicates an error on the server side.
Usage Example
To use the {{baseUrl}}/api/v7/diaries/{id}/journalized-cases endpoint:
- Replace
{id}in the URL with the actual diary ID. - Ensure that the request body includes all required fields for a journalized case.
- Make a POST request to the endpoint.
- Handle the response according to the status code received.
Sample request body:
{
"registrationDate": "2024-10-18T00:00:00+03:00",
"inOutDate": "2024-10-18T00:00:00+03:00",
"statusId": "XRMj9KQampl",
"origin": "Incoming",
"businessCodeId": "o2Nk98X94gZ",
"caseTypeId": "o2Nk98X94gZ",
"pulLevel": 1,
"secrecyLevel": 2,
"confidentialParagraphs": [
"o2Nk98X94gZ",
"XRMj9KQampl"
],
"title": "Generic Harbor",
"description": "Proactive Tasty Wooden Bacon",
"initiators": [
{
"name": "Geraldine Keefe",
"countryId": "6mZXaxg0LOy",
"city": "Stockholm",
"zipCode": "120 02",
"co": "Sample co",
"streetAddress": "Sample address two",
"phoneNumber": "123456789",
"cellular": "987654321",
"email": "email@example.com",
"personOrgNumber": "197403216893"
}
],
"handlingOfficers": [
{
"id": "KQ07k4OM10X",
"message": "Sample message to Handling Officer",
"isMain": true
}
],
"customFields": {
"bkStr1": "bk_string_value",
"bkStr2": "bk_string_value",
"bkStr3": "bk_string_value",
"bkInt8": 123,
"bkFloat5": 123.123,
"bkFloat8": 123.123
},
"organizationId": "XRMj9KQampl"
}
// Sample C# code to call the endpoint
var client = new HttpClient();
var content = new StringContent("...JSON string of request body...", Encoding.UTF8, "application/json");
var response = await client.PostAsync("{{baseUrl}}/api/v7/diaries/Nk981MWbd04/journalized-cases", content);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Journalized case created successfully.");
}
else
{
Console.WriteLine("Error occurred: " + response.StatusCode);
}