Domů 
Předchozí stránka 
Následující stránka 
Historie změn 
 Kopírovat URL stránky 
 
Vytisknout tuto stránkuVytisknout tuto stránku  
Web services - API  >  API Reference  >  Credit Note API

CreditNote API

CreditNoteGetGet credit note by document number, or by combination of document number and date.
CreditNoteGetPDFGet PDF file for credit note by document number, or by combination of document number and date.
CreditNoteCreateCreate new credit note.
CreditNoteImportImport credit note issued in other IS.
CreditNoteUpdateUpdate existing credit note.
CreditNoteDeleteDelete credit note.
CreditNoteCancelCancel credit note.
CreditNoteListGet list of credit notes for specified criteria
CreditNoteSendByEmailSends document by email to the recipient(s).
CreditNoteAttachmentAddAdd attachment to credit note.
CreditNoteAttachmentSetDefaultAdd attachment to credit note and set is as default.
CreditNoteAttachmentGetGet default attachment of credit note.
CreditNoteAttachmentListGet all attachments of credit note.

CreditNoteGet

Get credit note by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

(For internal "XML" format)

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteGet">
       <parameter name="number" value="1/2013" />
       <parameter name="date" type="Date" value="2013-02-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: eurofaktura.cz web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <CreditNote>
               <businessYear>2010</businessYear>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCity>Olomouc</buyerCity>
               <buyerCountry>CZ</buyerCountry>
               <buyerName>5 FIVER s.r.o.</buyerName>
               <buyerPostalCode>77900</buyerPostalCode>
               <buyerStreet>Celní 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Olomouc</city>
               <costPosition>1</costPosition>
               <cashRegisterCode>0001</cashRegisterCode>  <!-- This property must be set for fiscalization
               <businessUnit>0001</businessUnit>          <!-- This property must be set for fiscalization
               <methodOfPayment>bankTransfer</methodOfPayment>  <!-- This property must be set for fiscalization
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <number>2010-00002</number>             <!-- document number optional AUTO numbering
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>CZK</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                          <!-- generated unique payment identifier - VS(variabilni symbol)
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <eor>34facd65-622b-745d-a541-30ab1f9d3ac1</eor>  <!-- generated by FURS
               <zoi>a7e5f55e1dbb48b799268e1a6d8618a3</zoi>      <!-- generated when issuing document if it is for fiscalization    
               <fiscalNumber>1</fiscalNumber>                   <!-- fiscal sequential number for fiscal numbering of document
               <introductionText>introduction text</introductionText>  
               <vatCountryIsoCode>CZ</vatCountryIsoCode>
               <Address>                                    
                       <city>Brno</city>
                       <country>CZ</country>
                       <postalCode>60200</postalCode>
                       <street>Polní 10</street>
                       <type>Delivery</type>
               </Address>
               <Items>
                       <Item>
                               <position>1</position>
                               <amount>75.00</amount>
                               <amountWithoutDiscount>83.33</amountWithoutDiscount>
                               <currency>CZK</currency>
                               <description>Test položka</description>
                               <discountAmount>8.33</discountAmount>
                               <discountPercentage>10.0000</discountPercentage>
                               <netPrice>83.33333</netPrice>
                               <netPriceInDocumentCurrency>83.33333</netPriceInDocumentCurrency>
                               <quantity>1.000</quantity>
                               <price>100.00000</price>
                               <priceInDocumentCurrency>100.00000</priceInDocumentCurrency>
                               <vatAmount>15.00</vatAmount>
                               <vatPercentage>20.0</vatPercentage>
                               <vatTransactionType>0</vatTransactionType>
                               <costPosition>1</costPosition>
                       </Item>
               </Items>
       </CreditNote>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>

CreditNoteGetPDF

Get PDF for credit note by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
markDocumentAsSentMarks document as sent.

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
          <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find credit note for number: 2 and date: 2010-02-22">
       </error>
</response>

CreditNoteCreate

Create new credit note.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is gross.Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType, transNoCoefCalcSN, kontrolHlasSectionType and kontrolHlasTransCode.

