{"swagger":"2.0","info":{"title":"\u0027API Fakturowanie\u0027","description":"\u0027Publiczne API do tworzenia oraz pobierania faktur\u0027","version":"1.0.0"},"paths":{"\/v2\/api\/public\/create-invoice":{"post":{"summary":"POST Create invoice","parameters":[{"name":"data","in":"body","schema":{"$ref":"#\/definitions\/DocumentDto"},"type":"json"},{"name":"ApiUserCompanyRoleKey","in":"header","required":true,"description":"Authorization","type":"string"}],"responses":{"200":{"description":"OK"}},"tags":["External API Invoice"]}},"\/v2\/api\/public\/download-invoice\/{document}\/pdf":{"get":{"summary":"GET Download invoice pdf","parameters":[{"name":"ApiUserCompanyRoleKey","in":"header","required":true,"description":"Authorization","type":"string"},{"name":"document","in":"path","required":true,"type":"string","pattern":"\\d{1,18}"}],"responses":{"200":{"description":"OK"}},"tags":["External API Invoice"]}}},"definitions":{"DocumentDto":{"required":["payment","buyer","positions"],"properties":{"issuedGross":{"type":"boolean"},"issuePlace":{"type":"string"},"issueDate":{"type":"string","format":"date"},"serviceDate":{"type":"string","format":"date"},"description":{"type":"string"},"signature":{"type":"string"},"currency":{"$ref":"#\/definitions\/CurrencyDto"},"payment":{"$ref":"#\/definitions\/PaymentDto"},"buyer":{"$ref":"#\/definitions\/BuyerDto"},"positions":{"items":{"$ref":"#\/definitions\/PositionDto"},"type":"array"}},"type":"object"},"CurrencyDto":{"properties":{"code":{"type":"string","enum":["PLN","EUR","USD","CHF","GBP","CZK","DKK","HRK","HUF","NOK","RUB","SEK","UAH","AUD","BGN","BRL","CAD","CLP","CNY","HKD","IDR","ILS","INR","ISK","JPY","KRW","MXN","MYR","NZD","PHP","RON","SGD","THB","TRY","XDR","ZAR"]},"rate":{"type":"number"}},"type":"object"},"PaymentDto":{"required":["method","deadlineDate","bankAccounts"],"properties":{"method":{"type":"string","enum":["transfer","cash","card","barter","compensation","other","mailing","subscription"]},"deadlineDate":{"type":"string","format":"date"},"paidAmount":{"type":"number"},"splitPayment":{"type":"boolean"},"bankAccounts":{"items":{"$ref":"#\/definitions\/BankAccountDto"},"type":"array","maxItems":"2"}},"type":"object"},"BuyerDto":{"required":["email","fullName","addressStreet","city","postCode","countryCode","taxNumber","taxCountryCode"],"properties":{"email":{"type":"string","format":"email"},"fullName":{"type":"string"},"acronym":{"description":"Acronym field for export files to Optima","type":"string","maxLength":255},"addressStreet":{"type":"string"},"city":{"type":"string"},"postCode":{"type":"string"},"countryCode":{"type":"string","enum":["AF","AX","AL","DZ","AD","AO","AI","AQ","AG","SA","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BE","BZ","BJ","BM","BT","BY","BO","BA","BW","BR","BN","IO","BG","BF","BI","CL","CN","HR","CY","TD","ME","DK","DM","DO","DJ","EG","EC","ER","EE","ET","FK","FJ","PH","FI","FR","TF","GA","GM","GH","GI","GR","GD","GL","GE","GU","GG","GY","GF","GP","GT","GN","GQ","GW","HT","ES","HN","HK","IN","ID","IQ","IR","IE","IS","IL","JM","JP","YE","JE","JO","KY","KH","CM","CA","QA","KZ","KE","KG","KI","CO","KM","CG","CD","KP","XK","CR","CU","KW","LA","LS","LB","LR","LY","LI","LT","LV","LU","MK","MG","YT","MO","MW","MV","MY","ML","MT","MP","MA","MQ","MR","MU","MX","FM","UM","MD","MC","MN","MS","MZ","MM","NA","NR","NP","NL","DE","NE","NG","NI","NU","NF","NO","NC","NZ","PS","OM","PK","PW","PA","PG","PY","PE","PN","PF","PL","GS","PT","PR","CF","CZ","KR","ZA","RE","RU","RO","RW","EH","BL","KN","LC","MF","VC","SV","WS","AS","SM","SN","RS","SC","SL","SG","SK","SI","SO","LK","PM","US","SZ","SD","SR","SJ","SH","SY","CH","SE","TJ","TH","TW","TZ","TG","TK","TO","TT","TN","TR","TM","TV","UG","UA","UY","UZ","VU","WF","VA","HU","VE","GB","VN","IT","TL","CI","BV","CX","IM","CK","VI","VG","HM","CC","MH","FO","SB","ST","TC","ZM","CV","ZW","AE","CW","EU"]},"taxNumber":{"description":"Optional if client type is individual","type":"string"},"pesel":{"type":"string"},"taxCountryCode":{"description":"Optional if client type is individual","type":"string","enum":["AF","AX","AL","DZ","AD","AO","AI","AQ","AG","SA","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BE","BZ","BJ","BM","BT","BY","BO","BA","BW","BR","BN","IO","BG","BF","BI","CL","CN","HR","CY","TD","ME","DK","DM","DO","DJ","EG","EC","ER","EE","ET","FK","FJ","PH","FI","FR","TF","GA","GM","GH","GI","EL","GD","GL","GE","GU","GG","GY","GF","GP","GT","GN","GQ","GW","HT","ES","HN","HK","IN","ID","IQ","IR","IE","IS","IL","JM","JP","YE","JE","JO","KY","KH","CM","CA","QA","KZ","KE","KG","KI","CO","KM","CG","CD","KP","XK","CR","CU","KW","LA","LS","LB","LR","LY","LI","LT","LV","LU","MK","MG","YT","MO","MW","MV","MY","ML","MT","MP","MA","MQ","MR","MU","MX","FM","UM","MD","MC","MN","MS","MZ","MM","NA","NR","NP","NL","DE","NE","NG","NI","NU","NF","NO","NC","NZ","PS","OM","PK","PW","PA","PG","PY","PE","PN","PF","PL","GS","PT","PR","CF","CZ","KR","ZA","RE","RU","RO","RW","EH","BL","KN","LC","MF","VC","SV","WS","AS","SM","SN","RS","SC","SL","SG","SK","SI","SO","LK","PM","US","SZ","SD","SR","SJ","SH","SY","CH","SE","TJ","TH","TW","TZ","TG","TK","TO","TT","TN","TR","TM","TV","UG","UA","UY","UZ","VU","WF","VA","HU","VE","GB","VN","IT","TL","CI","BV","CX","IM","CK","VI","VG","HM","CC","MH","FO","SB","ST","TC","ZM","CV","ZW","AE","CW","EU"]},"type":{"description":"0 - Individual, 1 - Company","type":"integer","maximum":1,"minimum":0,"enum":[0,1]},"incidental":{"description":"true - incidental contractor, false - Add contractor to company contractors database","type":"boolean"}},"type":"object"},"PositionDto":{"required":["name","code","quantity","unit","net","tax","gross","taxStake"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"net":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"taxStake":{"type":"string","enum":["TAX_23","TAX_22","TAX_8","TAX_7","TAX_5","TAX_3","TAX_0","TAX_EXEMPT","TAX_NOT_LIABLE","TAX_REVERSE_CHARGE","TAX_EXCLUDING"]},"discount":{"title":"w procentach *","type":"number"},"discountAmount":{"type":"number"},"netAfterDiscount":{"type":"number"},"grossAfterDiscount":{"type":"number"},"purchasePrice":{"type":"number"}},"type":"object"},"BankAccountDto":{"required":["accountNumber"],"properties":{"accountNumber":{"type":"string"},"name":{"type":"string"},"swift":{"type":"string"},"countryCode":{"type":"string","enum":["AF","AX","AL","DZ","AD","AO","AI","AQ","AG","SA","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BE","BZ","BJ","BM","BT","BY","BO","BA","BW","BR","BN","IO","BG","BF","BI","CL","CN","HR","CY","TD","ME","DK","DM","DO","DJ","EG","EC","ER","EE","ET","FK","FJ","PH","FI","FR","TF","GA","GM","GH","GI","GR","GD","GL","GE","GU","GG","GY","GF","GP","GT","GN","GQ","GW","HT","ES","HN","HK","IN","ID","IQ","IR","IE","IS","IL","JM","JP","YE","JE","JO","KY","KH","CM","CA","QA","KZ","KE","KG","KI","CO","KM","CG","CD","KP","XK","CR","CU","KW","LA","LS","LB","LR","LY","LI","LT","LV","LU","MK","MG","YT","MO","MW","MV","MY","ML","MT","MP","MA","MQ","MR","MU","MX","FM","UM","MD","MC","MN","MS","MZ","MM","NA","NR","NP","NL","DE","NE","NG","NI","NU","NF","NO","NC","NZ","PS","OM","PK","PW","PA","PG","PY","PE","PN","PF","PL","GS","PT","PR","CF","CZ","KR","ZA","RE","RU","RO","RW","EH","BL","KN","LC","MF","VC","SV","WS","AS","SM","SN","RS","SC","SL","SG","SK","SI","SO","LK","PM","US","SZ","SD","SR","SJ","SH","SY","CH","SE","TJ","TH","TW","TZ","TG","TK","TO","TT","TN","TR","TM","TV","UG","UA","UY","UZ","VU","WF","VA","HU","VE","GB","VN","IT","TL","CI","BV","CX","IM","CK","VI","VG","HM","CC","MH","FO","SB","ST","TC","ZM","CV","ZW","AE","CW","EU"]}},"type":"object"}}}