Case file operations



Introduction

Once you have the token, you can start sending requests to the API.


Operations

Create a "Case file"

The first interaction you have to do with the API is to create a "Case file".

HTTP Request

POST /api/v1/private/case-files

With the following information provided as JSON:

{
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "code": "example code",
        "description": "example description",
        "category": "example category",
        "owner": "example owner",
        "title": "example title",
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        }
    }

Request body parameters

Parameter Mandatory Datatype Description
id yes UUID An identification for the "Case file". UUID V4
code no string(50) The code of the "Case file". It must be unique
description no string(255) The description of the "Case file"
category no string(50) The category of the "Case file"
owner no string(50) The owner of the "Case file"
title yes string(255) The title of the "Case file"
metadata no object Metadata of the "Case file"

As response, you will get

201 "Case File" created

Update a "Case file"

To be able to update the information of "Case files"

HTTP Request

PATCH /api/v1/private/case-files

With the following information provided as JSON:

{
        "caseFileIds": "[\"7e81750d-7906-43c9-bf6b-a9f30847c2e9\", \"1f7193a6-2454-4c67-8a64-b73c1049e92c\"]",
        "description": "example description",
        "category": "example category",
        "owner": "example owner",
        "title": "example title"
      }

If you only want to update one of the fields you only have to send this one in the request.

Delete "Case file"

To delete a "Case file" you can make the following requests using the id of the "Case file".

HTTP Request

WIP

Get "Case file" info

To get the information of a "Case file" you can make the following requests using the id of the "Case File".

HTTP Request

/api/v1/private/case-files/{caseFileId}

And as response, we would get the following JSON object:

{
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "code": "example code",
        "description": "example description",
        "category": "example category",
        "owner": "example owner",
        "status": "OPEN",
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        },
        "groups": "example title",
        "title": "example title",
        "createdAt": "2023-10-23T10:34:59.483Z",
        "updatedAt": "2023-10-23T10:34:59.483Z"
      }

Where:

HTTP Response parameters

Parameter Datatype Description
id UUID An identification for the "Case file". UUID V4
code string(50) The code of the "Case file". It must be unique
description string(255) The description of the "Case file"
category string(50) The category of the "Case file"
owner string(50) The owner of the "Case file"
status string(50) The status of the "Case file"
title string(255) The title of the "Case file"
metadata string Metadata of the "Case file"
groups string Groups inside the "Case file"

Get "Case files" list

If you want to get the list of all the "Case files" in your system, you can make the following requests:

HTTP Request

GET /api/v1/private/case-files

And as response, we would get the following JSON object:

{
        "id": "[3fa85f64-5717-4562-b3fc-2c963f66afa6, c3a8eb1c-3f6d-4bad-9e6b-c7e29461d021]",
        "code": "example code",
        "title": "example title",
        "category": "[cat1, cat2]",
        "owner": "[owner1, owner2]",
        "status": "OPEN",
        "createdFrom": "2023-10-24T10:30:50.794Z",
        "createdUntil": "2023-10-24T10:30:50.794Z",
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        },
        "page": 0,
        "size": 0,
        "sort": "[\"title:ASC\", \"createdAt:DESC\"]"
      }

These call can be paged. This is specially usefull when you have to retrieve a big amount of elements.

By default, the size of the page is 20 elements, and you can put a maximum size of 200 elements. The response shows a list of resources to make the paged calls, basically you can set the page, the size, and the field you want to sort the list by.

Example:

GET api/v1/private/case-files?page=0&size=25

If you want to try any of these functionalities yourself and learn more about them, please go to the API catalogue