Zak API to read invoices
Get invoices by number
Url: https://kapi.wubook.net/kapi/invoices/get_by_numbers
Field name  | 
Description  | 
|---|---|
doc_type  | 
fiscal document type code. (‘INV’, ‘REC’, ‘CRN’, …)  | 
num  | 
document number  | 
prefix  | 
document number prefix (generally it is null)  | 
date  | 
date of document  | 
name  | 
customer name  | 
address  | 
customer address  | 
zipcode  | 
customer zipcode  | 
city  | 
customer city  | 
country  | 
customer country ISO code  | 
nationalid  | 
customer fiscal code  | 
vatnumber  | 
customer vat number  | 
customer email address  | 
|
phone  | 
customer phone number  | 
currency  | 
amount currency  | 
amount  | 
amount  | 
tax_amount  | 
amount of taxes  | 
tax_rate  | 
list of percentage rate of tax  | 
total  | 
total (amount + taxes)  | 
biller  | 
biller data  | 
notes  | 
notes  | 
services  | 
List of services sold (detail of invoice)  | 
xml  | 
electronic invoice  | 
off  | 
cancellation date (if any)  | 
rcode  | 
reservation code  | 
Field name  | 
Description  | 
|---|---|
quantity  | 
how many units  | 
description  | 
service description  | 
unitprice  | 
price of one unit  | 
amount  | 
amount of service  | 
currency  | 
amount currency  | 
tax_amount  | 
amount of taxes  | 
tax_rate  | 
percentage rate of tax  | 
total  | 
total (amount + taxes)  | 
Examples
curl:
$ curl https://kapi.wubook.net/kapi/invoices/get_by_numbers -u 123456: -X POST \
  -d nfrom=1 -d nto=20 -d dtype=INV
{"data": [{
  "doc_type": "INV",
  "num": 1,
  "date": "06/11/2018",
  "name": "Georg Hegel",
  "address": "Weg der Aufhebung",
  "zipcode": null,
  "city": "Berlin",
  "country": "DE",
  "currency": "EUR",
  "nationalid": "GE3304HH22KK",
  "vatnumber": "054321-1234",
  "email": "foo@bar.com",
  "phone": "72768218",
  "amount": 200.0,
  "tax_amount": 44.0,
  "tax_rate": [22.0],
  "total": 244.0,
  "biller": "Schoenhouse Apartments",
  "notes": "Phanomenologie des Geistes",
  "off": "16/11/2018",
  "rcode": "AA-0001",
  "services": [{
     "quantity": 5,
     "description": "Ungluck und Schmerz",
     "unitprice": 40.0,
     "amount": 200.0,
     "tax_amount": 44.0,
     "tax_rate": 22.0,
     "total": 244.0,
     "currency": "EUR"}]
  }]
}
python code:
import requests
data= {'nfrom': 10, 'nto': 20, 'dtype': 'CRN'}
uspw= (123456, None)
response= requests.post('https://kapi.wubook.net/kapi/invoices/get_by_numbers', data, auth= uspw)
print(response.text)
Get invoices by dates
Url: https://kapi.wubook.net/kapi/invoices/get_by_dates
Examples
curl:
$ curl https://kapi.wubook.net/kapi/invoices/get_by_dates -u 123456: -X POST \
  -d dfrom=01/06/2018 -d dto=30/06/2018 -d dtype=REC
python code:
import requests
data= {'dfrom': '01/01/2018', 'dto': '31/03/2018'}
uspw= (123456, None)
response= requests.post('https://kapi.wubook.net/kapi/invoices/get_by_dates', data, auth= uspw)
print(response.text)
Get invoices by reservation
Url: https://kapi.wubook.net/kapi/invoices/get_by_reservation
Examples
curl:
$ curl https://kapi.wubook.net/kapi/invoices/get_by_reservation -u 123456: -X POST \
  -d rcode=AA-0001 -d dtype=REC
python code:
import requests
data= {'rcode': 'AA-0001', 'dtype': 'REC'}
uspw= (123456, None)
response= requests.post('https://kapi.wubook.net/kapi/invoices/get_by_reservation', data, auth= uspw)
print(response.text)