Proof
Pola
Nazwa
czy jest obowiązkowy
typ
klucz obcy
min. wartość/długość
max. wartość/długość
opis
id
NO
Int
NO
1
2147483647
ID
dateCreate
YES
Date
NO
-
-
Data utworzenia
number
YES
String
NO
0
63
Numer dokumentu
place
NO
String
NO
0
31
Miejsce wystawienia
annotation
NO
String
NO
0
65535
Adnotacja
info
NO
String
NO
0
65535
Informacje dodatowe
footer
NO
String
NO
0
65535
Stopka
footerIconPath1
NO
String
NO
0
63
Ścieżka do pierwszej grafiki stopki
footerIconPath2
NO
String
NO
0
63
Ścieżka do drugiej grafiki stopki
footerIconPath3
NO
String
NO
0
63
Ścieżka do trzeciej grafiki stopki
documentHeader
NO
String
NO
0
65535
Nagłowek dokumentu
documentFooter
NO
String
NO
0
65535
Stopka dokumentu
documentInfo
NO
String
NO
0
65535
Infomracje dokdatkowe dokumentu
logoPath
NO
String
NO
0
255
Ścieżka do logo
signPath
NO
String
NO
0
255
Ścieżka do podpisu
personPut
NO
String
NO
0
63
Osoba upoważniona do wystawienia
personGet
NO
String
NO
0
63
Osoba upoważniona do odbioru
language
YES
String
NO
0
7
Język
typeJPK
NO
String
NO
0
7
client
NO
client
YES
-
-
Klient
data
YES
data
YES
-
-
Zestaw danych
postscript
NO
postscript
YES
-
-
Dopisek
status
NO
status
YES
-
-
Status
personBuy
YES
Object (InvoiceData)
NO
-
-
Sprzedawca
personSell
YES
Object (InvoiceData)
NO
-
-
Nabywca
sendMailDates
NO
Array (InvoiceSendDate)
NO
-
-
Daty wysłania wiadomości e-mail
sendSMSDates
NO
Array (InvoiceSendSMSDate)
NO
-
-
Daty wysłania wiadomości SMS
editDates
NO
Array (InvoiceEdit)
NO
-
-
Daty edycji dokumentu
hash
NO
String
NO
0
10
HASH
dateSell
NO
Date
NO
-
-
Data sprzedaży
dateEnd
NO
Date
NO
-
-
Data zakończenia
noOrder
NO
String
NO
0
63
Numer zamówienia
brutto
NO
Float
NO
-2147483647
2147483647
Suma Brutto
currency
YES
currency
YES
-
-
Waluta
products
YES
Array (InvoiceProduct)
NO
-
-
Pozycje
Nagłówki
afakturyToken=1234567890123456789012345678901234567890
afakturyId=12345678901;afakturyKey=12346567890abcdef
Akcje
Pobranie obiektu
Metoda:
GET
URL:
https://faktura/api/invoice
Przykładowe dane:
{
"hash": "12345678ab"
}
Dodanie obiektu
Metoda:
POST
URL:
https://faktura/api/invoice
Przykładowe dane:
{
"dateCreate": "2018-01-01",
"dateSell": "2018-01-01",
"dateEnd": "2018-01-01",
"number": "1\/01\/2018",
"place": "Warsaw",
"noOrder": "1\/01\/2018",
"language": "pl",
"currency": 1,
"personBuy": {
"name": "Buyer",
"address": "Address",
"nipKind": 0,
"nip": "1234567890",
"alternativeHeader": 0,
"isVATPayer": 1,
"phone": "012-1234567",
"fax": "012-1234567",
"mail": "address@mail.com",
"www": "http:\/\/address.com",
"krs": "1234567890",
"regon": "1234567890",
"bankAccountFirstNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountFirstName": "National Bank",
"bankAccountFirstBic": "BIC",
"bankAccountFirstDescription": "Main account",
"bankAccountSecondNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountSecondName": "National Bank",
"bankAccountSecondBic": "BIC",
"bankAccountSecondDescription": "Second account",
"bankAccountThirdNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountThirdName": "National Bank",
"bankAccountThirdBic": "BIC",
"bankAccountThirdDescription": "Third account",
"idcardNo": "AAA123456",
"idcardDate": "2018-01-01",
"idcardAuth": "Goverment",
"pesel": "12345678901"
},
"personSell": {
"name": "Seller",
"address": "Address",
"nipKind": 0,
"nip": "1234567890",
"alternativeHeader": 0,
"isVATPayer": 1,
"phone": "012-1234567",
"fax": "012-1234567",
"mail": "address@mail.com",
"www": "http:\/\/address.com",
"krs": "1234567890",
"regon": "1234567890",
"bankAccountFirstNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountFirstName": "National Bank",
"bankAccountFirstBic": "BIC",
"bankAccountFirstDescription": "Main account",
"bankAccountSecondNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountSecondName": "National Bank",
"bankAccountSecondBic": "BIC",
"bankAccountSecondDescription": "Second account",
"bankAccountThirdNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountThirdName": "National Bank",
"bankAccountThirdBic": "BIC",
"bankAccountThirdDescription": "Third account",
"idcardNo": "AAA123456",
"idcardDate": "2018-01-01",
"idcardAuth": "Goverment",
"pesel": "12345678901"
},
"products": [
{
"name": "Product 1",
"brutto": 123,
"product": 1
},
{
"name": "Product 2",
"brutto": 100,
"product": 2
}
],
"personPut": "Issuing",
"personGet": "Receiving",
"annotation": "annotation",
"info": "info",
"footer": "footer",
"footerIconPath1": "file\/footer\/icon1.jpg",
"footerIconPath2": "file\/footer\/icon1.jpg",
"footerIconPath3": "file\/footer\/icon1.jpg",
"documentHeader": "document header",
"documentFooter": "document footer",
"documentInfo": "document info",
"logoPath": "file\/account\/logo.jpg",
"signPath": "file\/account\/sign.jpg",
"client": 1,
"data": 1,
"postscript": 1,
"status": 1
}
Aktualizacja obiektu
Metoda:
PUT
URL:
https://faktura/api/invoice
Przykładowe dane:
{
"hash": "abcdefghij",
"dateCreate": "2018-01-01",
"dateSell": "2018-01-01",
"dateEnd": "2018-01-01",
"number": "1\/01\/2018",
"place": "Warsaw",
"noOrder": "1\/01\/2018",
"language": "pl",
"currency": 1,
"personBuy": {
"name": "Buyer",
"address": "Address",
"nipKind": 0,
"nip": "1234567890",
"alternativeHeader": 0,
"isVATPayer": 1,
"phone": "012-1234567",
"fax": "012-1234567",
"mail": "address@mail.com",
"www": "http:\/\/address.com",
"krs": "1234567890",
"regon": "1234567890",
"bankAccountFirstNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountFirstName": "National Bank",
"bankAccountFirstBic": "BIC",
"bankAccountFirstDescription": "Main account",
"bankAccountSecondNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountSecondName": "National Bank",
"bankAccountSecondBic": "BIC",
"bankAccountSecondDescription": "Second account",
"bankAccountThirdNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountThirdName": "National Bank",
"bankAccountThirdBic": "BIC",
"bankAccountThirdDescription": "Third account",
"idcardNo": "AAA123456",
"idcardDate": "2018-01-01",
"idcardAuth": "Goverment",
"pesel": "12345678901"
},
"personSell": {
"name": "Seller",
"address": "Address",
"nipKind": 0,
"nip": "1234567890",
"alternativeHeader": 0,
"isVATPayer": 1,
"phone": "012-1234567",
"fax": "012-1234567",
"mail": "address@mail.com",
"www": "http:\/\/address.com",
"krs": "1234567890",
"regon": "1234567890",
"bankAccountFirstNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountFirstName": "National Bank",
"bankAccountFirstBic": "BIC",
"bankAccountFirstDescription": "Main account",
"bankAccountSecondNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountSecondName": "National Bank",
"bankAccountSecondBic": "BIC",
"bankAccountSecondDescription": "Second account",
"bankAccountThirdNumber": "01 2345 6789 0123 4567 8901 2345",
"bankAccountThirdName": "National Bank",
"bankAccountThirdBic": "BIC",
"bankAccountThirdDescription": "Third account",
"idcardNo": "AAA123456",
"idcardDate": "2018-01-01",
"idcardAuth": "Goverment",
"pesel": "12345678901"
},
"products": [
{
"name": "Product 1",
"brutto": 123,
"product": 1
},
{
"name": "Product 2",
"brutto": 100,
"product": 2
}
],
"personPut": "Issuing",
"personGet": "Receiving",
"annotation": "annotation",
"info": "info",
"footer": "footer",
"footerIconPath1": "file\/footer\/icon1.jpg",
"footerIconPath2": "file\/footer\/icon1.jpg",
"footerIconPath3": "file\/footer\/icon1.jpg",
"documentHeader": "document header",
"documentFooter": "document footer",
"documentInfo": "document info",
"logoPath": "file\/account\/logo.jpg",
"signPath": "file\/account\/sign.jpg",
"client": 1,
"data": 1,
"postscript": 1,
"status": 1
}
Usunięcie obiektu
Metoda:
DELETE
URL:
https://faktura/api/invoice
Przykładowe dane:
{
"hash": "abcdefghij",
}
Pobranie listy obiektów
Metoda:
GET
URL:
https://faktura/api/invoice/list
Przykładowe dane:
{
"page": 1,
"count": 25,
"sortItem": 0,
"sortDir": "a",
"letter": "a",
"phrase": "phrase",
"dateBegin": "2018-01-01",
"dateEnd": "2018-12-30",
"year": 2018,
"month": 5,
"product": "product",
"payedKind": 0,
"client": 1,
"payKind": 1,
"currency": 1,
"data": 1,
"user": 1
}
page:
page number
count:
records per page
sortItem:
sort by item
sortDir:
sort order, possible values: a - order ascending, d - order descending
letter:
first letter
phrase:
searching phrase
dateBegin:
begin date of period
dateEnd:
end date of period
year:
year of period (not use with dateBegin and dateEnd)
month:
month of period (use with year)
product:
product searching phrase
payedKind:
payed status, posible: 0 - all, 1 - paid, 2 - not paid, 3 - outdate
client:
client ID
payKind:
pay kind ID
currency:
currency ID
data:
account data ID
user:
user ID
Pobranie pliku PDF
Metoda:
GET
URL:
https://faktura/api/invoice/pdf
Przykładowe dane:
{
"hash": "abcdefghij",
"kind": 1,
"tpl": "std",
"lang": "pl",
"configPrint": {
"showPrice": 1,
"visibleSign": 1,
"visibleQrcode": 1,
"visiblePayTime": 1,
"visiblePkwiu": 1,
"visibleCashWord": 1,
"visibleDoubleCash": 1,
"visibleDelivery": 1,
"visiblePreventiveSeal": 1,
"visibleCurrency": 1,
"visibleConversion": 1,
"visibleBankAccount": 1,
"visibleVATPayer": 1,
"visiblePaydate": 1,
"visiblePayment": 1
}
}
kind:
print kind: 1 - one copy, 2 - two copies, 3 - duplicate
tpl:
template name, avaliable: std, pro
lang:
language code (ISO639-1)
configPrint:
print configuration
Wysłanie wiadomości do dokumentu
Metoda:
PUT
URL:
https://faktura/api/invoice/sendmail
Przykładowe dane:
{
"hash": "abcdefghij",
"title": "E-mail subject",
"body": "E-mail body",
"mail": "adres@mail.pl",
"kind": 1,
"lang": "pl",
"sendToMe": 1,
"configPrint": {
"showPrice": 1,
"visibleSign": 1,
"visibleQrcode": 1,
"visiblePayTime": 1,
"visiblePkwiu": 1,
"visibleCashWord": 1,
"visibleDoubleCash": 1,
"visibleDelivery": 1,
"visiblePreventiveSeal": 1,
"visibleCurrency": 1,
"visibleConversion": 1,
"visibleBankAccount": 1,
"visibleVATPayer": 1,
"visiblePaydate": 1,
"visiblePayment": 1
}
}
kind:
print kind: 1 - one copy, 2 - two copies, 3 - duplicate
lang:
language code (ISO639-1)
sendToMe:
send message copy to me
configPrint:
print configuration
Wysłanie dokumentów do księgowej
Metoda:
PUT
URL:
https://faktura/api/invoice/sendtoaccountant
Przykładowe dane:
{
"ids": [
"abcdefghij",
"9876543210"
],
"title": "E-mail subject",
"body": "E-mail body",
"mail": "adres@mail.pl",
"kind": 1,
"lang": "pl"
}
kind:
message kind: 1 - reminder, 2 - last reminder, 3 - thanks
lang:
language code (ISO639-1)