Supported values for vatTransactionType are:
0 - Taxable transactions of goods and services in Czechia,
1 - Zero-rated transaction - supply of goods within the EU,
2 - Zero-rated transaction - supply of goods within the EU(fixed assets),
3 - Zero-rated transaction - supply of service in the EU,
4 - Zero-rated transaction - exports of goods outside the EU,
5 - Zero-rated transaction - new vehicle delivery to person not registred for VAT within the EU,
20 - Zero-rated transaction - goods delivery within EU (over limit) - foreign VAT calculated,
7 - Zero-rated transaction - reverse charge (goods supply/assembly the service),
8 - Zero-rated transaction - other taxable transaction with claim of VAT deduction,
10 - Zero-rated transaction - tripartite supplies of goods within the EU,
11 - Tax amount correction in insolvency proceedings (creditor),
12 - VAT exempt transactions without the right of input VAT deduction,
15 - Transactions exempt from VAT - not for VAT records,
21 - Zero-rated transaction - assembly in the EU (foreign VAT calculated),
100 - Sales of electronic services in other EU member countries (foreign VAT calculated),


Status of credit note which is created from this web service is automatically set to "issuedInvoice" if parameter number is specified in parameter list, or if it's status is explicitelly set to issuedInvoice. For such cases (if invoice is created as issued), service will automatically generate delivery note for contained products to reduce their quantity on stock.

Supported values for transNoCoefCalcSN are "1 or 0" and stated if transaction is not included to the coefficient calculation.

Supported values for kontrolHlasSectionType are:
1 - Transaction has no impact on control report sections,
2 - Section A1,
3 - Section A3,
4 - Section A4 (regular),
5 - Section A4 (travel services),
6 - Section A4 (used goods),
7 - Section A4/A5 automatic choose (based on amount and EuVAT ID on document),
8 - Section A5

Supported values for kontrolHlasTransCode are:
2 - 1
3 - 1a
4 - 3
5 - 3a
6 - 4
7 - 4a
8 - 5
9 - 6
10 - 7
11 - 11
12 - 12
13 - 13
14 - 14
15 - 15
16 - 16
17 - 17
18 - 18
19 - 19
20 - 20
21 - 21


Parameters

CreditNoteComplex parameter with data tags

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteCreate">
<parameter name="CreditNote">           
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>             
               <city>Brno</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>retail</type>                                     <!-- (Optional) Type of pricing - default is "gross"
                <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
                <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <costPosition>120</costPosition>                        <!-- (Optional)
                <cashRegisterCode>0001</cashRegisterCode>                <!-- Mandatory for fiscalization
                <businessUnit>0001</businessUnit>                        <!-- Mandatory for fiscalization
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <remarks>Remark on Sales invoice</remarks>              <!-- (Optional)
                <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
                <buyerName>Petr Novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>petr@novak.cz</buyerEMail>          <!-- (Optional)
               <buyerStreet>Celní 22</buyerStreet>                    <!-- (Optional)
               <buyerPostalCode>60200</buyerPostalCode>                <!-- (Optional)
               <buyerCity>Brno</buyerCity>                     <!-- (Optional)
               <buyerCountry>CZ</buyerCountry>                         <!-- (Optional) ISO-2 country code
                <documentLanguage>Czech</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Italian and Croatian
                <printingTemplate>Předloha2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
                <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
                <advanceInvoiceRef>2014-00001</advanceInvoiceRef> <!-- (Optional) Setting reference to advance invoice
                <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: unknown, bankTransfer, cash, cheques, eurocardMastercard, visa, karanta, amex, diners, activa, ba, cashOnDelivery, moneta, directDebit, PayPal
                <vatCountryIsoCode>CZ</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
                <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Praha</city>
                       <country>CZ</country>
                       <postalCode>10000</postalCode>
                       <street>Ulice 10</street>
                       <type>Delivery</type>
               </Address>
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>          <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>CZK</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: eurofaktura.cz web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- created document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges, …
</response>

CreditNoteImport

Import Credit note issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating Credit notes with this api call, Credit notes's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing documents
  • createOnly Skip import for existing documents
  • updateOnly  Skip import of new documents
