Read purchase documents

You use this method to read one or more purchase documents.

Request method

GET

Request url

https://venice.unit4.com/webconnect/api/{DossierId}/{FinancialYear}/Purchase?{Key}={KeyValues}[&fields={FieldList}][&entryFields={FieldList}][&analyticalCentreFields={FieldList}][&analyticalUnitFields={FieldList}][&intrastatDetailFields={FieldList}][&paymentInfoFields={FieldList}]

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 purchases:
  • SystemNumber={SystemNumber}: Seek purchase documents by system number.
  • Document={Year}<tab>{Book}<tab>{Number}: Seek purchase documents by document number.
  • SyncReference={SyncReference}: Seek purchase documents by synchronization reference.
Fields List of fields, containing property names of the purchase document, of which the value has to be returned in the response body. (optional)
EntryFields List of entry fields, containing property names of the accounting detail, of which the value has to be returned in the response body. (optional)
AnalyticalCentreFields List of analytical centre fields, containing property names of the analytical detail, of which the value has to be returned in the response body. (optional)
AnalyticalUnitFields List of analytical unit fields, containing property names of the analytical 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)
PaymentInfoFields List of payment info fields, containing property names of the payment information, of which the value has to be returned in the response body. (optional)
Example: Get from dossier 'Demo', financial year '2016' a purchase documents with system number '1' and limit the data to the 'TotalDocC' field and limit the entry fields to 'Account' and 'AmountDocC'. All other fields are not requested.
https://venice.unit4.com/WebConnect/api/Demo/2016/Purchase?SystemNumber=1&fields=TotalDocC&entryFields=Account,AmountDocC&analyticalCentreFields=-&analyticalUnitFields=-&intrastatDetailFields=-&paymentInfoFields=-

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": {
    "Purchases": {
      "Purchase": [
        {
          "Fields": {
            "TotalDocC": "-1500.00"
          },
          "Entries": {
            "Entry": [
              {
                "Fields": {
                  "Account": "440000000001",
                  "AmountDocC": "-1500.00"
                }
              },
              {
                "Fields": {
                  "Account": "600",
                  "AmountDocC": "1500.00"
                }
              }
            ]
          }
        }
      ]
    }
  }
}
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <Purchases>
    <Purchase>
      <Fields>
        <TotalDocC>440000000001</TotalDocC>
      </Fields>
      <Entries>
        <Entry>
          <Fields>
            <Account>440000000001</Account>
            <AmountDocC>-1500.00</AmountDocC>
          </Fields>
          <Fields>
            <Account>600</Account>
            <AmountDocC>1500.00</AmountDocC>
          </Fields>
        </Entry>
      </Entries>
    </Purchase>
  </Purchases>
</Response>