{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/forwardai/main/json-schema/forwardai-profit-loss-detail-report-schema.json",
  "title": "ProfitLossDetailReport",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forwardai-precise-api-openapi.yml#/components/schemas/ProfitLossDetailReport",
  "type": "object",
  "properties": {
    "income": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        "total": {
          "type": "number"
        }
      }
    },
    "costOfGoodsSold": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        "total": {
          "type": "number"
        }
      }
    },
    "grossProfit": {
      "type": "number"
    },
    "expenses": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        "total": {
          "type": "number"
        }
      }
    },
    "otherExpenses": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        "total": {
          "type": "number"
        }
      }
    },
    "otherIncome": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "amount": {
                "type": "number"
              }
            }
          }
        },
        "total": {
          "type": "number"
        }
      }
    },
    "netProfit": {
      "type": "number"
    }
  }
}