Read sales invoice documents

You use this method to read one or more sales invoice documents.

Request method

GET

Request url

https://venice.unit4.com/webconnect/api/{DossierId}/{FinancialYear}/SalesInvoice?{Key}={KeyValues}[&fields={FieldList}][&detailFields={FieldList}][&distributionFields={FieldList}][&intrastatDetailFields={FieldList}][&pdfFields={True or False}]

Context identification

Identification Description
DossierId The unique identifier of the dossier.
FinancialYear The financial year.

Parameters

Parameter Description
{Key} The available keys to seek one or more sales invoices:
  • SystemNumber={SystemNumber}: Seek sales invoice documents by system number.
  • Document={Book}<tab>{Number}: Seek sales invoice documents by document number.
  • SyncReference={SyncReference}: Seek sales invoice documents by synchronization reference.
Fields List of fields, containing property names of the sales invoice document, of which the value has to be returned in the response body. (optional)
DetailFields List of detail fields, containing property names of the sales invoice detail, of which the value has to be returned in the response body. (optional)
DistributionFields List of distribution fields, containing property names of the distribution detail, of which the value has to be returned in the response body. (optional)
IntrastatDetailFields List of Intrastat detail fields, containing property names of the Intrastat detail, of which the value has to be returned in the response body. (optional)
PdfFields True if the response should contain information on the pdf representation of the invoice. (optional)
Example: Get from dossier 'Demo', financial year '2016' a sales invoice documents with system number '1' and limit the data to the 'CstNum' and 'CstSubNum' fields, limit the entry fields to 'Account', 'PriceDocC' and 'Quantity' and request the pdf representation of the sales invoice. All other fields are not requested.
https://venice.unit4.com/WebConnect/api/Demo/2016/SalesInvoice?SystemNumber=1&fields=CstNum,CstSubNum&detailFields=Account,PriceDocC,Quantity&distributionFields=-&intrastatDetailFields=-&pdfFields=True

Request header

See request header.

Request body

-

Http status

See http status.

Response body

You can receive the response in json or xml.

Structure

Response (object)

Examples

{
  "Response": {
    "SalesInvoices": {
      "SalesInvoice": [
        {
          "Fields": {
            "CstNum": "1",
            "CstSubNum": "0",
          },
          "Details": {
            "Detail": [
              {
                "Fields": {
                  "ArtNum": "MyArticle",
                  "PriceDocC": "300.00",
                  "Quantity": "6.00"
                }
              },
              ...
            ]
          },
          "Pdf": {
            "FileName": "FAC_2016_000001.pdf",
            "MimeCode": "application/pdf",
            "Data": "..."
          }
        }
      ]
    }
  }
}
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <SalesInvoices>
    <SalesInvoice>
      <Fields>
        <CstNum>1</CstNum>
        <CstSubNum>0</CstSubNum>
      </Fields>
      <Details>
        <Detail>
          <Fields>
            <ArtNum>MyArticle</ArtNum>
            <PriceDocC>300.00</PriceDocC>
            <Quantity>6.00</Quantity>
          </Fields>
          ...
        </Detail>
      </Details>
      <Pdf>
        <FileName>FAC_2016_000001.pdf</FileName>
        <MimeCode>application/pdf</MimeCode>
        <Data>...</Data>
      </Pdf>
    </SalesInvoice>
  </SalesInvoices>
</Response>