---
updatedAt: 2026-11-03T13:01:34.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# Document.InvoiceApproval

<Callout icon="🚧" theme="warn">
  Cannot be used in the **Test** environment, only on documents in the **Production** environment that require a confirmation number.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Acquire confirmation number for given document",
    "version": "1.0.0"
  },
  "paths": {
    "/online/RivhitOnlineAPI.svc/Document.InvoiceApproval": {
      "post": {
        "summary": "Document.InvoiceApproval",
        "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
                  },
                  "document_number": {
                    "type": "integer",
                    "example": 3218,
                    "description": "The Document Number to Approve.\n\n**Default:** No\n"
                  },
                  "document_type": {
                    "type": "integer",
                    "example": 1,
                    "description": "The Document Type to Approve.\n\n**Default:** No\n"
                  },
                  "id_number": {
                    "type": "integer",
                    "example": 123456789,
                    "description": "The ID Number of the Customer.\n\n**Default:** No\n"
                  }
                },
                "required": [
                  "api_token",
                  "document_number",
                  "document_type",
                  "id_number"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success - Acquired confirmation number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "type": "integer",
                      "description": "The Response Error/Status Number (0 = Success)."
                    },
                    "client_message": {
                      "type": "string",
                      "description": "The Client Error Message."
                    },
                    "debug_message": {
                      "type": "string",
                      "description": "The Response Error Message."
                    },
                    "confirmation_number": {
                      "type": "integer",
                      "description": "The Acquired Confirmation Number."
                    }
                  },
                  "example": {
                    "error_code": 0,
                    "client_message": "",
                    "debug_message": "",
                    "confirmation_number": 123456789
                  }
                }
              }
            }
          },
          "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"
    }
  ]
}
```