v1

latestOpenAPI 3.0.02026-08-04880393.1 KB

Document.New

post/online/RivhitOnlineAPI.svc/Document.New

Request body

api_tokenstring uuid required

Rivhit Merchant API Identifier.

Default: No

document_typeinteger required

Document type.

Range: 0 to 999 Default: No

customer_idinteger required

Rivhit Customer Identifier.

Range: 0 to 999999999 Default: No

last_namestring required

Customer Last Name/Company Name.

Length: 1 to 30 Default: Customer details

first_namestring nullable

Customer First Name.

Length: 1 to 20 Default: Customer details

addressstring nullable

Customers Address.

Length: 1 to 30 Default: Customer details

citystring nullable

Customer's city.

Length: 1 to 20 Default: Customer details

zipcodeinteger nullable

Customers Zipcode.

Range: 0 to 9999999 Default: Customer details

acc_refstring nullable

Customer Outer System Identifier.

Length: 1 to 9 Default: No

phonestring nullable

Customer Phone Number.

Length: 1 to 15 Default: Customer details

customer_type1 | 20 | 60 nullable

Type of the Customer - to Create.

Options: (1 = Customers 20 = Suppliers 60 = Agents) Default: Rivhit settings (usually 1)

id_numberinteger nullable

Customer Israeli Id (by Custom Format).

Range: 8-9 digits Default: No

referenceinteger nullable

The Reference Value - Will be Saved in the Invoice.

Range: 0 to 999999999 Default: Rivhit settings

orderstring nullable

The Sale Order Value.

Length: 1 to 15 Default: No

agent_idinteger nullable

Agent Id Serial Number (Rivhit system).

Range: 0 to 999999999 Default: Customer settings

paying_customer_idinteger

Defined a Paying Custommer by Id.

Range: 0 to 999999999 Default: No

project_idinteger nullable

Project Id Serial Number (Rivhit system).

Range: 0 to 999999999 Default: No

commentsstring nullable

The Customer Comments (to print on the invoice).

Length: 1 to 400 Default: Rivhit system settings

sort_codeinteger

The Sort Code Type.

Common: 100 = With Vat 150 = Exempt Vat Range: 0 to 999 Default: Rivhit Document Settings

discount_type1 | 2 nullable

Discount Type.

Options: (1 = percentage 2 = amount) Default: No

discount_valuenumber double

Discount value.

Range: 0 to 999999999.99 Default: No

price_include_vatboolean nullable

Items Sent With or Without VAT.

Default: Document settings

due_datestring date

Due Date for the Document.

Format: DD-MM-YY or DD/MM/YYYY Default: Rivhit settings

issue_datestring date

Issue Date of the Document.

Format: DD-MM-YY or DD/MM/YYYY Default: Current day

issue_timestring nullable

Issue Time of the Document.

Format: HH:MM Default: Current time

currency_idinteger nullable

Document Currency Type.

Options: (1 = NIS 2 = USD 3 = EURO 4 = GBP 5 = AUD 6 = CAD 7 = CHF 8 = SEK 9 = DKK 10 = NOK) Default: Document settings

exchange_ratenumber double nullable

Fixed Currency Exchange Rate to ILS.

~ From MTC to ILS Range: Decimal limit (only positive) Default: Rivhit Settings

reject_item_quantityboolean nullable

Reject Document Producing by Items Stock.

True = produce only when items are in stock false = produce even when items are out of stock Default: false

no_update_inventoryboolean nullable

Disable Reducing Items From the Stock.

True = Don't reduce items from stock False = Reduce items from stock Default: false

crm_user_idinteger

CRM User Id (Set the Document Producer).

Range: 0 to 99999 Default: Rivhit user settings

language'he' | 'en' nullable

Set the Document Language.

Options: (he/en) Default: he

email_tostring email nullable

Customer Email Address.

Length: 6 to 50 Default: Customer details

email_bccstring email nullable

Bcc Email Address.

Length: 6 to 50 Default: Rivhit mailing settings

digital_signatureboolean nullable

Produce the Document With a Digital Signature.

true = With digital signature
Default: false

signature_pinstring nullable

The Digital Signature PIN Code.

~ Send only by API support instructions Length: 3 to 6 Default: No

check_onlyboolean nullable

Activate Check Mode.

~ Response will include status and error message.
Default: false

request_referencestring nullable

The Document Request Reference.

~ Combine with prevent_duplicates ~ Should be unique value Length: 2GB Default: No

prevent_duplicatesboolean nullable

Activate Prevent Duplicates.

~ Combine with request reference Default: No

create_customerboolean nullable

Create a New Customer in Rivhit System.

~ When exsiting customer can't be found
Default: false

send_mailboolean nullable

Send the Document to the Customer.

Default: true

find_by_mailboolean nullable

Locate Customer by Email Address.

Default: false

find_by_idboolean nullable

Locate Customer by Israeli Id/VAT Number.

Default: false

find_by_acc_refboolean nullable

Locate Customer by the acc_ref

