Adding a client and issue an invoice receipt from an external source

Address to refer in POST method:

https://[account name].senzey.com/extapi/tax_invoice_receipt/add.php?username=[username]&password=[password]

 

Please pay attention!

-Data should be sent using UTF8 encoding
-Content type should be:  application/x-www-form-urlencoded

 

 

Mandatory Default Possible values Description Type Field name
YES     Client name varchar client_name
YES     Client email varchar client_email
NO     Client I.D. number varchar client_idn
NO     Client business number varchar client_business_idn
NO     Client address varchar client_address
NO     Client phone varchar client_phone
NO     Client city varchar client_city
NO "he" "en" or "he" Document language varchar client_lang
NO     client birthday date client_birthday
YES     Total payment sum decimal total_payment
NO NULL USD
EUR
AUD
GBP
If different than NIS then send value varchar currency
YES  

With VAT = "DEFAULT"

VAT FREE = "FREE"

Registered business Or VAT FREE business varchar vat_type
NO     Document comments varchar doc_comments
YES     Items rows array items[]
YES     Item Name varchar name items
NO     Item Code varchar code items
YES     Item Price per Unit decimal price items
YES     quantity decimal quantity items
NO     description varchar desc items
NO     Use member points integer use_club_member_points
NO "FALSE"

"TRUE"

or

"FALSE"

Use Inventory varchar is_stock_record
NO "FALSE"

"TRUE"

or

"FALSE"

send invoice to client (email) varchar send_invoice
NO yaad   Transaction Company Name varchar transaction_company
 - if company is "yaad"YES     Data received from credit company varchar credit_card_payment
          []payment_details
YES  

4 - Creditcard

7 - Paypal

Payment method should be Creditcard number payment_method payment_details
 YES     Payment amount float total_amount payment_details
NO     credit card name varchar credit_card_name  payment_details
 NO     last 4 digits varchar last_4_digits payment_details
NO     card owner name varchar card_owner_name payment_details
NO null   ID of project to connect to number  project_id connect_to_project
NO       text description   connect_to_project
NO     billing amount incl vat float amount connect_to_project
NO CURDATE     date start_date connect_to_project
NO       date finish_date connect_to_project
NO       number reminder_before_days connect_to_project
NO     * number billing_type connect_to_project
NO     ** number billing_recurring connect_to_project
NO start date of project-client     date recurring_from connect_to_project
NO       number num_of_payment connect_to_project
NO       text payment_notes connect_to_project
NO       text comments connect_to_project
NO     Cicles to issue billing, 1 for once number issue_billing_cycles connect_to_project
NO "FALSE"

"TRUE"

or

"FALSE"

If to issue billing  varchar issue_billing bank order
NO "FALSE"

"TRUE"

or

"FALSE"

If to issue tax invoice/receipt varchar issue_tax_invoice_receipt bank order
NO     Bank Order's start date date start_date bank_order
NO null     Num of monthes to pay number num_of_payment bank_order
NO   "test" TEST - print values to screen and exit varchar test

 

Received format would be in JSON.

In case of success:

HTTP Code: 200

For example: 

{'tax_invoice_receipt_number: 10005}

 

In case of failure:

HTTP Code: 400-599

Error message - error

For example: 

{'error': 'Incorrect business number'}

 (*) Billing Type :

  • 0  DEFINED_IN_TASK
  • 2  FIXED_PRICE
  • 5 NOT_TO_BILL

 (**) Recurring:

  • 0 - once
  • 1 - month
  • 2 - year
  • 3 - 2year
  • 4 -week

 (***) Payment methods:

  • 4 - credit card
  • 7 - PayPal

 

View  code example