---
updatedAt: 2025-12-11T11:21:39.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# Receipt.Last

### Get The Last Produced Receipt Details

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Get a Link to the Last Produced Receipt",
    "version": "1.0.0"
  },
  "paths": {
    "/online/RivhitOnlineAPI.svc/Receipt.Last": {
      "post": {
        "summary": "Receipt.Last",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_token": {
                    "type": "string",
                    "format": "uuid",
                    "example": "0279BF82-CD57-49BA-837C-930F0E2EB805",
                    "description": "Rivhit Merchant API Identifier.\n\n**Format:** `UUID`\n**Default:** No\n",
                    "nullable": false
                  },
                  "receipt_type": {
                    "type": "integer",
                    "example": 1,
                    "description": "Receipt type.\n\n**Range:** 0 to 999\n**Default:** All types\n",
                    "nullable": false
                  }
                },
                "required": [
                  "api_token",
                  "receipt_type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "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": {
                        "agent_id": {
                          "type": "integer",
                          "description": "Agent Identifier."
                        },
                        "comments": {
                          "type": "string",
                          "description": "The Customer Comments (Printed on the Receipt)."
                        },
                        "company_address": {
                          "type": "string",
                          "description": "The Merchant Address"
                        },
                        "company_fax": {
                          "type": "string",
                          "description": "The Merchant Fax Number."
                        },
                        "company_id": {
                          "type": "integer",
                          "description": "The Merchant Identifier."
                        },
                        "company_name": {
                          "type": "string",
                          "description": "Name of the Business/Merchant."
                        },
                        "company_phone": {
                          "type": "string",
                          "description": "The Merchant Phone Number."
                        },
                        "crm_user_id": {
                          "type": "integer",
                          "description": "CRM User Id (Set the Document Producer)."
                        },
                        "currency_id": {
                          "type": "integer",
                          "description": "The Item Currency Type."
                        },
                        "customer_city": {
                          "type": "string",
                          "description": "Customer City."
                        },
                        "customer_email": {
                          "type": "string",
                          "format": "email",
                          "description": "Customer email."
                        },
                        "customer_id": {
                          "type": "integer",
                          "description": "Rivhit Customer Identifier."
                        },
                        "customer_id_number": {
                          "type": "integer",
                          "description": "Customer Israeli ID (by Custom Format)."
                        },
                        "customer_name": {
                          "type": "string",
                          "description": "Customer Full Name (First and Last Name)."
                        },
                        "customer_phone": {
                          "type": "string",
                          "description": "Customer Phone Number."
                        },
                        "customer_zipcode": {
                          "type": "integer",
                          "description": "Customer Zip Code."
                        },
                        "exchange_rate": {
                          "type": "number",
                          "format": "double",
                          "description": "Exchange Rate Used for the Document."
                        },
                        "payments": {
                          "type": "array",
                          "items": {
                            "properties": {
                              "account_number": {
                                "type": "string",
                                "description": "Last Four Digits of the Bank Account/Credit Card Number."
                              },
                              "amount": {
                                "type": "number",
                                "format": "double",
                                "description": "Receipt Amount."
                              },
                              "bank": {
                                "type": "integer",
                                "description": "Bank Code."
                              },
                              "branch": {
                                "type": "integer",
                                "description": "Bank Branch."
                              },
                              "check_number": {
                                "type": "integer",
                                "description": "Check/Transaction Voucher Number."
                              },
                              "details": {
                                "type": "string",
                                "description": "The Receipt Payment Details."
                              },
                              "due_date": {
                                "type": "string",
                                "description": "Due Date for the Receipt (DD/MM/YYYY)."
                              },
                              "line_number": {
                                "type": "integer",
                                "description": "The Line Number of the Payment."
                              },
                              "payment_type": {
                                "type": "string",
                                "description": "The Payment Type Name."
                              },
                              "payment_type_format": {
                                "type": "integer",
                                "description": "The Payment Type Uniform Structure."
                              },
                              "payment_type_id": {
                                "type": "integer",
                                "description": "The Payment Type ID"
                              }
                            }
                          }
                        },
                        "project_id": {
                          "type": "integer",
                          "description": "Project Identifier."
                        },
                        "receipt_date": {
                          "type": "string",
                          "format": "date",
                          "description": "Receipt Issue Date (DD/MM/YYYY)."
                        },
                        "receipt_number": {
                          "type": "string",
                          "description": "Receipt number (\"01/000005\")."
                        },
                        "receipt_time": {
                          "type": "string",
                          "description": "Receipt Issue Time (HH:MM:SS)."
                        },
                        "receipt_type": {
                          "type": "string",
                          "description": "Receipt Type Name."
                        },
                        "reference": {
                          "type": "integer",
                          "description": "The Reference Value - Will be Saved in the Invoice."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error_code": 0,
                  "client_message": "",
                  "debug_message": "",
                  "data": {
                    "agent_id": 511728246,
                    "comments": "\r\n\r\nבדיקה",
                    "company_address": "הרצל 11 ירושלים 123495",
                    "company_fax": "",
                    "company_id": 777777715,
                    "company_name": "דמו טסט עסק סליקה ",
                    "company_phone": "03-7466300",
                    "crm_user_id": null,
                    "currency_id": 1,
                    "customer_city": "Tel Aviv",
                    "customer_email": "n0548480176@gmail.com",
                    "customer_id_number": 0,
                    "customer_name": "Israeli  Moshe",
                    "customer_phone": "0506666666",
                    "customer_zipcode": 5432101,
                    "exchange_rate": 0,
                    "payments": {
                      "account_number": "0",
                      "amount": 10,
                      "bank": null,
                      "branch": null,
                      "check_number": null,
                      "details": "Cash Payment",
                      "due_date": "15/01/2025",
                      "line_number": 1,
                      "payment_type": "מזומן",
                      "payment_type_format": 1,
                      "payment_type_id": 2
                    },
                    "project_id": null,
                    "receipt_date": "15/01/2025",
                    "receipt_number": "01/016402",
                    "receipt_time": "13:49:12",
                    "receipt_total": 10,
                    "receipt_type": "קבלה",
                    "reference": 0
                  }
                }
              }
            }
          },
          "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",
                      "example": 0,
                      "description": "Error code of the response."
                    },
                    "client_message": {
                      "type": "string",
                      "example": "",
                      "description": "The Client Error Message."
                    },
                    "debug_message": {
                      "type": "string",
                      "example": "",
                      "description": "The Response Error Message."
                    },
                    "data": {
                      "type": "array",
                      "example": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.rivhit.co.il/"
    }
  ]
}
```