CreditNoteCredit note data in xml substructure.
dataFormatIn case some other data format is used for import, this parameter should be used. If this parameter is not included in XML, import from default data format is used.
  • eurofakturaXML  - internal format (default data format)
  • POHODA  - format from economical SW POHODA
base64dataThis parameter is mandatory in case using dataFormat "POHODA". Content of this parameter should be Pohoda XML encoded into base64 string.

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="CreditNote">
                    <!-- structure of elements is the same as in CreditNoteCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number …
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Credit note for number: 0001-1206-2013 already exists!"></error>  <!-- Credit note for number already exists …
</response>

(Using POHODA data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="POHODA" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- Pohoda XML encoded into base64 string
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2021-06-12</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Parameter <base64data>: cannot parse contents"></error>  <!-- Error when decoding XML from base64 string  
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Error parsing XML file due to invalid syntax"></error>  <!-- Error when parsing XML
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Document can not be overwritten because it is already posted."></error>  <!-- There are several different error messages possible.
</response>

CreditNoteUpdate

Update existing credit note.Data must contain credit note number to be able to identify document which is to be updated.

Parameters

CreditNoteComplex parameter with data tags

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteUpdate">
<parameter name="CreditNote">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: eurofaktura.cz web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- updated document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges, …
</response>

CreditNoteDelete

Delete credit note. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last credit note.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: eurofaktura.cz web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, …
</response>

CreditNoteCancel

Cancel credit note. Must specify parameter/s (number, number+date) to identify document for cancelling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: eurofaktura.cz web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges, …
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel credit note for arguments number: 2013-00014 date: 2013-03-26"><error/>      <!-- document could not be canceled, …
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find credit note for number
Can not cancel. Found X credit notes
Found X credit notes X. You can only cancel one credit note at a time
Can not cancel credit note X

CreditNoteList

Get list of credit notes for criteria which is specified by API parameters. Mixing different types of dates in search criteria is not supported - date parameters can be combined only as follows: dateFrom/dateTo, paymentDueDateFrom/paymentDueDateTo or dateOfSupplyFrom/dateOfSupplyUntil.

Parameters

numberDocument number
dateFromThe date which is used to select credit notes whose date is following it
dateToThe date which is used to select credit notes whose date is preceding it
paymentDueDateFromThe date which is used to select credit notes whose payment due date is following it
paymentDueDateToThe date which is used to select credit notes whose payment due date is preceding it
dateOfSupplyFromThe date which is used to select credit notes whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select credit notes whose date of supply/performance is preceding it
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the credit notes
totalCurrencyCurrency used in credit note
articleProduct code, or product name
statusPossible values: Draft, IssuedInvoice, NotBooked, Booked, CanceledCreditInvoice, OpenedClaim, ClosedClaim, OpenedDueClaim, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, WithInvoiceReference, WithoutInvoiceReference, CancellationDocument, CancelledDocument, AccountingEntryOrImportedInvoice, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument, VatReportDone, VatReportOpen
issuerIssuer of document, search is done by username

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2010-02-19" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<CreditNotes>                   
       <CreditNote>
                <!-- structure of elements is the same as in CreditNoteGet
       </CreditNote>
       ...
</CreditNotes>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges, …
</response>

CreditNoteSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="petr@novak.cz"/>
       <parameter name="recipient" value="pavel@novak.cz,ondrej@novak.cz"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST s.r.o.: Sales invoice nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed…
</response>

CreditNoteAttachmentAdd

Add image/attachment to credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>

CreditNoteAttachmentSetDefault

Add attachment to credit note and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>

CreditNoteAttachmentGet

Get default attachment of credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <CreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </CreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001 Credit note does not have attachemnts.
</response>

CreditNoteAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

POST /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <CreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </CreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001 Credit note does not have attachemnts.
</response>

Odkazy na tuto stránku

---
Datum a čas poslední úpravy 19.11.2021 9:52:20
© Eurofaktura s.r.o. 2003-2024