{"api":{"version":3,"tz":3,"ts":1792668709.7158,"lang":"he","module":"help","method":"methods"},"status":true,"reason":"OK","module":"doc","methods":{"info":{"name":"info","description":"Get document information","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"get_items":{"name":"get_items","type":"bool","optional":true,"description":"Get items.","default":"true"},"get_payments":{"name":"get_payments","type":"bool","optional":true,"description":"Get payment information.","default":"true"},"get_custom_info":{"name":"get_custom_info","type":"bool","optional":true,"description":"Get custom fields for document.","default":"true"},"get_autoinvoices":{"name":"get_autoinvoices","type":"bool","optional":true,"description":"Get autoinvoices (for doctype=receipt only).","default":"false"},"get_base_doc_url":{"name":"get_base_doc_url","type":"bool","optional":true,"description":"Get base document URL.","default":"false"},"get_doctype_info":{"name":"get_doctype_info","type":"bool","optional":true,"description":"Get document type information.","default":"false"},"get_pdf_link":{"name":"get_pdf_link","type":"bool","optional":true,"description":"Get direct link to document PDF.","default":"false","notes":["pdf-access"]},"get_paynow_link":{"name":"get_paynow_link","type":"bool","optional":true,"description":"Get PayNow (self-payment page) URL for invoice\/deal"},"get_conversion_options":{"name":"get_conversion_options","type":"bool","optional":true,"description":"Get list of doctypes this document can be converted to (convert_to)"},"shortlink":{"name":"shortlink","type":"bool","optional":true,"description":"Return shortened URL instead of regular links"},"max_clicks":{"name":"max_clicks","type":"int","optional":true,"description":"Shortlink max clicks.","default":"30"},"expire_days":{"name":"expire_days","type":"int","optional":true,"description":"Shortlink expiration days.","default":"30"},"lang":{"name":"lang","type":"string","optional":true,"description":"Language for pdf link.","default":"he"}},"output":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"doc_info":{"name":"doc_info","type":"iCountDocInfo","optional":false,"description":"Document information","base_type":"object","properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"dateissued":{"name":"dateissued","type":"date","optional":false,"description":"Document date"},"timeissued":{"name":"timeissued","type":"timestamp","optional":false,"description":"Document creation time"},"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"custom_client_id":{"name":"custom_client_id","type":"int","optional":false,"description":"Custom client ID"},"client_idno":{"name":"client_idno","type":"int","optional":false,"description":"Client VAT ID"},"client_name":{"name":"client_name","type":"string","optional":false,"description":"Client name"},"client_address":{"name":"client_address","type":"string","optional":false,"description":"Client address"},"currency_id":{"name":"currency_id","type":"int","optional":false,"description":"Currency ID"},"currency_code":{"name":"currency_code","type":"string","optional":false,"description":"Currency Code (ISO-4217)"},"rate":{"name":"rate","type":"float","optional":false,"description":"Currency exchange rate"},"user_id":{"name":"user_id","type":"int","optional":true,"description":"Employee ID (issuer)"},"salesman_id":{"name":"salesman_id","type":"int","optional":true,"description":"Salesmane ID"},"paydate":{"name":"paydate","type":"date","optional":true,"description":"Last payment date (if applicable)"},"duedate":{"name":"duedate","type":"date","optional":true,"description":"Due date (if applicable)"},"income_type_id":{"name":"income_type_id","type":"int","optional":true,"description":"Income type ID"},"expense_type_id":{"name":"expense_type_id","type":"int","optional":true,"description":"expense type ID"},"invoice_reference_number":{"name":"invoice_reference_number","type":"string","optional":true,"description":"Invoice reference number issued by tax authority (if applicable)"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Tax exempt document?"},"vat_percent":{"name":"vat_percent","type":"float","optional":true,"description":"VAT percent (if applicable)"},"totalsum":{"name":"totalsum","type":"float","optional":true,"description":"Total excluding VAT, before discount and roundup","notes":["ILS"]},"totalsum_currency":{"name":"totalsum_currency","type":"float","optional":true,"description":"Total excluding VAT, before discount and roundup in foreign currency (if applicable)"},"discount":{"name":"discount","type":"float","optional":true,"description":"Discount","notes":["ILS"]},"discount_currency":{"name":"discount_currency","type":"float","optional":true,"description":"Discount in foreign currency (if applicable)"},"roundup":{"name":"roundup","type":"float","optional":true,"description":"Roundup","notes":["ILS"]},"roundup_currency":{"name":"roundup_currency","type":"float","optional":true,"description":"Roundup in foreign currency (if applicable)"},"afterdiscount":{"name":"afterdiscount","type":"float","optional":true,"description":"Total excluding VAT, after discount and roundup","notes":["ILS"]},"afterdiscount_currency":{"name":"afterdiscount_currency","type":"float","optional":true,"description":"Total excluding VAT, after discount and roundup in foreign currency (if applicable)"},"totalwithvat":{"name":"totalwithvat","type":"float","optional":true,"description":"Total including VAT","notes":["ILS"]},"totalwithvat_currency":{"name":"totalwithvat_currency","type":"float","optional":true,"description":"Total including VAT in foreign currency (if applicable)"},"paid":{"name":"paid","type":"float","optional":true,"description":"Total amount paid by all payment methods","notes":["ILS"]},"paid_currency":{"name":"paid_currency","type":"float","optional":true,"description":"Total amount paid by all payment methods in foreign currency (if applicable)"},"totalwht":{"name":"totalwht","type":"float","optional":true,"description":"WithHolding Tax amount","notes":["ILS"]},"totalwht_currency":{"name":"totalwht_currency","type":"float","optional":true,"description":"WithHolding Tax amount in foreign currency (if applicable)"},"totalpaid":{"name":"totalpaid","type":"float","optional":true,"description":"Total paid including WithHolding Tax","notes":["ILS"]},"totalpaid_currency":{"name":"totalpaid_currency","type":"float","optional":true,"description":"Total paid including WithHolding Tax in foreign currency (if applicable)"},"remainingsum":{"name":"remainingsum","type":"float","optional":true,"description":"Document remaining sum","notes":["ILS"]},"remainingsum_currency":{"name":"remainingsum_currency","type":"float","optional":true,"description":"Document remaining sum in foreign currency (if applicable)"},"remainingsum_before_vat":{"name":"remainingsum_before_vat","type":"float","optional":true,"description":"Document remaining sum excluding VAT (if applicable)","notes":["ILS"]},"remainingsum_before_vat_currency":{"name":"remainingsum_before_vat_currency","type":"float","optional":true,"description":"Document remaining sum excluding VAT in foreign currency (if applicable)"},"status":{"name":"status","type":"int","optional":true,"description":"Document status. Values: 0=open, 1=closed, 2=partially closed"},"is_cancelled":{"name":"is_cancelled","type":"bool","optional":true,"description":"Is this document cancelled by other document?"},"is_cancellation":{"name":"is_cancellation","type":"bool","optional":true,"description":"Did this document cancel another document?"},"cancellation_reason":{"name":"cancellation_reason","type":"string","optional":true,"description":"Did this document cancel another document?"},"cancellation_doctype":{"name":"cancellation_doctype","type":"string","optional":true,"description":"Cancellation document type"},"cancellation_docnum":{"name":"cancellation_docnum","type":"int","optional":true,"description":"Cancellation document number"},"cancelled_doctype":{"name":"cancelled_doctype","type":"string","optional":true,"description":"Cancelled document type"},"cancelled_docnum":{"name":"cancelled_docnum","type":"int","optional":true,"description":"Cancelled document number"},"is_closable":{"name":"is_closable","type":"bool","optional":true,"description":"Is this document closable?"},"is_openable":{"name":"is_openable","type":"bool","optional":true,"description":"Is this document openable?"},"items":{"name":"items","type":"array(iCountDocItem)","optional":true,"description":"Document items","list_type":"array","key_type":"int","value_type":"iCountDocItem","value_base_type":"object","value_description":"Document Item","value_properties":{"item_id":{"name":"item_id","type":"int","optional":true,"description":"Document Item ID (automatic, only in existing document information)"},"inventory_item_id":{"name":"inventory_item_id","type":"string","optional":true,"description":"Inventory Item ID"},"sku":{"name":"sku","type":"string","optional":true,"description":"Item SKU"},"description":{"name":"description","type":"string","optional":false,"description":"Item description"},"long_description":{"name":"long_description","type":"string","optional":true,"description":"Item long description"},"currency_id":{"name":"currency_id","type":"int","optional":true,"description":"Currency ID"},"currency_rate":{"name":"currency_rate","type":"float","optional":true,"description":"Rate of conversion from item currency to document currency. For example, if document currency is EUR and the item currency is EUR - this conversion rate will be 1"},"unitprice":{"name":"unitprice","type":"float","optional":false,"description":"Item price (excluding VAT)"},"unitprice_incvat":{"name":"unitprice_incvat","type":"float","optional":true,"description":"Item price (including VAT). If unitprice_incvat is passed, the system will extract VAT and calculate unitprice automatically"},"unitprice_exempt":{"name":"unitprice_exempt","type":"float","optional":true,"description":"Item price (VAT exempt). NB: Only applicable for Lawyer invoices"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Is item tax exempt?"},"quantity":{"name":"quantity","type":"float","optional":false,"description":"Item quantity. NB: Not applicatble for Lawyer invoices"},"serial":{"name":"serial","type":"string","optional":true,"description":"Serial number"},"taxes":{"name":"taxes","type":"object(int->float)","optional":true,"description":"Item tax rates. Keys are tax type IDs (see tax\/types). Values are rates (percent)","list_type":"object","key_type":"int","value_type":"float"}}},"cash":{"name":"cash","type":"iCountCashPayment","optional":true,"description":"Cash payment","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cash amount"}}},"cheques":{"name":"cheques","type":"array(iCountChequePayment)","optional":true,"description":"Cheques","list_type":"array","key_type":"int","value_type":"iCountChequePayment","value_base_type":"object","value_description":"Cheque payment","value_properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cheque amount"},"date":{"name":"date","type":"date","optional":false,"description":"Cheque date"},"bank":{"name":"bank","type":"int","optional":false,"description":"Cheque bank"},"branch":{"name":"branch","type":"int","optional":false,"description":"Cheque branch"},"account":{"name":"account","type":"int","optional":false,"description":"Cheque account"},"number":{"name":"number","type":"int","optional":false,"description":"Cheque number"}}},"banktransfer":{"name":"banktransfer","type":"iCountBankTransferPayment","optional":true,"description":"Bank transfer payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"BankTransfer amount"},"date":{"name":"date","type":"date","optional":false,"description":"BankTransfer date"},"account":{"name":"account","type":"int","optional":false,"description":"Bank account ID where BankTransfer was deposited"}}},"cc":{"name":"cc","type":"iCountCreditCardPayment","optional":true,"description":"Credit-Card payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Credit-Card transaction amount"},"date":{"name":"date","type":"date","optional":true,"description":"Transaction date"},"num_of_payments":{"name":"num_of_payments","type":"int","optional":false,"description":"Number of installments"},"first_payment":{"name":"first_payment","type":"float","optional":false,"description":"First payment amount; Applicable only for installments"},"token_id":{"name":"token_id","type":"int","optional":true,"description":"Credit-Card token ID. Requires cc_storage module"},"card_number":{"name":"card_number","type":"int","optional":false,"description":"Credit-Card number"},"card_type":{"name":"card_type","type":"string","optional":false,"description":"Credit-Card type"},"cvv":{"name":"cvv","type":"int","optional":false,"description":"Credit-Card CVV number"},"exp_year":{"name":"exp_year","type":"int","optional":false,"description":"Card Expiration year"},"exp_month":{"name":"exp_month","type":"int","optional":false,"description":"Card Expiration month"},"holder_id":{"name":"holder_id","type":"int","optional":false,"description":"Card Holder ID"},"holder_name":{"name":"holder_name","type":"string","optional":false,"description":"Card Holder name"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":false,"description":"Credit-Card transaction confirmation number"}}},"paypal":{"name":"paypal","type":"iCountPayPalPayment","optional":true,"description":"Paypal payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"PayPal transaction amount"},"date":{"name":"date","type":"date","optional":false,"description":"PayPal transaction date"},"txn_id":{"name":"txn_id","type":"string","optional":false,"description":"PayPal transaction ID"},"payer_name":{"name":"payer_name","type":"string","optional":false,"description":"PayPal payer name"}}},"barter":{"name":"barter","type":"iCountBarterPayment","optional":true,"description":"Barter payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Barter amount"}}},"based_on":{"name":"based_on","type":"array(iCountBaseDoc)","optional":true,"description":"Base documents list","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}},"based_on_this":{"name":"based_on_this","type":"array(iCountBaseDoc)","optional":true,"description":"List of documents based on this one","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}}}},"autoinvoices":{"name":"autoinvoices","type":"array(autoinvoice::iCountAutoinvoiceInfo)","optional":true,"description":"Autoinvoices list for receipt","list_type":"array","key_type":"int","value_type":"autoinvoice::iCountAutoinvoiceInfo","value_base_type":"object","value_description":"Autoinvoice information","value_properties":{"autoinvoice_type":{"name":"autoinvoice_type","type":"string","optional":false,"description":"Autoinvoice type (ch for cheques \/ cc for credit-card)"},"autoinvoice_id":{"name":"autoinvoice_id","type":"int","optional":false,"description":"Autoinvoice ID"},"date2issue":{"name":"date2issue","type":"date","optional":false,"description":"Date to issue"},"receiptnumber":{"name":"receiptnumber","type":"int","optional":false,"description":"Receipt number"},"user_id":{"name":"user_id","type":"int","optional":false,"description":"Issuer user ID"},"income_type_id":{"name":"income_type_id","type":"int","optional":false,"description":"Income type ID"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":false,"description":"Tax exempt?"},"currency_id":{"name":"currency_id","type":"int","optional":false,"description":"Currency ID"},"sum":{"name":"sum","type":"float","optional":false,"description":"Autoinvoice sum"},"cheque_bank":{"name":"cheque_bank","type":"int","optional":true,"description":"Cheque bank ID","see":[{"module":"bank","method":"get_list"}]},"cheque_branch":{"name":"cheque_branch","type":"string","optional":true,"description":"Cheque branch"},"cheque_account":{"name":"cheque_account","type":"string","optional":true,"description":"Cheque account"},"cheque_number":{"name":"cheque_number","type":"string","optional":true,"description":"Cheque number"},"cc_type":{"name":"cc_type","type":"string","optional":true,"description":"Credit-card type"},"cc_last4":{"name":"cc_last4","type":"string","optional":true,"description":"Credit-card last 4 digits"},"connfirmation_code":{"name":"connfirmation_code","type":"string","optional":true,"description":"Credit-card transaction confirmation code"},"detail_line":{"name":"detail_line","type":"string","optional":false,"description":"Autoinvoice item description"},"is_issued":{"name":"is_issued","type":"bool","optional":false,"description":"Show issued autoinvoices?","default":"true"},"is_pending":{"name":"is_pending","type":"bool","optional":false,"description":"Show pending autoinvoices?","default":"true"},"is_cancelled":{"name":"is_cancelled","type":"bool","optional":false,"description":"Show cancelled autoinvoices?","default":"false"}}},"pdf_link":{"name":"pdf_link","type":"string","optional":true,"description":"Direct link to document PDF. Only if get_pdf_link=1 passed","notes":["pdf-access"]},"paynow_link":{"name":"paynow_link","type":"string","optional":true,"description":"PayNow (self-payment page) URL"},"convert_to":{"name":"convert_to","type":"array(string)","optional":true,"description":"List of doctypes this document can be converted to (if get_conversion_options=1 passed)","list_type":"array","key_type":"int","value_type":"string"}},"notes":{"pdf-access":"Note: access via this link will not be reflected in Document Access report"},"throws":"required_parameters_missing, doc_not_found"},"search":{"name":"search","description":"Search documents","params":{"client_id":{"name":"client_id","type":"int","optional":true,"description":"Client ID","notes":["client-id"]},"custom_client_id":{"name":"custom_client_id","type":"string","optional":true,"description":"Custom Client ID (from external system)","notes":["client-id"]},"vat_id":{"name":"vat_id","type":"numeric","optional":true,"description":"Client VAT ID","notes":["client-id"]},"email":{"name":"email","type":"string","optional":true,"description":"Client email","notes":["client-id"]},"client_name":{"name":"client_name","type":"string","optional":true,"description":"Client name","notes":["client-id"]},"client_ids":{"name":"client_ids","type":"array(int)","optional":true,"description":"Client IDs list (for multi-client search)","list_type":"array","key_type":"int","value_type":"int"},"custom_client_ids":{"name":"custom_client_ids","type":"array(string)","optional":true,"description":"Custom Client IDs list (for multi-client search)","list_type":"array","key_type":"int","value_type":"string"},"supplier_id":{"name":"supplier_id","type":"int","optional":true,"description":"Supplier ID","notes":["supplier-id"]},"supplier_ids":{"name":"supplier_ids","type":"array(int)","optional":true,"description":"Supplier IDs list (for multi-supplier search)","list_type":"array","key_type":"int","value_type":"int"},"supplier_name":{"name":"supplier_name","type":"string","optional":true,"description":"Supplier name","notes":["supplier-id"]},"user_id":{"name":"user_id","type":"int","optional":true,"description":"User ID of the employee who issued document(s)","notes":["employee-id"]},"username":{"name":"username","type":"string","optional":true,"description":"Username of the employee who issued document(s)","notes":["employee-id"]},"user_email":{"name":"user_email","type":"string","optional":true,"description":"Email address of the employee who issued document(s)","notes":["employee-id"]},"doc_date":{"name":"doc_date","type":"date","optional":true,"description":"Document date","notes":["doc-dateissued"]},"start_date":{"name":"start_date","type":"date","optional":true,"description":"Start date","notes":["doc-dateissued"]},"end_date":{"name":"end_date","type":"date","optional":true,"description":"End date","notes":["doc-dateissued"]},"start_ts":{"name":"start_ts","type":"timestamp","optional":true,"description":"Start timestamp","notes":["doc-timeissued"]},"end_ts":{"name":"end_ts","type":"timestamp","optional":true,"description":"End timestamp","notes":["doc-timeissued"]},"paydate":{"name":"paydate","type":"date","optional":true,"description":"Last payment date"},"start_paydate":{"name":"start_paydate","type":"date","optional":true,"description":"Start paydate"},"end_paydate":{"name":"end_paydate","type":"date","optional":true,"description":"End paydate"},"duedate":{"name":"duedate","type":"date","optional":true,"description":"Due date"},"start_duedate":{"name":"start_duedate","type":"date","optional":true,"description":"Start duedate"},"end_duedate":{"name":"end_duedate","type":"date","optional":true,"description":"End duedate"},"income_type_id":{"name":"income_type_id","type":"int","optional":true,"description":"Income type ID"},"status":{"name":"status","type":"int","optional":true,"description":"Document status. 0=open, 1=closed, 2=partially closed. Note that querying for open documents will also include results that are partially closed"},"doctype":{"name":"doctype","type":"mixed","optional":true,"description":"Document type(s) to query","notes":["value-list"]},"docnum":{"name":"docnum","type":"mixed","optional":true,"description":"Document number(s) to query","notes":["value-list"]},"cc_last4":{"name":"cc_last4","type":"string","optional":true,"description":"Last 4 digits of crdit-card number"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":true,"description":"Credit-card transaction confirmation code"},"pp_txn_id":{"name":"pp_txn_id","type":"string","optional":true,"description":"PayPal transaction ID"},"max_results":{"name":"max_results","type":"int","optional":true,"description":"Maximum number of results [0-1000].","default":"100"},"sort_field":{"name":"sort_field","type":"string","optional":true,"description":"Sorting: Field (dateissued|timeissued|docnum|paydate|client_name).","default":"dateissued"},"sort_order":{"name":"sort_order","type":"string","optional":true,"description":"Sorting: Order (ASC|DESC).","default":"ASC"},"offset":{"name":"offset","type":"int","optional":true,"description":"Paging: Offset (0+).","default":"0"},"limit":{"name":"limit","type":"int","optional":true,"description":"Paging: Limit number of returned results (0+). 0 = no limit.","default":"0"},"detail_level":{"name":"detail_level","type":"int","optional":true,"description":"Level of detail (0-10). 0=doctype+docnum, 1=+date+client_id+currency+total, 2+=client details+detailed totals, 3=+employee+income_type, 4+=totals translated into foreign currency where applicable ... 9=Everything but items+payment details, 10=Everything..","default":"1"},"get_doc_url":{"name":"get_doc_url","type":"bool","optional":true,"description":"Add doc_url field to results, regardless of detail_level"},"get_base_docs":{"name":"get_base_docs","type":"bool","optional":true,"description":"Populate base documents (based_on \/ based_on_this). If enabled, returns doctype+docnum pairs for each base document.","default":"false"}},"output":{"search_query":{"name":"search_query","type":"object","optional":true,"description":"Final search query. Only if debug=1"},"max_results":{"name":"max_results","type":"int","optional":false,"description":"Effective maximum number of results"},"offset":{"name":"offset","type":"int","optional":false,"description":"Effective paging offset"},"limit":{"name":"limit","type":"int","optional":false,"description":"Effective limit limit"},"results_count":{"name":"results_count","type":"int","optional":false,"description":"Number of results matching query"},"results_list":{"name":"results_list","type":"array","optional":false,"description":"List of documents"}},"notes":{"empty-query":"At least one of the query parameters MUST be specified","client-id":"Client lookup order: client_id, custom_client_id, vat_id, email, client_name.","employee-id":"Employee lookup order: user_id, username, user_email","value-list":"May be either scalar (single value or comma-separated list of values) or array of values.","doc-dateissued":"Document date as speicifed during document creation","doc-timeissued":"Document creation date\/time (real)"},"throws":"empty_query, bad_date_range, client_not_found, no_results_found, too_many_results"},"create":{"name":"create","description":"Create document","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type","notes":["doctype"]},"client_id":{"name":"client_id","type":"int","optional":true,"description":"Client ID","notes":["client-id"]},"custom_client_id":{"name":"custom_client_id","type":"string","optional":true,"description":"Custom Client ID (from external system)","notes":["client-id"]},"vat_id":{"name":"vat_id","type":"numeric","optional":true,"description":"Client VAT ID","notes":["client-id"]},"email":{"name":"email","type":"string","optional":true,"description":"Client email","notes":["client-id"]},"client_name":{"name":"client_name","type":"string","optional":true,"description":"Client name","notes":["client-id"]},"client_address":{"name":"client_address","type":"string","optional":true,"description":"Client address"},"supplier_id":{"name":"supplier_id","type":"int","optional":true,"description":"Supplire ID","notes":["supplier-id"]},"supplier_name":{"name":"supplier_name","type":"string","optional":true,"description":"Supplire name","notes":["supplier-id"]},"supplier_address":{"name":"supplier_address","type":"string","optional":true,"description":"Supplire address"},"user_id":{"name":"user_id","type":"int","optional":true,"description":"User ID of the employee issuing the document","notes":["employee-id"]},"username":{"name":"username","type":"string","optional":true,"description":"Username of the employee issuing the document","notes":["employee-id"]},"user_email":{"name":"user_email","type":"string","optional":true,"description":"Email address of the employee issuing the document","notes":["employee-id"]},"salesman_id":{"name":"salesman_id","type":"int","optional":true,"description":"Salesmane ID"},"doc_date":{"name":"doc_date","type":"date","optional":true,"description":"Document date.","default":"today"},"paydate":{"name":"paydate","type":"date","optional":true,"description":"Last payment date (applicable to doctypes: deal, invoice)"},"duedate":{"name":"duedate","type":"date","optional":true,"description":"Due date (applicable to doctypes: order, offer)"},"income_type_id":{"name":"income_type_id","type":"int","optional":true,"description":"Income type ID"},"income_type_name":{"name":"income_type_name","type":"string","optional":true,"description":"Income type name (only if income_type_id is not passed). The system will lookup income type by name. If it does not exist - it will be created automatically."},"expense_type_id":{"name":"expense_type_id","type":"int","optional":true,"description":"expense type ID"},"currency_id":{"name":"currency_id","type":"int","optional":true,"description":"Currency ID","notes":["currency"]},"currency_code":{"name":"currency_code","type":"string","optional":true,"description":"Currency Code (ISO-4217)","notes":["currency"]},"rate":{"name":"rate","type":"float","optional":true,"description":"Currency exchange rate","notes":["currency-rate"]},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Tax exempt document?"},"vat_percent":{"name":"vat_percent","type":"float","optional":true,"description":"VAT percent (if applicable)"},"totalsum":{"name":"totalsum","type":"float","optional":true,"description":"Total excluding VAT, before discount and roundup","notes":["ILS"]},"discount":{"name":"discount","type":"float","optional":true,"description":"Discount","notes":["ILS"]},"discount_incvat":{"name":"discount_incvat","type":"float","optional":true,"description":"Discount (including VAT). If discount_incvat is passed the system will extract VAT and calculate discount automatically","notes":["ILS"]},"roundup":{"name":"roundup","type":"float","optional":true,"description":"Roundup","notes":["ILS"]},"afterdiscount":{"name":"afterdiscount","type":"float","optional":true,"description":"Total excluding VAT, after discount and roundup","notes":["ILS"]},"totalwithvat":{"name":"totalwithvat","type":"float","optional":true,"description":"Total including VAT","notes":["ILS"]},"paid":{"name":"paid","type":"float","optional":true,"description":"Total amount paid by all payment methods","notes":["ILS"]},"totalwht":{"name":"totalwht","type":"float","optional":true,"description":"Total WithHolding Tax amount. If you use multiple deduction types, use deductions parameter instead.","notes":["ILS"]},"totalpaid":{"name":"totalpaid","type":"float","optional":true,"description":"Total paid including WithHolding Tax","notes":["ILS"]},"items":{"name":"items","type":"array(iCountDocItem)","optional":true,"description":"Document items","list_type":"array","key_type":"int","value_type":"iCountDocItem","value_base_type":"object","value_description":"Document Item","value_properties":{"item_id":{"name":"item_id","type":"int","optional":true,"description":"Document Item ID (automatic, only in existing document information)"},"inventory_item_id":{"name":"inventory_item_id","type":"string","optional":true,"description":"Inventory Item ID"},"sku":{"name":"sku","type":"string","optional":true,"description":"Item SKU"},"description":{"name":"description","type":"string","optional":false,"description":"Item description"},"long_description":{"name":"long_description","type":"string","optional":true,"description":"Item long description"},"currency_id":{"name":"currency_id","type":"int","optional":true,"description":"Currency ID"},"currency_rate":{"name":"currency_rate","type":"float","optional":true,"description":"Rate of conversion from item currency to document currency. For example, if document currency is EUR and the item currency is EUR - this conversion rate will be 1"},"unitprice":{"name":"unitprice","type":"float","optional":false,"description":"Item price (excluding VAT)"},"unitprice_incvat":{"name":"unitprice_incvat","type":"float","optional":true,"description":"Item price (including VAT). If unitprice_incvat is passed, the system will extract VAT and calculate unitprice automatically"},"unitprice_exempt":{"name":"unitprice_exempt","type":"float","optional":true,"description":"Item price (VAT exempt). NB: Only applicable for Lawyer invoices"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Is item tax exempt?"},"quantity":{"name":"quantity","type":"float","optional":false,"description":"Item quantity. NB: Not applicatble for Lawyer invoices"},"serial":{"name":"serial","type":"string","optional":true,"description":"Serial number"},"taxes":{"name":"taxes","type":"object(int->float)","optional":true,"description":"Item tax rates. Keys are tax type IDs (see tax\/types). Values are rates (percent)","list_type":"object","key_type":"int","value_type":"float"}},"notes":["items"]},"cash":{"name":"cash","type":"iCountCashPayment","optional":true,"description":"Cash payment","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cash amount"}},"notes":["payment"]},"cheques":{"name":"cheques","type":"array(iCountChequePayment)","optional":true,"description":"Cheques","list_type":"array","key_type":"int","value_type":"iCountChequePayment","value_base_type":"object","value_description":"Cheque payment","value_properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cheque amount"},"date":{"name":"date","type":"date","optional":false,"description":"Cheque date"},"bank":{"name":"bank","type":"int","optional":false,"description":"Cheque bank"},"branch":{"name":"branch","type":"int","optional":false,"description":"Cheque branch"},"account":{"name":"account","type":"int","optional":false,"description":"Cheque account"},"number":{"name":"number","type":"int","optional":false,"description":"Cheque number"}},"notes":["payment"]},"banktransfer":{"name":"banktransfer","type":"iCountBankTransferPayment","optional":true,"description":"BankTransfer payment","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"BankTransfer amount"},"date":{"name":"date","type":"date","optional":false,"description":"BankTransfer date"},"account":{"name":"account","type":"int","optional":false,"description":"Bank account ID where BankTransfer was deposited"}},"notes":["payment"]},"cc":{"name":"cc","type":"iCountCreditCardPayment","optional":true,"description":"Credit-Card payment","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Credit-Card transaction amount"},"date":{"name":"date","type":"date","optional":true,"description":"Transaction date"},"num_of_payments":{"name":"num_of_payments","type":"int","optional":false,"description":"Number of installments"},"first_payment":{"name":"first_payment","type":"float","optional":false,"description":"First payment amount; Applicable only for installments"},"token_id":{"name":"token_id","type":"int","optional":true,"description":"Credit-Card token ID. Requires cc_storage module"},"card_number":{"name":"card_number","type":"int","optional":false,"description":"Credit-Card number"},"card_type":{"name":"card_type","type":"string","optional":false,"description":"Credit-Card type"},"cvv":{"name":"cvv","type":"int","optional":false,"description":"Credit-Card CVV number"},"exp_year":{"name":"exp_year","type":"int","optional":false,"description":"Card Expiration year"},"exp_month":{"name":"exp_month","type":"int","optional":false,"description":"Card Expiration month"},"holder_id":{"name":"holder_id","type":"int","optional":false,"description":"Card Holder ID"},"holder_name":{"name":"holder_name","type":"string","optional":false,"description":"Card Holder name"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":false,"description":"Credit-Card transaction confirmation number"}},"notes":["payment"]},"paypal":{"name":"paypal","type":"iCountPayPalPayment","optional":true,"description":"PayPal payment method","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"PayPal transaction amount"},"date":{"name":"date","type":"date","optional":false,"description":"PayPal transaction date"},"txn_id":{"name":"txn_id","type":"string","optional":false,"description":"PayPal transaction ID"},"payer_name":{"name":"payer_name","type":"string","optional":false,"description":"PayPal payer name"}},"notes":["payment"]},"barter":{"name":"barter","type":"iCountBarterPayment","optional":true,"description":"Barter payment method","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Barter amount"}},"notes":["payment"]},"payments":{"name":"payments","type":"object(string->iCountDocPayment)","optional":true,"description":"Additional payment methods (eg payment app)","list_type":"object","key_type":"string","value_type":"iCountDocPayment","value_base_type":"object","value_description":"Generic payment method. for details","value_properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Payment sum"},"payment_date":{"name":"payment_date","type":"date","optional":true,"description":"Payment date.","default":"<doc_date>"},"card_brand":{"name":"card_brand","type":"string","optional":true,"description":"Card brand (for payment_app - app type, for gift cards - gift card type\/club code)"},"card_number":{"name":"card_number","type":"string","optional":true,"description":"Card last 4 digits (if applicable - for example, for gift-cards)"},"payer_name":{"name":"payer_name","type":"string","optional":true,"description":"Payer name"},"payer_email":{"name":"payer_email","type":"string","optional":true,"description":"Payer email"},"payer_phone":{"name":"payer_phone","type":"string","optional":true,"description":"Payer phone"},"payer_address":{"name":"payer_address","type":"string","optional":true,"description":"Payer address"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":true,"description":"Confirmation code"}},"notes":["payment"],"see":[{"module":"","method":"payment_methods"}]},"deductions":{"name":"deductions","type":"object(int->float)","optional":true,"description":"Deductions. The key is deduction_type_id and value is deduction amount. The amounts should be in document currency. deduction_type_id=0 is withholding tax (aka \"nicui\")","list_type":"object","key_type":"int","value_type":"float","see":[{"module":"deduction_type","method":"get_list"}]},"autoinvoice":{"name":"autoinvoice","type":"bool","optional":true,"description":"Enable automatic invoices on cheques.","default":"false","notes":["receipt-only"]},"autocheque_detail":{"name":"autocheque_detail","type":"string","optional":true,"description":"Text for automatic invoices on cheques","notes":["receipt-only"]},"autoinvoice_cc":{"name":"autoinvoice_cc","type":"bool","optional":true,"description":"Enable automatic invoices on credit-card installments.","default":"false","notes":["receipt-only"]},"autocc_detail":{"name":"autocc_detail","type":"string","optional":true,"description":"Text for automatic invoices on credit-card installments.","notes":["receipt-only"]},"autocc_income_type_id":{"name":"autocc_income_type_id","type":"int","optional":true,"description":"Income type ID for automatic invoices on credit-card installments.","notes":["receipt-only"]},"autocc_exempt":{"name":"autocc_exempt","type":"bool","optional":true,"description":"Tax exempt flag for automatic invoices on credit-card installments.","notes":["receipt-only"]},"enable_paynow":{"name":"enable_paynow","type":"bool","optional":true,"description":"Enable self-payment ilink by customer (invoice \/ deal only)"},"based_on":{"name":"based_on","type":"array(iCountBaseDoc)","optional":true,"description":"Base documents list","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}},"doc_title":{"name":"doc_title","type":"string","optional":true,"description":"Document title"},"hwc":{"name":"hwc","type":"string","optional":true,"description":"Additional comments"},"append_preset_comments":{"name":"append_preset_comments","type":"bool","optional":true,"description":"Append document type preset comments to comments passed in hwc"},"sanity_string":{"name":"sanity_string","type":"string","optional":true,"description":"Unique sanity string for document. If passed, prevents issuing duplicate documents with same sanity_string value. Max length: 30"},"doc_lang":{"name":"doc_lang","type":"string","optional":true,"description":"Language of the document version. If not passed, current session language (API lang) will be used."},"send_email":{"name":"send_email","type":"bool","optional":true,"description":"Send doc original by email?.","default":"false","see":[{"module":"doc","method":"email"}]},"send_sms":{"name":"send_sms","type":"bool","optional":true,"description":"Send doc original by sms?.","default":"false","see":[{"module":"doc","method":"sms"}]}},"output":{"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"custom_client_id":{"name":"custom_client_id","type":"string","optional":false,"description":"Custom Client ID"},"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"doc_url":{"name":"doc_url","type":"string","optional":false,"description":"Document original URL"},"doc_copy_url":{"name":"doc_copy_url","type":"string","optional":false,"description":"Document copy URL"},"invoice_reference_number":{"name":"invoice_reference_number","type":"string","optional":true,"description":"Invoice reference number issued by tax authority (if applicable)"}},"notes":{"client-id":"Client lookup order: client_id, custom_client_id, vat_id, email, client_name. If client does not exist, new client is created, and then at least client_name is mandatory","supplier-id":"Supplier lookup order: supplier_id, vat_id, supplier_name. If supplier does not exist, new supplier is created, and then at least upplier_name is mandatory  (relevant for doctype=po)","employee-id":"Employee lookup order: user_id, username, user_email. Default: currently authenticated user","currency":"Currency detection order: currency_id, currency_code. Default: currency_code=ILS","currency-code":"If currency is not ILS, and rate is not passed, the system detects rate automatically based on dateissued","ILS":"Totals are always in ILS regardless of document currency","items":"Optional only for receipt, donation receipt and refund. Mandatory for other document types","payment":"Only applicable for receipt, donation receipt and invoice\/receipt document types. At least one payment method must be passed not empty for these types.","receipt-only":"Only applicable for doctype=receipt","doctype":"List of supported document types: invoice, receipt, invrec (invoice\/receipt), refund, deal, offer, order, trec, delcert. The list may vary by your company type, so to get the complete list of what is available call doc\/types method. @see doc\/types"},"examples":{"items_encoding":{"description":"Items encoding","file":null,"code":"items[0][description]=First%20Item&items[0][unitprice]=10&items[0][quantity]=1&items[1][description]=Second%20Item&items[1][unitprice]=2&items[1][quantity]=5","syntax":"www"},"cc_encoding":{"description":"Credit-card info encoding","file":null,"code":"cc[sum]=100&cc[card_type]=VISA&cc[card_number]=0000&cc[exp_year]=2020&cc[exp_month]=3&cc[holder_id]=1234566789&cc[holde_name]=Israel%20Israeli&cc[confirmation_code]=875646","syntax":"www"},"php_invrec":{"description":"PHP sample for creating an invoice\/receipt and send it to email","file":"doc_create_invrec.php","code":null,"syntax":null},"json_invrec":{"description":"Sample request in JSON format for creating an invoice\/receipt and send it to email (same as the PHP example above)","file":"doc_create_invrec.json","code":null,"syntax":"json"},"json_error_sanity":{"description":"Sample error response on duplicate sanity_string","file":"doc_exists_based_on_sanity_string.json","code":null,"syntax":"json"}},"throws":"client_not_found, bad_doctype, sanity_string_too_long, doc_exists_based_on_sanity_string, create_doc_failed","see":"doc\/email"},"edit":{"name":"edit","description":"Edit existing document","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"}},"notes":{"same-as-create":"All fields required to create a document should be passed as well"},"throws":"missing_doctype, bad_doctype, doctype_not_editable, not_allowed","see":"create"},"cancel":{"name":"cancel","description":"Cancel a document","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"refund_cc":{"name":"refund_cc","type":"bool","optional":true,"description":"Refund credit-card transaction. Will throw an error if there is no cc transaction in document, or if refund failed."},"reason":{"name":"reason","type":"string","optional":true,"description":"Cancellation reason"}},"output":{"cancellation_doctype":{"name":"cancellation_doctype","type":"string","optional":true,"description":"Cancellation document type"},"cancellation_docnum":{"name":"cancellation_docnum","type":"int","optional":true,"description":"Cancellation document number"}},"throws":"required_parameters_missing, doc_not_found, doc_not_cancellable"},"close":{"name":"close","description":"Close document\nIf based_on list provided - close base documents and update remaining sums for all documents (target and base)\nOtherwise, just mark document as closed","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"based_on":{"name":"based_on","type":"array(iCountBaseDoc)","optional":true,"description":"Base documents list","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}}},"throws":"required_parameters_missing, doc_not_found, doc_is_closed, unsupported_doctype, doc_not_closable"},"reopen":{"name":"reopen","description":"Mark document as open","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"}},"throws":"required_parameters_missing, doc_not_found, doc_not_openable"},"email":{"name":"email","description":"Send document by email","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"orig":{"name":"orig","type":"bool","optional":true,"description":"Original if true, copy if false.","default":"true"},"hidenis":{"name":"hidenis","type":"bool","optional":true,"description":"Hide ILS prices from document (only show foreign currency). Applicable only for documents in foreign currency and for languages other then he.","default":"false"},"email_lang":{"name":"email_lang","type":"string","optional":true,"description":"Email language. This also affects the language of the document version. If not passed, current session language (API lang) will be used."},"email_to":{"name":"email_to","type":"string","optional":true,"description":"Email TO. If empty, assume email_to_client is true","default":"<email_to_client>","notes":["email-addr-list"]},"email_to_client":{"name":"email_to_client","type":"bool","optional":true,"description":"Send email to default client email?","default":"false"},"email_to_creator":{"name":"email_to_creator","type":"bool","optional":true,"description":"Send email to document creator?","default":"false"},"email_to_me":{"name":"email_to_me","type":"bool","optional":true,"description":"Send email to authenticated user?","default":"false"},"email_cc":{"name":"email_cc","type":"string","optional":true,"description":"Email CC (Carbon Copy).","default":"null","notes":["email-addr-list"]},"email_cc_client":{"name":"email_cc_client","type":"bool","optional":true,"description":"Send CC to default client email?","default":"false"},"email_cc_creator":{"name":"email_cc_creator","type":"bool","optional":true,"description":"Send CC to document creator?","default":"false"},"email_cc_me":{"name":"email_cc_me","type":"bool","optional":true,"description":"Send CC to authenticated user?","default":"false"},"email_bcc":{"name":"email_bcc","type":"string","optional":true,"description":"Email BCC (Blind Carbon Copy).","default":"null","notes":["email-addr-list"]},"email_bcc_client":{"name":"email_bcc_client","type":"bool","optional":true,"description":"Send BCC to default client email?","default":"false"},"email_bcc_creator":{"name":"email_bcc_creator","type":"bool","optional":true,"description":"Send BCC to document creator?","default":"false"},"email_bcc_me":{"name":"email_bcc_me","type":"bool","optional":true,"description":"Send BCC to authenticated user?","default":"false"},"email_subject":{"name":"email_subject","type":"string","optional":true,"description":"Subject. If not passed, the system will generate one for You.","default":"null"},"email_subject_prefix":{"name":"email_subject_prefix","type":"string","optional":true,"description":"Subject prefix. Only applicable when email_subject is not passed.","default":"null"},"email_subject_suffix":{"name":"email_subject_suffix","type":"string","optional":true,"description":"Subject suffix. Only applicable when email_subject is not passed.","default":"null"},"email_comment":{"name":"email_comment","type":"string","optional":true,"description":"Additional comment to place in the email body.","default":"null"}},"output":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"custom_client_id":{"name":"custom_client_id","type":"string","optional":false,"description":"Custom Client ID (from external system)"},"email_to":{"name":"email_to","type":"array(string)","optional":false,"description":"Effective recipient email addresses","list_type":"array","key_type":"int","value_type":"string"},"email_status":{"name":"email_status","type":"object(string->iCountDocEmailStatus)","optional":false,"description":"Email sending status list. Keys are email addresses.","list_type":"object","key_type":"string","value_type":"iCountDocEmailStatus","value_base_type":"object","value_description":"Document email sending status","value_properties":{"email":{"name":"email","type":"string","optional":false,"description":"Recipient email"},"name":{"name":"name","type":"string","optional":false,"description":"Recipient name"},"email_sent":{"name":"email_sent","type":"bool","optional":false,"description":"Email sent?"},"reason":{"name":"reason","type":"string","optional":true,"description":"Email sending error reason"}}},"email_cc":{"name":"email_cc","type":"array(string)","optional":true,"description":"CC recipient email addresses","list_type":"array","key_type":"int","value_type":"string"},"email_bcc":{"name":"email_bcc","type":"array(string)","optional":true,"description":"BCC recipient email addresses","list_type":"array","key_type":"int","value_type":"string"}},"notes":{"email-addr-list":"Can be single address, array or comma-separated list of addresses"},"throws":"bad_doctype, bad_docnum, doc_not_found, missing_recipient, bad_recipient, email_failed"},"sms":{"name":"sms","description":"Send document link in SMS","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"orig":{"name":"orig","type":"bool","optional":true,"description":"Original if true, copy if false.","default":"true"},"hidenis":{"name":"hidenis","type":"bool","optional":true,"description":"Hide ILS prices from document (only show foreign currency). Applicable only for documents in foreign currency and for languages other then he.","default":"false"},"sms_lang":{"name":"sms_lang","type":"string","optional":true,"description":"SMS language. This also affects the language of the document version. If not passed, current session language (API lang) will be used."},"sms_to":{"name":"sms_to","type":"string","optional":true,"description":"sms TO. If empty, assume sms_to_client is true","default":"<sms_to_client>","notes":["sms-addr-list"]},"sms_to_client":{"name":"sms_to_client","type":"bool","optional":true,"description":"Send sms to default client mobile number?","default":"false"},"sms_to_creator":{"name":"sms_to_creator","type":"bool","optional":true,"description":"Send sms to document creator?","default":"false"},"sms_to_me":{"name":"sms_to_me","type":"bool","optional":true,"description":"Send sms to authenticated user?","default":"false"},"sms_prefix":{"name":"sms_prefix","type":"string","optional":true,"description":"Prefix for sms text. Will appear before document link. name + document type + number","default":"company"},"sms_comment":{"name":"sms_comment","type":"string","optional":true,"description":"Additional comment to place in the sms body.","default":"null"}},"output":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"custom_client_id":{"name":"custom_client_id","type":"string","optional":false,"description":"Custom Client ID (from external system)"},"sms_to":{"name":"sms_to","type":"array(string)","optional":false,"description":"Effective sms recipients","list_type":"array","key_type":"int","value_type":"string"},"sms_status":{"name":"sms_status","type":"array(iCountSMSStatus)","optional":false,"description":"List of SMS sending statuses","list_type":"array","key_type":"int","value_type":"iCountSMSStatus"}},"notes":{"sms-addr-list":"Can be single phone number, array or comma-separated list of numbers. Each phone number can be either in international (+12345678899) OR national (0501234567) format"},"throws":"bad_doctype, bad_docnum, doc_not_found, missing_recipient, bad_recipient, sms_failed","requires":"sms","see":"sms\/send"},"get_doc_url":{"name":"get_doc_url","description":"Get doc URL","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"orig":{"name":"orig","type":"bool","optional":true,"description":"Original if true, copy if false.","default":"true"},"hidenis":{"name":"hidenis","type":"bool","optional":true,"description":"Hide ILS prices from document (only show foreign currency). Applicable only for documents in foreign currency and for languages other then he.","default":"false"},"doc_lang":{"name":"doc_lang","type":"string","optional":true,"description":"Language of the document version. If not passed, current session language (API lang) will be used."},"email_to":{"name":"email_to","type":"string","optional":true,"description":"Recipient email address. If not provided, email tracking information will not be added to URL"},"lang":{"name":"lang","type":"string","optional":false,"description":"Language"}},"output":{"doc_url":{"name":"doc_url","type":"string","optional":false,"description":"Document URL"}},"throws":"bad_doctype, bad_docnum, doc_not_found"},"get_paynow_link":{"name":"get_paynow_link","description":"Get PayNow (self-payment page) URL for document","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"shortlink":{"name":"shortlink","type":"bool","optional":true,"description":"Return shortened URL instead of regular paynow link"},"max_clicks":{"name":"max_clicks","type":"int","optional":true,"description":"Shortlink max clicks.","default":"30"},"expire_days":{"name":"expire_days","type":"int","optional":true,"description":"Shortlink expiration days.","default":"30"}},"output":{"paynow_link":{"name":"paynow_link","type":"string","optional":false,"description":"PayNow (self-payment page) URL"}},"throws":"bad_doctype, bad_docnum, doc_not_found, no_paynow_in_doctype, doc_is_closed, doc_is_cancelled, doc_is_paid"},"get_doc_iqr":{"name":"get_doc_iqr","description":"Get doc iQR","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"doc_lang":{"name":"doc_lang","type":"string","optional":true,"description":"Language of the document version. If not passed, current session language (API lang) will be used."},"lang":{"name":"lang","type":"string","optional":false,"description":"Language"}},"output":{"iqr_url":{"name":"iqr_url","type":"string","optional":false,"description":"Document iQR URL"},"iqr_data":{"name":"iqr_data","type":"objcet","optional":false,"description":"Document iQR data"}},"throws":"bad_doctype, bad_docnum, doc_not_found, iqr_error"},"types":{"name":"types","description":"Get available doctypes","params":{"list_type":{"name":"list_type","type":"string","optional":true,"description":"List type (array|object).","default":"object"}},"output":{"doctypes":{"name":"doctypes","type":"object(string->iCountDocTypeInfo)","optional":false,"description":"List of available doctypes","list_type":"object","key_type":"string","value_type":"iCountDocTypeInfo","value_base_type":"object","value_description":"Document type information","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"title":{"name":"title","type":"string","optional":false,"description":"Document type title"},"has_vat":{"name":"has_vat","type":"bool","optional":false,"description":"Is VAT applicable for this document type?"},"has_items":{"name":"has_items","type":"bool","optional":false,"description":"Document type has items?"},"has_lawyer_items":{"name":"has_lawyer_items","type":"bool","optional":false,"description":"Document type has lawyer items? (special layout)"},"has_payment":{"name":"has_payment","type":"bool","optional":false,"description":"Document type has payment information?"},"has_paydate":{"name":"has_paydate","type":"bool","optional":false,"description":"Document type has paydate?"},"has_duedate":{"name":"has_duedate","type":"bool","optional":false,"description":"Document type has duedate?"},"has_paynow":{"name":"has_paynow","type":"bool","optional":false,"description":"Document type supports PayNow?"},"has_discount":{"name":"has_discount","type":"bool","optional":false,"description":"Document type has discount?"},"has_roundup":{"name":"has_roundup","type":"bool","optional":false,"description":"Document type has roundup?"},"has_incometype":{"name":"has_incometype","type":"bool","optional":false,"description":"Document type has incometype?"},"has_self_function":{"name":"has_self_function","type":"bool","optional":false,"description":"Document type has self_function?"},"has_po_field":{"name":"has_po_field","type":"bool","optional":false,"description":"Document type has po (Purchase Order) field?"},"has_reason_field":{"name":"has_reason_field","type":"bool","optional":false,"description":"Document type has reason field?"}}}}},"get_next_docnums":{"name":"get_next_docnums","description":"Get next document numbers for every type","params":{"next_docnums":{"name":"next_docnums","type":"object","optional":false,"description":"List of next docnums (key=>value, where keys are doctypes and values are document numbers)"}}},"set_next_docnums":{"name":"set_next_docnums","description":"Set next (initial) document numbers","params":{"docnums":{"name":"docnums","type":"object","optional":false,"description":"List of next docnums to set (key=>value, where keys are doctypes and values are document numbers)"}},"output":{"next_docnums":{"name":"next_docnums","type":"object","optional":false,"description":"List of next docnums (key=>value, where keys are doctypes and values are document numbers)"}}},"get_doc_conversion_options":{"name":"get_doc_conversion_options","description":"Get document conversion options","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"}},"output":{"convert_to":{"name":"convert_to","type":"array(string)","optional":false,"description":"List of doctypes this document can be converted to","list_type":"array","key_type":"int","value_type":"string"}},"throws":"bad_doctype, bad_docnum, doc_not_found"},"prepare_base_docs_conversion":{"name":"prepare_base_docs_conversion","description":"Prepare new document items from base documents","params":{"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"based_on":{"name":"based_on","type":"array(iCountBaseDoc)","optional":false,"description":"List of base documents for conversion","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}}}},"update_doc_income_type":{"name":"update_doc_income_type","description":"Update document income type","params":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"income_type_id":{"name":"income_type_id","type":"int","optional":true,"description":"Income type ID"},"income_type_name":{"name":"income_type_name","type":"string","optional":true,"description":"Income type name (only if income_type_id is not passed). The system will lookup income type by name. If it does not exist - it will be created automatically."}},"notes":{"income-type":"Either income_type_id or income_type_name is required"},"throws":"bad_doctype, bad_docnum, doc_not_found, income_type_not_applicable, missing_income_type, income_type_not_found"},"payment_methods":{"name":"payment_methods","description":"Get enabled payment methods","params":{"list_type":{"name":"list_type","type":"string","optional":true,"description":"List type (array|object).","default":"object"}},"output":{"payment_methods":{"name":"payment_methods","type":"object(string->payment_method.iCountPaymentMethodInfo)","optional":false,"description":"List of payment methods. If list_type=array, return type is array(iCountPaymentMethodInfo), otherwise the keys are payment method codes.","list_type":"object","key_type":"string","value_type":"payment_method.iCountPaymentMethodInfo"}}}},"typedef":{"iCountDocItem":{"name":"iCountDocItem","type":"object","optional":false,"description":"Document Item","properties":{"item_id":{"name":"item_id","type":"int","optional":true,"description":"Document Item ID (automatic, only in existing document information)"},"inventory_item_id":{"name":"inventory_item_id","type":"string","optional":true,"description":"Inventory Item ID"},"sku":{"name":"sku","type":"string","optional":true,"description":"Item SKU"},"description":{"name":"description","type":"string","optional":false,"description":"Item description"},"long_description":{"name":"long_description","type":"string","optional":true,"description":"Item long description"},"currency_id":{"name":"currency_id","type":"int","optional":true,"description":"Currency ID"},"currency_rate":{"name":"currency_rate","type":"float","optional":true,"description":"Rate of conversion from item currency to document currency. For example, if document currency is EUR and the item currency is EUR - this conversion rate will be 1"},"unitprice":{"name":"unitprice","type":"float","optional":false,"description":"Item price (excluding VAT)"},"unitprice_incvat":{"name":"unitprice_incvat","type":"float","optional":true,"description":"Item price (including VAT). If unitprice_incvat is passed, the system will extract VAT and calculate unitprice automatically"},"unitprice_exempt":{"name":"unitprice_exempt","type":"float","optional":true,"description":"Item price (VAT exempt). NB: Only applicable for Lawyer invoices"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Is item tax exempt?"},"quantity":{"name":"quantity","type":"float","optional":false,"description":"Item quantity. NB: Not applicatble for Lawyer invoices"},"serial":{"name":"serial","type":"string","optional":true,"description":"Serial number"},"taxes":{"name":"taxes","type":"object(int->float)","optional":true,"description":"Item tax rates. Keys are tax type IDs (see tax\/types). Values are rates (percent)","list_type":"object","key_type":"int","value_type":"float"}}},"iCountCashPayment":{"name":"iCountCashPayment","type":"object","optional":false,"description":"Cash payment","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cash amount"}}},"iCountChequePayment":{"name":"iCountChequePayment","type":"object","optional":false,"description":"Cheque payment","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cheque amount"},"date":{"name":"date","type":"date","optional":false,"description":"Cheque date"},"bank":{"name":"bank","type":"int","optional":false,"description":"Cheque bank"},"branch":{"name":"branch","type":"int","optional":false,"description":"Cheque branch"},"account":{"name":"account","type":"int","optional":false,"description":"Cheque account"},"number":{"name":"number","type":"int","optional":false,"description":"Cheque number"}}},"iCountBankTransferPayment":{"name":"iCountBankTransferPayment","type":"object","optional":false,"description":"BankTransfer payment","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"BankTransfer amount"},"date":{"name":"date","type":"date","optional":false,"description":"BankTransfer date"},"account":{"name":"account","type":"int","optional":false,"description":"Bank account ID where BankTransfer was deposited"}}},"iCountCreditCardPayment":{"name":"iCountCreditCardPayment","type":"object","optional":false,"description":"Credit-Card payment","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Credit-Card transaction amount"},"date":{"name":"date","type":"date","optional":true,"description":"Transaction date"},"num_of_payments":{"name":"num_of_payments","type":"int","optional":false,"description":"Number of installments"},"first_payment":{"name":"first_payment","type":"float","optional":false,"description":"First payment amount; Applicable only for installments"},"token_id":{"name":"token_id","type":"int","optional":true,"description":"Credit-Card token ID. Requires cc_storage module"},"card_number":{"name":"card_number","type":"int","optional":false,"description":"Credit-Card number"},"card_type":{"name":"card_type","type":"string","optional":false,"description":"Credit-Card type"},"cvv":{"name":"cvv","type":"int","optional":false,"description":"Credit-Card CVV number"},"exp_year":{"name":"exp_year","type":"int","optional":false,"description":"Card Expiration year"},"exp_month":{"name":"exp_month","type":"int","optional":false,"description":"Card Expiration month"},"holder_id":{"name":"holder_id","type":"int","optional":false,"description":"Card Holder ID"},"holder_name":{"name":"holder_name","type":"string","optional":false,"description":"Card Holder name"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":false,"description":"Credit-Card transaction confirmation number"}}},"iCountPayPalPayment":{"name":"iCountPayPalPayment","type":"object","optional":false,"description":"PayPal payment method","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"PayPal transaction amount"},"date":{"name":"date","type":"date","optional":false,"description":"PayPal transaction date"},"txn_id":{"name":"txn_id","type":"string","optional":false,"description":"PayPal transaction ID"},"payer_name":{"name":"payer_name","type":"string","optional":false,"description":"PayPal payer name"}}},"iCountBarterPayment":{"name":"iCountBarterPayment","type":"object","optional":false,"description":"Barter payment method","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Barter amount"}}},"iCountDocPayment":{"name":"iCountDocPayment","type":"object","optional":false,"description":"Generic payment method. for details","see":[{"module":"doc","method":"payment_methods"}],"properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Payment sum"},"payment_date":{"name":"payment_date","type":"date","optional":true,"description":"Payment date.","default":"<doc_date>"},"card_brand":{"name":"card_brand","type":"string","optional":true,"description":"Card brand (for payment_app - app type, for gift cards - gift card type\/club code)"},"card_number":{"name":"card_number","type":"string","optional":true,"description":"Card last 4 digits (if applicable - for example, for gift-cards)"},"payer_name":{"name":"payer_name","type":"string","optional":true,"description":"Payer name"},"payer_email":{"name":"payer_email","type":"string","optional":true,"description":"Payer email"},"payer_phone":{"name":"payer_phone","type":"string","optional":true,"description":"Payer phone"},"payer_address":{"name":"payer_address","type":"string","optional":true,"description":"Payer address"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":true,"description":"Confirmation code"}}},"iCountBaseDoc":{"name":"iCountBaseDoc","type":"object","optional":false,"description":"Base document info","properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}},"iCountDocInfo":{"name":"iCountDocInfo","type":"object","optional":false,"description":"Document information","properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Document number"},"dateissued":{"name":"dateissued","type":"date","optional":false,"description":"Document date"},"timeissued":{"name":"timeissued","type":"timestamp","optional":false,"description":"Document creation time"},"client_id":{"name":"client_id","type":"int","optional":false,"description":"Client ID"},"custom_client_id":{"name":"custom_client_id","type":"int","optional":false,"description":"Custom client ID"},"client_idno":{"name":"client_idno","type":"int","optional":false,"description":"Client VAT ID"},"client_name":{"name":"client_name","type":"string","optional":false,"description":"Client name"},"client_address":{"name":"client_address","type":"string","optional":false,"description":"Client address"},"currency_id":{"name":"currency_id","type":"int","optional":false,"description":"Currency ID"},"currency_code":{"name":"currency_code","type":"string","optional":false,"description":"Currency Code (ISO-4217)"},"rate":{"name":"rate","type":"float","optional":false,"description":"Currency exchange rate"},"user_id":{"name":"user_id","type":"int","optional":true,"description":"Employee ID (issuer)"},"salesman_id":{"name":"salesman_id","type":"int","optional":true,"description":"Salesmane ID"},"paydate":{"name":"paydate","type":"date","optional":true,"description":"Last payment date (if applicable)"},"duedate":{"name":"duedate","type":"date","optional":true,"description":"Due date (if applicable)"},"income_type_id":{"name":"income_type_id","type":"int","optional":true,"description":"Income type ID"},"expense_type_id":{"name":"expense_type_id","type":"int","optional":true,"description":"expense type ID"},"invoice_reference_number":{"name":"invoice_reference_number","type":"string","optional":true,"description":"Invoice reference number issued by tax authority (if applicable)"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Tax exempt document?"},"vat_percent":{"name":"vat_percent","type":"float","optional":true,"description":"VAT percent (if applicable)"},"totalsum":{"name":"totalsum","type":"float","optional":true,"description":"Total excluding VAT, before discount and roundup","notes":["ILS"]},"totalsum_currency":{"name":"totalsum_currency","type":"float","optional":true,"description":"Total excluding VAT, before discount and roundup in foreign currency (if applicable)"},"discount":{"name":"discount","type":"float","optional":true,"description":"Discount","notes":["ILS"]},"discount_currency":{"name":"discount_currency","type":"float","optional":true,"description":"Discount in foreign currency (if applicable)"},"roundup":{"name":"roundup","type":"float","optional":true,"description":"Roundup","notes":["ILS"]},"roundup_currency":{"name":"roundup_currency","type":"float","optional":true,"description":"Roundup in foreign currency (if applicable)"},"afterdiscount":{"name":"afterdiscount","type":"float","optional":true,"description":"Total excluding VAT, after discount and roundup","notes":["ILS"]},"afterdiscount_currency":{"name":"afterdiscount_currency","type":"float","optional":true,"description":"Total excluding VAT, after discount and roundup in foreign currency (if applicable)"},"totalwithvat":{"name":"totalwithvat","type":"float","optional":true,"description":"Total including VAT","notes":["ILS"]},"totalwithvat_currency":{"name":"totalwithvat_currency","type":"float","optional":true,"description":"Total including VAT in foreign currency (if applicable)"},"paid":{"name":"paid","type":"float","optional":true,"description":"Total amount paid by all payment methods","notes":["ILS"]},"paid_currency":{"name":"paid_currency","type":"float","optional":true,"description":"Total amount paid by all payment methods in foreign currency (if applicable)"},"totalwht":{"name":"totalwht","type":"float","optional":true,"description":"WithHolding Tax amount","notes":["ILS"]},"totalwht_currency":{"name":"totalwht_currency","type":"float","optional":true,"description":"WithHolding Tax amount in foreign currency (if applicable)"},"totalpaid":{"name":"totalpaid","type":"float","optional":true,"description":"Total paid including WithHolding Tax","notes":["ILS"]},"totalpaid_currency":{"name":"totalpaid_currency","type":"float","optional":true,"description":"Total paid including WithHolding Tax in foreign currency (if applicable)"},"remainingsum":{"name":"remainingsum","type":"float","optional":true,"description":"Document remaining sum","notes":["ILS"]},"remainingsum_currency":{"name":"remainingsum_currency","type":"float","optional":true,"description":"Document remaining sum in foreign currency (if applicable)"},"remainingsum_before_vat":{"name":"remainingsum_before_vat","type":"float","optional":true,"description":"Document remaining sum excluding VAT (if applicable)","notes":["ILS"]},"remainingsum_before_vat_currency":{"name":"remainingsum_before_vat_currency","type":"float","optional":true,"description":"Document remaining sum excluding VAT in foreign currency (if applicable)"},"status":{"name":"status","type":"int","optional":true,"description":"Document status. Values: 0=open, 1=closed, 2=partially closed"},"is_cancelled":{"name":"is_cancelled","type":"bool","optional":true,"description":"Is this document cancelled by other document?"},"is_cancellation":{"name":"is_cancellation","type":"bool","optional":true,"description":"Did this document cancel another document?"},"cancellation_reason":{"name":"cancellation_reason","type":"string","optional":true,"description":"Did this document cancel another document?"},"cancellation_doctype":{"name":"cancellation_doctype","type":"string","optional":true,"description":"Cancellation document type"},"cancellation_docnum":{"name":"cancellation_docnum","type":"int","optional":true,"description":"Cancellation document number"},"cancelled_doctype":{"name":"cancelled_doctype","type":"string","optional":true,"description":"Cancelled document type"},"cancelled_docnum":{"name":"cancelled_docnum","type":"int","optional":true,"description":"Cancelled document number"},"is_closable":{"name":"is_closable","type":"bool","optional":true,"description":"Is this document closable?"},"is_openable":{"name":"is_openable","type":"bool","optional":true,"description":"Is this document openable?"},"items":{"name":"items","type":"array(iCountDocItem)","optional":true,"description":"Document items","list_type":"array","key_type":"int","value_type":"iCountDocItem","value_base_type":"object","value_description":"Document Item","value_properties":{"item_id":{"name":"item_id","type":"int","optional":true,"description":"Document Item ID (automatic, only in existing document information)"},"inventory_item_id":{"name":"inventory_item_id","type":"string","optional":true,"description":"Inventory Item ID"},"sku":{"name":"sku","type":"string","optional":true,"description":"Item SKU"},"description":{"name":"description","type":"string","optional":false,"description":"Item description"},"long_description":{"name":"long_description","type":"string","optional":true,"description":"Item long description"},"currency_id":{"name":"currency_id","type":"int","optional":true,"description":"Currency ID"},"currency_rate":{"name":"currency_rate","type":"float","optional":true,"description":"Rate of conversion from item currency to document currency. For example, if document currency is EUR and the item currency is EUR - this conversion rate will be 1"},"unitprice":{"name":"unitprice","type":"float","optional":false,"description":"Item price (excluding VAT)"},"unitprice_incvat":{"name":"unitprice_incvat","type":"float","optional":true,"description":"Item price (including VAT). If unitprice_incvat is passed, the system will extract VAT and calculate unitprice automatically"},"unitprice_exempt":{"name":"unitprice_exempt","type":"float","optional":true,"description":"Item price (VAT exempt). NB: Only applicable for Lawyer invoices"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":true,"description":"Is item tax exempt?"},"quantity":{"name":"quantity","type":"float","optional":false,"description":"Item quantity. NB: Not applicatble for Lawyer invoices"},"serial":{"name":"serial","type":"string","optional":true,"description":"Serial number"},"taxes":{"name":"taxes","type":"object(int->float)","optional":true,"description":"Item tax rates. Keys are tax type IDs (see tax\/types). Values are rates (percent)","list_type":"object","key_type":"int","value_type":"float"}}},"cash":{"name":"cash","type":"iCountCashPayment","optional":true,"description":"Cash payment","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cash amount"}}},"cheques":{"name":"cheques","type":"array(iCountChequePayment)","optional":true,"description":"Cheques","list_type":"array","key_type":"int","value_type":"iCountChequePayment","value_base_type":"object","value_description":"Cheque payment","value_properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Cheque amount"},"date":{"name":"date","type":"date","optional":false,"description":"Cheque date"},"bank":{"name":"bank","type":"int","optional":false,"description":"Cheque bank"},"branch":{"name":"branch","type":"int","optional":false,"description":"Cheque branch"},"account":{"name":"account","type":"int","optional":false,"description":"Cheque account"},"number":{"name":"number","type":"int","optional":false,"description":"Cheque number"}}},"banktransfer":{"name":"banktransfer","type":"iCountBankTransferPayment","optional":true,"description":"Bank transfer payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"BankTransfer amount"},"date":{"name":"date","type":"date","optional":false,"description":"BankTransfer date"},"account":{"name":"account","type":"int","optional":false,"description":"Bank account ID where BankTransfer was deposited"}}},"cc":{"name":"cc","type":"iCountCreditCardPayment","optional":true,"description":"Credit-Card payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Credit-Card transaction amount"},"date":{"name":"date","type":"date","optional":true,"description":"Transaction date"},"num_of_payments":{"name":"num_of_payments","type":"int","optional":false,"description":"Number of installments"},"first_payment":{"name":"first_payment","type":"float","optional":false,"description":"First payment amount; Applicable only for installments"},"token_id":{"name":"token_id","type":"int","optional":true,"description":"Credit-Card token ID. Requires cc_storage module"},"card_number":{"name":"card_number","type":"int","optional":false,"description":"Credit-Card number"},"card_type":{"name":"card_type","type":"string","optional":false,"description":"Credit-Card type"},"cvv":{"name":"cvv","type":"int","optional":false,"description":"Credit-Card CVV number"},"exp_year":{"name":"exp_year","type":"int","optional":false,"description":"Card Expiration year"},"exp_month":{"name":"exp_month","type":"int","optional":false,"description":"Card Expiration month"},"holder_id":{"name":"holder_id","type":"int","optional":false,"description":"Card Holder ID"},"holder_name":{"name":"holder_name","type":"string","optional":false,"description":"Card Holder name"},"confirmation_code":{"name":"confirmation_code","type":"string","optional":false,"description":"Credit-Card transaction confirmation number"}}},"paypal":{"name":"paypal","type":"iCountPayPalPayment","optional":true,"description":"Paypal payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"PayPal transaction amount"},"date":{"name":"date","type":"date","optional":false,"description":"PayPal transaction date"},"txn_id":{"name":"txn_id","type":"string","optional":false,"description":"PayPal transaction ID"},"payer_name":{"name":"payer_name","type":"string","optional":false,"description":"PayPal payer name"}}},"barter":{"name":"barter","type":"iCountBarterPayment","optional":true,"description":"Barter payment info","base_type":"object","properties":{"sum":{"name":"sum","type":"float","optional":false,"description":"Barter amount"}}},"based_on":{"name":"based_on","type":"array(iCountBaseDoc)","optional":true,"description":"Base documents list","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}},"based_on_this":{"name":"based_on_this","type":"array(iCountBaseDoc)","optional":true,"description":"List of documents based on this one","list_type":"array","key_type":"int","value_type":"iCountBaseDoc","value_base_type":"object","value_description":"Base document info","value_properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Base document type"},"docnum":{"name":"docnum","type":"int","optional":false,"description":"Base document number"},"doc_url":{"name":"doc_url","type":"string","optional":true,"description":"Base document URL"}}}}},"iCountDocTypeInfo":{"name":"iCountDocTypeInfo","type":"object","optional":false,"description":"Document type information","properties":{"doctype":{"name":"doctype","type":"string","optional":false,"description":"Document type"},"title":{"name":"title","type":"string","optional":false,"description":"Document type title"},"has_vat":{"name":"has_vat","type":"bool","optional":false,"description":"Is VAT applicable for this document type?"},"has_items":{"name":"has_items","type":"bool","optional":false,"description":"Document type has items?"},"has_lawyer_items":{"name":"has_lawyer_items","type":"bool","optional":false,"description":"Document type has lawyer items? (special layout)"},"has_payment":{"name":"has_payment","type":"bool","optional":false,"description":"Document type has payment information?"},"has_paydate":{"name":"has_paydate","type":"bool","optional":false,"description":"Document type has paydate?"},"has_duedate":{"name":"has_duedate","type":"bool","optional":false,"description":"Document type has duedate?"},"has_paynow":{"name":"has_paynow","type":"bool","optional":false,"description":"Document type supports PayNow?"},"has_discount":{"name":"has_discount","type":"bool","optional":false,"description":"Document type has discount?"},"has_roundup":{"name":"has_roundup","type":"bool","optional":false,"description":"Document type has roundup?"},"has_incometype":{"name":"has_incometype","type":"bool","optional":false,"description":"Document type has incometype?"},"has_self_function":{"name":"has_self_function","type":"bool","optional":false,"description":"Document type has self_function?"},"has_po_field":{"name":"has_po_field","type":"bool","optional":false,"description":"Document type has po (Purchase Order) field?"},"has_reason_field":{"name":"has_reason_field","type":"bool","optional":false,"description":"Document type has reason field?"}}},"iCountDocEmailStatus":{"name":"iCountDocEmailStatus","type":"object","optional":false,"description":"Document email sending status","properties":{"email":{"name":"email","type":"string","optional":false,"description":"Recipient email"},"name":{"name":"name","type":"string","optional":false,"description":"Recipient name"},"email_sent":{"name":"email_sent","type":"bool","optional":false,"description":"Email sent?"},"reason":{"name":"reason","type":"string","optional":true,"description":"Email sending error reason"}}},"autoinvoice::iCountAutoinvoiceInfo":{"name":"iCountAutoinvoiceInfo","type":"object","optional":false,"description":"Autoinvoice information","properties":{"autoinvoice_type":{"name":"autoinvoice_type","type":"string","optional":false,"description":"Autoinvoice type (ch for cheques \/ cc for credit-card)"},"autoinvoice_id":{"name":"autoinvoice_id","type":"int","optional":false,"description":"Autoinvoice ID"},"date2issue":{"name":"date2issue","type":"date","optional":false,"description":"Date to issue"},"receiptnumber":{"name":"receiptnumber","type":"int","optional":false,"description":"Receipt number"},"user_id":{"name":"user_id","type":"int","optional":false,"description":"Issuer user ID"},"income_type_id":{"name":"income_type_id","type":"int","optional":false,"description":"Income type ID"},"tax_exempt":{"name":"tax_exempt","type":"bool","optional":false,"description":"Tax exempt?"},"currency_id":{"name":"currency_id","type":"int","optional":false,"description":"Currency ID"},"sum":{"name":"sum","type":"float","optional":false,"description":"Autoinvoice sum"},"cheque_bank":{"name":"cheque_bank","type":"int","optional":true,"description":"Cheque bank ID","see":[{"module":"bank","method":"get_list"}]},"cheque_branch":{"name":"cheque_branch","type":"string","optional":true,"description":"Cheque branch"},"cheque_account":{"name":"cheque_account","type":"string","optional":true,"description":"Cheque account"},"cheque_number":{"name":"cheque_number","type":"string","optional":true,"description":"Cheque number"},"cc_type":{"name":"cc_type","type":"string","optional":true,"description":"Credit-card type"},"cc_last4":{"name":"cc_last4","type":"string","optional":true,"description":"Credit-card last 4 digits"},"connfirmation_code":{"name":"connfirmation_code","type":"string","optional":true,"description":"Credit-card transaction confirmation code"},"detail_line":{"name":"detail_line","type":"string","optional":false,"description":"Autoinvoice item description"},"is_issued":{"name":"is_issued","type":"bool","optional":false,"description":"Show issued autoinvoices?","default":"true"},"is_pending":{"name":"is_pending","type":"bool","optional":false,"description":"Show pending autoinvoices?","default":"true"},"is_cancelled":{"name":"is_cancelled","type":"bool","optional":false,"description":"Show cancelled autoinvoices?","default":"false"}},"scope":"autoinvoice"}},"description":"Document management","icon":"fa-file-invoice-dollar"}