Please contact the following address:
https://[account name].senzey.com/extapi/work_order/add.php?username=[username]&password=[password]
please pay attention!
- The data should be sent in UTF8
- All data should be sent by POST
- Content type: application / x-www-form-urlencoded must be used
field name | type | descriptionPossible values | defult | must | ||
client_name | varchar | customer name | yes | |||
client_email | varchar | customer email | yes | |||
client_idn | varchar | customer ID | no | |||
client_business_idn | varchar | עוסק מורשה | no | |||
client_address | varchar | customer address | no | |||
client_phone | varchar | phone | no | |||
client_city | varchar | city | no | |||
client_lang | char 2 | Document language | en|he | he | no | |
client_birthday | date | dateof birth | dd/mm/yyyy | no | ||
total_payment | decimal | The final amount for the actual payment | yes | |||
vat_type | varchar | עוסק מורשה או פטור | חייב במע"מ = "DEFAULT"
פטור ממע"מ = "FREE" |
yes | ||
[]items | array | Product lines that were purchased | yes | |||
items | name | varchar | product name | yes | ||
items | code | varchar | SKU | no | ||
items | price | decimal | The actual product price to be charged per unit | yes | ||
items | quantity | decimal | Quantity | yes | ||
send_invoice | varchar | Should send a work order to the customer | TRUE/FALSE | FALSE | no | |
pay_url | varchar | If you want to use this API for a payment page, send "TRUE" and then at the end of the page it will return the same parameter with a URL so that you can refer the customer to the payment page. | TRUE/FALSE | FALSE | no | |
pay_success_callback_url | varchar | If the pay_url parameter was sent with TRUE, and an entry was entered in this parameter with a return address for information on making the payment, then at the end of the payment by the customer, the system will refer to this URL in POST with the following parameters: "doc_type" => doc name, "doc_id" => doc number, "sum" => amount, "work_order_number" => מספר הזמנה עבורה הופק המסמך (מספר זה נשלח בפניה הראשונה ל API וישמש לצורך שיוך/התאמה בין ההזמנה המקורית שנוצרה לבין התשלום. |
no | |||
connect_to_project | project_id | number | Project ID | no | ||
connect_to_project | description | text | no | |||
connect_to_project | amount | float | Amount to be charged including VAT | כן אם הוכנס ערך בשדה project_id | ||
connect_to_project | start_date | date | start date | CURDATE | no | |
connect_to_project | finish_date | date | end date | no | ||
connect_to_project | reminder_before_days | number | A reminder before the end of the days | no | ||
connect_to_project | billing_type | number | Billing type* |
|
מחיר קבוע | כן אם הוכנס ערך בשדה project_id |
connect_to_project | billing_recurring | number | Periodicity** |
|
חד פעמי | no |
connect_to_project | recurring_from | date | First billing date | ת.צירוף של לקוח לפרויקט | no | |
connect_to_project | num_of_payment | number | Number of charges | no | ||
connect_to_project | payment_notes | text | Payment notes | no | ||
connect_to_project | comments | text | notes | no | ||
connect_to_project | issue_billing_cycles | number | Number of cycles to generate a charge, 1 for a one-time charge | no | ||
test | varchar | Test – will print to the screen the parameters sent without continuation | test | no |
The answer you will get is in JSON format.
In case of success:
code HTTP : 200
work_order_number – order number exsample. לדוגמה: {'work_order_number': 10005}
pay_url – Only if the API referral contained TRUE in this parameter, an address for referring the customer to payment will be returned.
In case of failure:
code HTTP : 400-599
Error Message – error
exsmaple:
{'error': 'Incorrect business number'}
במידה והתקבלו פרמטרים של הוראת קבע, הגדרות החיוב של הלקוח בפרויקט יקבעו על פי פרמטרים אלו.