Default: false

find_by_phoneboolean nullable

Locate Customer by Phone Number.

Default: false

create_itemsboolean nullable

Create New Items.

Default: false

document_numberinteger

Set the Starting Number for a New Document.

~ Only when it is the first document Range: 0 to 999999
Default: Documents settings

closed_document_typeinteger

Set the Type of Existing Document to be closed.

~ Combine with ClosedDocumentNumber Range: 1 to 999 Default: No

closed_document_numberinteger

Set the Number of Existing Document to be closed.

~ combine with ClosedDocumentType Range: 1 to 999999 Default: No

countrystring

Customer Country.

Length: 1 to 39 Default: Customer details

statestring

Customer State.

Length: 1 to 10 Default: No

foreign_zipcodestring nullable

Customer Foreign Zip Code.

Length: 1 to 7 Default: No

thermal_printboolean nullable

Activate Thermal Print.

Default: false

validate_idboolean nullable

Activate ID/VAT Validation.

~ False = In case of wrong ID/Vat format - data won't be saved on the document and customer. Default: true

round_digits0 | 1 | 2 nullable

Round the document amount.

~ Combine with "price_include_vat":false Options: (0 = X.00 Full round 1 = X.X0 Partial 2 = X.XX No round) Default: Rivhit settings

logo_urlstring url nullable

The Business Logo - Printed on the Document.

Length: 15 to 400 Default: Rivhit system settings

default_emailboolean

Use the Default Customer Mail Address.

Default: false

Example request

{
  "api_token": "DECD03E5-E35C-41E8-84F7-FBA2FB483928",
  "document_type": 1,
  "last_name": "Israeli",
  "first_name": "Moshe",
  "address": "Ben Yehuda 1",
  "city": "Tel Aviv",
  "zipcode": 6329302,
  "acc_ref": "Ab1234567",
  "phone": "054-4444444",
  "customer_type": 1,
  "id_number": 123456790,
  "reference": 12345,
  "order": "ab12345",
  "paying_customer_id": 1,
  "comments": "Comments will be here",
  "sort_code": 100,
  "discount_type": 1,
  "discount_value": 10,
  "price_include_vat": true,
  "due_date": "01-01-2025",
  "issue_date": "01-01-2025",
  "issue_time": "10:30",
  "currency_id": 1,
  "crm_user_id": 5,
  "language": "he",
  "email_to": "a@a.com",
  "email_bcc": "a@a.com\"",
  "digital_signature": true,
  "signature_pin": "Ab123",
  "items": [
    {
      "item_id": 123456,
      "catalog_number": "abc123",
      "quantity": 5,
      "bruto_price_nis": 100.5,
      "price_nis": 95,
      "currency_id": 1,
      "price_mtc": 25,
      "exchange_rate": 3.8,
      "storage_id": 123,
      "description": "Sample Item Description",
      "serial_number": "A12345",
      "exempt_vat": false,
      "closed_document_type": 1,
      "closed_document_num": 101,
      "closed_document_line": 2
    },
    {
      "item_id": 789012,
      "catalog_number": "xyz456",
      "quantity": 3,
      "bruto_price_nis": 150.75,
      "price_nis": 145,
      "currency_id": 2,
      "price_mtc": 35,
      "exchange_rate": 4.2,
      "storage_id": 124,
      "description": "Another Sample Item",
      "serial_number": "B67890",
      "exempt_vat": true,
      "closed_document_type": 2,
      "closed_document_num": 202,
      "closed_document_line": 3
    }
  ],
  "payments": [
    {
      "payment_type": 2,
      "amount_nis": 100.5,
      "due_date": "08-01-2025",
      "check_number": 100000028,
      "bank_code": 11,
      "branch_number": 118,
      "bank_account_number": "300111",
      "amount_mtc": 25,
      "description": "Cash Payment",
      "number_of_payments": 1
    },
    {
      "payment_type": 5,
      "amount_nis": 200.75,
      "due_date": "10-01-2025",
      "check_number": 100000029,
      "bank_code": 1,
      "branch_number": 119,
      "bank_account_number": "300112",
      "amount_mtc": 50,
      "description": "Visa Payment",
      "number_of_payments": 3
    }
  ],
  "check_only": true,
  "request_reference": "abcdefg-&123456789",
  "prevent_duplicates": true,
  "create_customer": true,
  "send_mail": true,
  "find_by_mail": true,
  "find_by_id": true,
  "find_by_acc_ref": true,
  "find_by_phone": true,
  "create_items": true,
  "document_number": 1000,
  "closed_document_type": 1,
  "closed_document_number": 115,
  "country": "Israel",
  "state": "Texas",
  "foreign_zipcode": "ab123456",
  "validate_id": true,
  "logo_url": "https://www.rivhit.co.il/wp-content/uploads/2023/01/logo-main.svg "
}

Response

Success - Document Created

error_codeinteger

The Response Error/Status Number (0 = Success)

client_messagestring

The Client Error Message.

debug_messagestring

The Response Error Message.