---
updatedAt: 2025-08-21T08:32:28.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# Accounting.PnLReport

### Profit and Loss report

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Profit and Loss report",
    "version": "1.0.0"
  },
  "paths": {
    "/online/RivhitOnlineAPI.svc/Accounting.PnLReport": {
      "post": {
        "summary": "Accounting.PnLReport",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_token": {
                    "type": "string",
                    "format": "uuid",
                    "example": "DECD03E5-E35C-41E8-84F7-FBA2FB483928",
                    "description": "Rivhit Merchant API Identifier.\n\n**Default:** No\n",
                    "nullable": false,
                    "deprecated": false
                  },
                  "from_month": {
                    "type": "integer",
                    "example": 7,
                    "description": "Start Month of the PnLReport.\n\n **Format:** MM\n **Default:** No\n",
                    "nullable": false,
                    "deprecated": false
                  },
                  "to_month": {
                    "type": "integer",
                    "example": 8,
                    "description": "End Month of the PnLReport.\n\n**Format:** MM\n**Default:** No\n",
                    "nullable": false,
                    "deprecated": false
                  },
                  "year": {
                    "type": "integer",
                    "example": 2025,
                    "description": "Year of the PnLReport.\n\n**Format:** YYYY\n**Default:** No\n",
                    "nullable": false,
                    "deprecated": false
                  }
                },
                "required": [
                  "api_token",
                  "from_month",
                  "to_month",
                  "year"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success - Profit and Loss Report Returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "integer",
                      "example": 0,
                      "description": "The Response Error/Status Number (0 = Success)."
                    },
                    "client_message": {
                      "type": "string",
                      "example": "",
                      "description": "The Client Error Message."
                    },
                    "debug_message": {
                      "type": "string",
                      "example": "",
                      "description": "The Response Error Message."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "pnl_report": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "account_id": {
                                "type": "integer",
                                "description": "The Account ID."
                              },
                              "account_name": {
                                "type": "string",
                                "description": "The Account Name."
                              },
                              "balance": {
                                "type": "number",
                                "format": "double",
                                "description": "The Account Balance."
                              },
                              "pnl_code": {
                                "type": "integer",
                                "description": "The Profit and Loss Code."
                              },
                              "pnl_name": {
                                "type": "string",
                                "description": "The Profit and Loss Name."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "example": {
                    "error_code": 0,
                    "client_message": "String content",
                    "debug_message": "String content",
                    "data": {
                      "pnl_report": [
                        {
                          "account_id": 4,
                          "account_name": "הכנסות/מכירות/שכ\"ט",
                          "balance": -25007963.46,
                          "pnl_code": 70,
                          "pnl_name": "מכירות סחורה"
                        },
                        {
                          "account_id": 5,
                          "account_name": "הכנסות משירותים",
                          "balance": -50,
                          "pnl_code": 71,
                          "pnl_name": "הכנסות משרותים"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Request Error"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "integer",
                      "description": "Error code of the response."
                    },
                    "client_message": {
                      "type": "string",
                      "description": "The Client Error Message."
                    },
                    "debug_message": {
                      "type": "string",
                      "description": "The Response Error Message."
                    },
                    "data": {
                      "type": "array",
                      "description": "Error Data."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.rivhit.co.il/"
    }
  ]
}
```