{
  "openapi": "3.1.1",
  "info": {
    "title": "ManagerServer | post-profit-and-loss-statement-by-group",
    "version": "1.0.0+c6d1f1e3306702a9f3c52e59bee7a51638b30e7c"
  },
  "paths": {
    "/api4/profit-and-loss-statement-by-group": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostProfitAndLossStatementByGroup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountingBasis": {
        "type": "integer"
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Period": {
        "type": "object",
        "properties": {
          "fromDate": {
            "type": "string",
            "format": "date-time"
          },
          "toDate": {
            "type": "string",
            "format": "date-time"
          },
          "division": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "columnName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PostProfitAndLossStatementByGroup": {
        "type": "object",
        "properties": {
          "value": {
            "$ref": "#/components/schemas/ProfitAndLossStatementByGroup"
          },
          "business": {
            "type": [
              "null",
              "string"
            ],
            "description": "Name of business. If you are calling API from an extension running within IFRAME, then business does not have to be provided. Manager will automatically inject current business. This is useful when extension doesn't know business name which is typically the case."
          }
        }
      },
      "ProfitAndLossStatementByGroup": {
        "type": "object",
        "properties": {
          "group": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "periods": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/Period"
            }
          },
          "accountingMethod": {
            "$ref": "#/components/schemas/AccountingBasis"
          },
          "rounding": {
            "$ref": "#/components/schemas/Rounding"
          },
          "groupsToCollapse": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "footer": {
            "type": [
              "null",
              "string"
            ]
          },
          "accountCodes": {
            "type": "boolean"
          },
          "excludeZeroBalances": {
            "type": "boolean"
          },
          "customTheme": {
            "type": "boolean"
          },
          "customThemeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Rounding": {
        "type": "integer"
      }
    }
  }
}