{
  "openapi": "3.0.4",
  "info": {
    "title": "Business Cases API",
    "description": "**Welcome to the Business Cases API documentation.**\r\n\r\nYou can test the API using **[Swagger](/business-cases/demo/v10-0/docs/swagger)**.\r\n\r\nYou can find a detailed documentation by following **[this link](https://docs.egov4.ch/docs/9.1/category/business-cases-api)**.\r\n",
    "contact": {
      "name": "Artionet",
      "url": "https://www.artionet.ch/",
      "email": "support@artionet.com"
    },
    "version": "v10.0",
    "x-logo": {
      "url": "/business-cases/demo/v10-0/Documentation/Images/logo_artionet.png",
      "backgroundColor": "#fafafa",
      "altText": "Artionet Logo"
    }
  },
  "servers": [
    {
      "url": "/business-cases/demo/v10-0"
    }
  ],
  "paths": {
    "/businesscases/{businessCaseId}": {
      "get": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Get a single business case",
        "description": "Allows to retrieve a specific business case identified by its `Id`.",
        "operationId": "BusinessCaseById",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected business case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessCaseDto"
                }
              }
            }
          },
          "404": {
            "description": "Selected business case doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Update a business case",
        "description": "Allows to update certain properties of an existing business case.",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business Case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Updated properties",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessCaseForUpdateDto"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated business case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessCaseDto"
                }
              }
            }
          },
          "400": {
            "description": "Request body is null or synthax is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Selected business case doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Delete a business case",
        "description": "Allows to delete an existing business case (and its activities).",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Selected business case doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/businesscases": {
      "get": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Get a list of business cases",
        "description": "Allows to retrieve a list of business cases (GET only) according to certain criteria.",
        "parameters": [
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Filters cases by `OwnerId` property (Profile ID from ePortal)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PrestationIds",
            "in": "query",
            "description": "Filters cases by `PrestationId` property",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "OwnerIds",
            "in": "query",
            "description": "Filters cases by `OwnerId` property (Profile ID from ePortal)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SetOfServiceIds",
            "in": "query",
            "description": "Filters cases by `PrestationId` property\r\n\r\n Each set of Service Ids is related to an OwnerId in the parameter `OwnerIds`.",
            "schema": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          },
          {
            "name": "IsClosed",
            "in": "query",
            "description": "Filters cases by `IsClosed` property",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Filters cases by `Status` property",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SubStatus",
            "in": "query",
            "description": "Filters cases by `SubStatus` property",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MinDecisionUpdateStamp",
            "in": "query",
            "description": "Cases with an earlier or equal `DecisionUpdateStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MaxDecisionUpdateStamp",
            "in": "query",
            "description": "Cases with a later or equal `DecisionUpdateStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MinDecisionCreationStamp",
            "in": "query",
            "description": "Cases with an earlier or equal `DecisionCreationStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MaxDecisionCreationStamp",
            "in": "query",
            "description": "Cases with a later or equal `DecisionCreationStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "OpenCasesOrClosedSinceNDays",
            "in": "query",
            "description": "Cases that are open OR cases that have been closed since N days",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsVisibleOnDashboard",
            "in": "query",
            "description": "Filters cases by `VisibleOnDashboard` property from their status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsVisibleOnDetailedListing",
            "in": "query",
            "description": "Filters cases by `VisibleOnDetailedListing` property from their status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasToBeReminded",
            "in": "query",
            "description": "Cases for which the `ReminderDate` is current or in the past while not having been reminded yet.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Expand",
            "in": "query",
            "description": "Indicates which child objects will be expanded in the reponse",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/BusinessCasesExpand"
              }
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page. Using value `-1` disable pagination and gives all results at once.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "OrderBy",
            "in": "query",
            "description": "Sorting option. \r\n\r\n**Usage (no square brackets !) :** `orderBy=[property] [asc,desc],[property] [asc,desc],...`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of selected business cases (GET only)",
            "headers": {
              "X-Pagination-Total-Count": {
                "description": "Total number of elements",
                "schema": {
                  "type": "integer",
                  "description": "Total number of elements",
                  "format": ""
                }
              },
              "X-Pagination-Page-Size": {
                "description": "Size of a page of element",
                "schema": {
                  "type": "integer",
                  "description": "Size of a page of element",
                  "format": ""
                }
              },
              "X-Pagination-Current-Page": {
                "description": "Index of the current page",
                "schema": {
                  "type": "integer",
                  "description": "Index of the current page",
                  "format": ""
                }
              },
              "X-Pagination-Total-Pages": {
                "description": "Total number of pages",
                "schema": {
                  "type": "integer",
                  "description": "Total number of pages",
                  "format": ""
                }
              },
              "X-Pagination-Next-Page-Link": {
                "description": "Link to the next page",
                "schema": {
                  "type": "string",
                  "description": "Link to the next page",
                  "format": ""
                }
              },
              "X-Pagination-Previous-Page-Link": {
                "description": "Link to the previous page",
                "schema": {
                  "type": "string",
                  "description": "Link to the previous page",
                  "format": ""
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BusinessCaseDto"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Get a list of business cases",
        "description": "Allows to retrieve a list of business cases (GET only) according to certain criteria.",
        "parameters": [
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Filters cases by `OwnerId` property (Profile ID from ePortal)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PrestationIds",
            "in": "query",
            "description": "Filters cases by `PrestationId` property",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "OwnerIds",
            "in": "query",
            "description": "Filters cases by `OwnerId` property (Profile ID from ePortal)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SetOfServiceIds",
            "in": "query",
            "description": "Filters cases by `PrestationId` property\r\n\r\n Each set of Service Ids is related to an OwnerId in the parameter `OwnerIds`.",
            "schema": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          },
          {
            "name": "IsClosed",
            "in": "query",
            "description": "Filters cases by `IsClosed` property",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Filters cases by `Status` property",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SubStatus",
            "in": "query",
            "description": "Filters cases by `SubStatus` property",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MinDecisionUpdateStamp",
            "in": "query",
            "description": "Cases with an earlier or equal `DecisionUpdateStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MaxDecisionUpdateStamp",
            "in": "query",
            "description": "Cases with a later or equal `DecisionUpdateStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MinDecisionCreationStamp",
            "in": "query",
            "description": "Cases with an earlier or equal `DecisionCreationStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MaxDecisionCreationStamp",
            "in": "query",
            "description": "Cases with a later or equal `DecisionCreationStamp`",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "OpenCasesOrClosedSinceNDays",
            "in": "query",
            "description": "Cases that are open OR cases that have been closed since N days",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsVisibleOnDashboard",
            "in": "query",
            "description": "Filters cases by `VisibleOnDashboard` property from their status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsVisibleOnDetailedListing",
            "in": "query",
            "description": "Filters cases by `VisibleOnDetailedListing` property from their status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasToBeReminded",
            "in": "query",
            "description": "Cases for which the `ReminderDate` is current or in the past while not having been reminded yet.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Expand",
            "in": "query",
            "description": "Indicates which child objects will be expanded in the reponse",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/BusinessCasesExpand"
              }
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page. Using value `-1` disable pagination and gives all results at once.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "OrderBy",
            "in": "query",
            "description": "Sorting option. \r\n\r\n**Usage (no square brackets !) :** `orderBy=[property] [asc,desc],[property] [asc,desc],...`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of selected business cases (GET only)",
            "headers": {
              "X-Pagination-Total-Count": {
                "description": "Total number of elements",
                "schema": {
                  "type": "integer",
                  "description": "Total number of elements",
                  "format": ""
                }
              },
              "X-Pagination-Page-Size": {
                "description": "Size of a page of element",
                "schema": {
                  "type": "integer",
                  "description": "Size of a page of element",
                  "format": ""
                }
              },
              "X-Pagination-Current-Page": {
                "description": "Index of the current page",
                "schema": {
                  "type": "integer",
                  "description": "Index of the current page",
                  "format": ""
                }
              },
              "X-Pagination-Total-Pages": {
                "description": "Total number of pages",
                "schema": {
                  "type": "integer",
                  "description": "Total number of pages",
                  "format": ""
                }
              },
              "X-Pagination-Next-Page-Link": {
                "description": "Link to the next page",
                "schema": {
                  "type": "string",
                  "description": "Link to the next page",
                  "format": ""
                }
              },
              "X-Pagination-Previous-Page-Link": {
                "description": "Link to the previous page",
                "schema": {
                  "type": "string",
                  "description": "Link to the previous page",
                  "format": ""
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BusinessCaseDto"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Create a new business case",
        "description": "Allows to create a new business case.",
        "requestBody": {
          "description": "Business case to create",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessCaseForCreationDto"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created business case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessCaseDto"
                }
              }
            }
          },
          "400": {
            "description": "Request body is null or synthax is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Delete business cases by criteria",
        "description": "Allows to delete existing business cases by criteria (and all their activities).",
        "parameters": [
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Profile Id from ePortal",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string",
              "description": "Profile Id from ePortal"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "X-Deletion-Total-Count": {
                "description": "Number of business cases deleted",
                "schema": {
                  "type": "integer",
                  "description": "Number of business cases deleted",
                  "format": ""
                }
              },
              "X-Deletion-Ids-List": {
                "description": "Ids of the deleted business cases",
                "schema": {
                  "type": "array",
                  "description": "Ids of the deleted business cases",
                  "format": ""
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/businesscases/{businessCaseId}/steps/{stepName}": {
      "get": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Get a step by its name within a business case",
        "description": "Allows to retrieve a step by its name and related to the specified business case.",
        "operationId": "GetStep",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepName",
            "in": "path",
            "description": "Step `Name`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepDto"
                }
              }
            }
          },
          "404": {
            "description": "Selected business case or step doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Create/update a step for a business case",
        "description": "Allows to create/update a step for the specified business case.",
        "operationId": "UpsertStep",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepName",
            "in": "path",
            "description": "Step `Name`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Step to create/update",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StepForUpsertDto"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepDto"
                }
              }
            }
          },
          "201": {
            "description": "Created step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepDto"
                }
              }
            }
          },
          "400": {
            "description": "Request body is null or synthax is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Selected business case doesn't exist"
          }
        }
      },
      "patch": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Update a step of a business case",
        "description": "Allows to update certain properties of an existing step.",
        "operationId": "UpdateStep",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepName",
            "in": "path",
            "description": "Step `Name`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Step to create",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StepForUpdateDto"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepDto"
                }
              }
            }
          },
          "400": {
            "description": "Request body is null or synthax is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Selected business case or step doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Delete a step of a business case",
        "description": "Allows to delete an existing step of a business case.",
        "operationId": "DeleteStepByName",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepName",
            "in": "path",
            "description": "Step `Name`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Selected business case or step doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/businesscases/{businessCaseId}/steps": {
      "get": {
        "tags": [
          "BusinessCases"
        ],
        "summary": "Get the list of steps of a business case",
        "description": "Allows to retrieve the list of steps of a business case according to certain criteria.",
        "operationId": "GetSteps",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "Business case `Id`",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page. Using value `-1` disable pagination and gives all results at once.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "OrderBy",
            "in": "query",
            "description": "Sorting option. \r\n\r\n**Usage (no square brackets !) :** `orderBy=[property] [asc,desc],[property] [asc,desc],...`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of selected steps",
            "headers": {
              "X-Pagination-Total-Count": {
                "description": "Total number of elements",
                "schema": {
                  "type": "integer",
                  "description": "Total number of elements",
                  "format": ""
                }
              },
              "X-Pagination-Page-Size": {
                "description": "Size of a page of element",
                "schema": {
                  "type": "integer",
                  "description": "Size of a page of element",
                  "format": ""
                }
              },
              "X-Pagination-Current-Page": {
                "description": "Index of the current page",
                "schema": {
                  "type": "integer",
                  "description": "Index of the current page",
                  "format": ""
                }
              },
              "X-Pagination-Total-Pages": {
                "description": "Total number of pages",
                "schema": {
                  "type": "integer",
                  "description": "Total number of pages",
                  "format": ""
                }
              },
              "X-Pagination-Next-Page-Link": {
                "description": "Link to the next page",
                "schema": {
                  "type": "string",
                  "description": "Link to the next page",
                  "format": ""
                }
              },
              "X-Pagination-Previous-Page-Link": {
                "description": "Link to the previous page",
                "schema": {
                  "type": "string",
                  "description": "Link to the previous page",
                  "format": ""
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StepDto"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/businesscases/statuses": {
      "get": {
        "tags": [
          "Statuses"
        ],
        "summary": "Get the list of available statuses",
        "description": "Allows to retrieve the list of all statuses (and sub-statuses) configured in the application settings.",
        "responses": {
          "200": {
            "description": "List of statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusDto"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Model is semantically erroneous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BusinessCaseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID of the case",
            "format": "uuid"
          },
          "referenceId": {
            "type": "string",
            "description": "Unique ID of the case for the final user"
          },
          "ownerId": {
            "type": "string",
            "description": "Owner's Profile ID (from ePortal)"
          },
          "prestationId": {
            "type": "integer",
            "description": "ID of the prestation linked to this case",
            "format": "int32"
          },
          "isClosed": {
            "type": "boolean",
            "description": "Indicates whether the case is open or close"
          },
          "status": {
            "type": "string",
            "description": "Current status of the case"
          },
          "subStatus": {
            "type": "string",
            "description": "Current sub-status of the case",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Title of the case",
            "nullable": true
          },
          "processingTimeInHours": {
            "type": "integer",
            "description": "Approximative time in hours needed for this cases to be completed",
            "format": "int32",
            "nullable": true
          },
          "referenceKey": {
            "type": "string",
            "description": "Key indicating to what business this case is related",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkDto"
            },
            "description": "List of links related to this case"
          },
          "redirectUrl": {
            "type": "string",
            "description": "Link of the action button when an action from the user is awaited",
            "nullable": true
          },
          "actionMessage": {
            "type": "string",
            "description": "Message to display when an action from the user is awaited. \r\n\r\n            Has a default value when not specified and `RedirectUrl` is set.",
            "nullable": true
          },
          "actionButtonText": {
            "type": "string",
            "description": "Text of the action button to display when an action from the user is awaited. \r\n\r\n            Has a default value when not specified and `RedirectUrl` is set.",
            "nullable": true
          },
          "remindInDays": {
            "type": "integer",
            "description": "Number of days before sending a reminder after case closure when status is remindable.",
            "format": "int32",
            "nullable": true
          },
          "reminderDate": {
            "type": "string",
            "description": "Date from which the reminder may be sent",
            "format": "date-time",
            "nullable": true
          },
          "remindedOn": {
            "type": "string",
            "description": "Date when the reminder has been sent",
            "format": "date-time",
            "nullable": true
          },
          "readStamp": {
            "type": "string",
            "description": "Date of when the case has been consulted by the user for the first time",
            "format": "date-time",
            "nullable": true
          },
          "decisionUpdateStamp": {
            "type": "string",
            "description": "Date of the last update (business-sided) for this case (same as DecisionCreationStamp at creation)",
            "format": "date-time"
          },
          "decisionCreationStamp": {
            "type": "string",
            "description": "Date of the creation (business-sided) for this case",
            "format": "date-time"
          },
          "creationStamp": {
            "type": "string",
            "description": "Date of creation (API-sided) of this case",
            "format": "date-time"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StepDto"
            },
            "description": "List of the steps linked to this case",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BusinessCaseForCreationDto": {
        "required": [
          "ownerId",
          "prestationId"
        ],
        "type": "object",
        "properties": {
          "ownerId": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "Owner's Profile ID (from ePortal)"
          },
          "prestationId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "ID of the prestation linked to this case",
            "format": "int32"
          },
          "status": {
            "maxLength": 40,
            "type": "string",
            "description": "Current status of the case",
            "nullable": true
          },
          "subStatus": {
            "maxLength": 40,
            "type": "string",
            "description": "Current sub-status of the case",
            "nullable": true
          },
          "title": {
            "maxLength": 255,
            "type": "string",
            "description": "Title of the case. Available slot : `{{BusinessCaseId}}`",
            "nullable": true
          },
          "processingTimeInHours": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Approximative time in hours needed for this cases to be completed",
            "format": "int32",
            "nullable": true
          },
          "referenceKey": {
            "type": "string",
            "description": "Key indicating to what business this case is related",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkForCreationDto"
            },
            "description": "List of links related to this case"
          },
          "redirectUrl": {
            "type": "string",
            "description": "Link of the action button when an action from the user is awaited. Available slot : `{{BusinessCaseId}}`",
            "nullable": true
          },
          "actionMessage": {
            "maxLength": 2000,
            "type": "string",
            "description": "Message to display when an action from the user is awaited",
            "nullable": true
          },
          "actionButtonText": {
            "maxLength": 255,
            "type": "string",
            "description": "Text of the action button to display when an action from the user is awaited",
            "nullable": true
          },
          "remindInDays": {
            "minimum": 0,
            "exclusiveMinimum": true,
            "type": "integer",
            "description": "Number of days before sending a reminder after case closure when status is remindable.",
            "format": "int32",
            "nullable": true
          },
          "decisionCreationStamp": {
            "type": "string",
            "description": "Date of the creation (business-sided) for this case",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BusinessCaseForUpdateDto": {
        "type": "object",
        "properties": {
          "prestationId": {
            "type": "integer",
            "description": "ID of the prestation linked to this case"
          },
          "isClosed": {
            "type": "boolean",
            "description": "Indicates whether the case is open or close"
          },
          "status": {
            "type": "string",
            "description": "Current status of the case"
          },
          "subStatus": {
            "type": "string",
            "description": "Current sub-status of the case",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Title of the case. Available slot : `{{BusinessCaseId}}`",
            "nullable": true
          },
          "processingTimeInHours": {
            "type": "integer",
            "description": "Approximative time in hours needed for this cases to be completed",
            "nullable": true
          },
          "referenceKey": {
            "type": "string",
            "description": "Key indicating to what business this case is related",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkForUpdateDto"
            },
            "description": "List of links related to this case",
            "nullable": true
          },
          "redirectUrl": {
            "type": "string",
            "description": "Link of the action button when an action from the user is awaited. Available slot : `{{BusinessCaseId}}`",
            "nullable": true
          },
          "actionMessage": {
            "type": "string",
            "description": "Message to display when an action from the user is awaited",
            "nullable": true
          },
          "actionButtonText": {
            "type": "string",
            "description": "Text of the action button to display when an action from the user is awaited",
            "nullable": true
          },
          "remindInDays": {
            "type": "integer",
            "description": "Number of days before sending a reminder after case closure when status is remindable.",
            "nullable": true
          },
          "hasBeenReminded": {
            "type": "boolean",
            "description": "Indicates if a reminder has been sent"
          },
          "readStamp": {
            "type": "string",
            "description": "Date of when the case has been consulted by the user for the first time",
            "format": "date-time",
            "nullable": true
          },
          "decisionUpdateStamp": {
            "type": "string",
            "description": "Date of the last update (business-sided) for this case (same as DecisionCreationStamp at creation)",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BusinessCasesExpand": {
        "enum": [
          "Steps"
        ],
        "type": "string"
      },
      "DocumentDto": {
        "type": "object",
        "properties": {
          "uniqueId": {
            "type": "string",
            "description": "Unique ID of the document"
          },
          "name": {
            "type": "string",
            "description": "Name of the document"
          },
          "filename": {
            "type": "string",
            "description": "Filename with extension (e.g. document.pdf)"
          }
        },
        "additionalProperties": false
      },
      "DocumentForUpsertDto": {
        "required": [
          "filename",
          "name",
          "uniqueId"
        ],
        "type": "object",
        "properties": {
          "uniqueId": {
            "maxLength": 36,
            "minLength": 1,
            "type": "string",
            "description": "Unique ID of the document"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Name of the document"
          },
          "filename": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Filename with extension (e.g. document.pdf)"
          }
        },
        "additionalProperties": false
      },
      "HttpValidationProblemDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "additionalProperties": { }
          }
        ]
      },
      "LinkDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Textual clicable part of the link"
          },
          "url": {
            "type": "string",
            "description": "URL to which the link redirects"
          },
          "isNewTab": {
            "type": "boolean",
            "description": "Indicates if the link will open a new tab"
          },
          "sortOrder": {
            "type": "integer",
            "description": "Numeric value to sort links in an ascending way",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "LinkForCreationDto": {
        "required": [
          "text",
          "url"
        ],
        "type": "object",
        "properties": {
          "text": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Textual clicable part of the link"
          },
          "url": {
            "maxLength": 2000,
            "minLength": 1,
            "type": "string",
            "description": "URL to which the link redirects"
          },
          "isNewTab": {
            "type": "boolean",
            "description": "Indicates if the link will open a new tab"
          },
          "sortOrder": {
            "type": "integer",
            "description": "Numeric value to sort links in an ascending way",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "LinkForUpdateDto": {
        "required": [
          "text",
          "url"
        ],
        "type": "object",
        "properties": {
          "text": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Textual clicable part of the link"
          },
          "url": {
            "maxLength": 2000,
            "minLength": 1,
            "type": "string",
            "description": "URL to which the link redirects"
          },
          "isNewTab": {
            "type": "boolean",
            "description": "Indicates if the link will open a new tab"
          },
          "sortOrder": {
            "type": "integer",
            "description": "Numeric value to sort links in an ascending way",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "URI that identifies the problem detail type",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "A short human-readable summary about the problem",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "HTTP Status Code",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation about the problem",
            "nullable": true
          },
          "traceId": {
            "type": "string",
            "description": "Guid to trace the error in the log files",
            "format": "uuid"
          }
        },
        "additionalProperties": { }
      },
      "StatusDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique name of the status"
          },
          "color": {
            "type": "string",
            "description": "Color associated to the status. Used in ePortal to display information related to the status"
          },
          "defaultInitialState": {
            "type": "boolean",
            "description": "Indicates if this status is used by default during creation"
          },
          "defaultFinalState": {
            "type": "boolean",
            "description": "Indicates if this status is used by default when a case is closed"
          },
          "finalState": {
            "type": "boolean",
            "description": "Indicates if the case is closable"
          },
          "subStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubStatus"
            },
            "description": "Sub-statuses belonging to this statis"
          },
          "visibleOnDashboard": {
            "type": "boolean",
            "description": "Indicates if business cases related to this status will be visible on the ePortal dashboard"
          },
          "visibleOnDetailedListing": {
            "type": "boolean",
            "description": "Indicates if business cases related to this status will be visible on the ePortal business cases detailed page"
          },
          "remindable": {
            "type": "boolean",
            "description": "Indicates if business case can be reminded to users"
          }
        },
        "additionalProperties": false
      },
      "StepDto": {
        "type": "object",
        "properties": {
          "businessCaseId": {
            "type": "string",
            "description": "Identifier of the case linked to the step",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Unique-per-case code name"
          },
          "displayName": {
            "type": "string",
            "description": "Name that will be used for display purpose (translation term)"
          },
          "description": {
            "type": "string",
            "description": "Quick description (not shown to citizen)",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "Indicates if the step is finished"
          },
          "text": {
            "type": "string",
            "description": "Translation term containing the text",
            "nullable": true
          },
          "redirectUrl": {
            "type": "string",
            "description": "Redirect URL related to the step",
            "nullable": true
          },
          "iconPath": {
            "type": "string",
            "description": "Relative system file path to an icon",
            "nullable": true
          },
          "processingTimeInHours": {
            "type": "integer",
            "description": "Estimated time in hours the step will take to be completed",
            "format": "int32",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentDto"
            },
            "description": "List of documents related to this case"
          },
          "sortOrder": {
            "type": "integer",
            "description": "Value on which the steps will be sorted (asc.) in the navigation panel",
            "format": "int32"
          },
          "createdBy": {
            "type": "string",
            "description": "Creation requester"
          },
          "createStamp": {
            "type": "string",
            "description": "Date and time of creation (UTC)",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Requester of the last update",
            "nullable": true
          },
          "updateStamp": {
            "type": "string",
            "description": "Date and time of the last update (UTC)",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StepForUpdateDto": {
        "required": [
          "updatedBy"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Translation term containing the text",
            "nullable": true
          },
          "redirectUrl": {
            "type": "string",
            "description": "Redirect URL related to the step",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentForUpsertDto"
            },
            "description": "List of documents related to this step (full replacement)",
            "nullable": true
          },
          "updatedBy": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Requester of the update"
          }
        },
        "additionalProperties": false
      },
      "StepForUpsertDto": {
        "required": [
          "createdBy",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "displayName": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Name that will be used for display purpose (translation term)"
          },
          "description": {
            "maxLength": 255,
            "type": "string",
            "description": "Quick description (not shown to citizen)",
            "nullable": true
          },
          "text": {
            "maxLength": 4000,
            "type": "string",
            "description": "Translation term containing the text",
            "nullable": true
          },
          "redirectUrl": {
            "maxLength": 2000,
            "type": "string",
            "description": "Redirect URL related to the step",
            "nullable": true
          },
          "iconPath": {
            "maxLength": 2000,
            "type": "string",
            "description": "Relative system file path to an icon",
            "nullable": true
          },
          "processingTimeInHours": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Estimated time in hours the step will take to be completed",
            "format": "int32",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentForUpsertDto"
            },
            "description": "List of documents related to this step",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "description": "Value on which the steps will be sorted (asc.) in the navigation panel",
            "format": "int32"
          },
          "createdBy": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Requester of the creation (or update)"
          }
        },
        "additionalProperties": false
      },
      "SubStatus": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "BusinessCases"
    },
    {
      "name": "Statuses"
    }
  ],
  "x-tagGroups": [
    {
      "name": "General",
      "tags": [
        "BusinessCases",
        "Statuses"
      ]
    }
  ]
}