frequently asked questions

All your questions in one place.

Documents

This method returns some details on a list of Documents.

BODY - RAW

{
      "Method": "Documents",
      "Parameters": [
            [<nLastItemId>],
            [<nDocumentType>],
            [<dEndDate>],
            [<dStartDate>],
            [<nAddressId>],
            [<cExternalReferences>],
            [<cOpenAmount>],
            [<nIsPaid>]
      ]
}

PARAMETERS

Property Description
nLastItemId

ID of the first item to be returned. You'll typically parse the results of a call, and then pass as a parameter the biggest (last) ID received, in order to obtain the next 100 documents.

If the method returns less than 100 doucments, that means that it has returned everything (according to the parameters used)

nDocumentType

Allows to return results only amongst a certain Document type. The accepted values are

Sales documents

10 Offer

12 Order confirmation

14 Worksheet

16 Delivery slip

17 Debtor starting balance

18 Cash sale

20 Debtor Invoice

22 Debtor credit note

24 Debtor Payments

Purchase documents

40 Supplier order

41 Call for tender

42 Reception of goods

43 Creditor starting balance

44 Creditor invoice

46 Creditor payment

47 Creditor credit note

50 Return of goods 

dEndDate

The recordings up to this date are considered. This parameter is optional. If the parameter is omitted, the recordings up to the end of the fiscal year are considered.

dStartDate

The recordings starting from this date are considered. The parameter is optional. If the parameter is omitted, the recordings starting from the beginning of the fiscal year are considered.

nAddressId

Id of the address

cExternalReferences

A list of ID, separated by semi-columns to use as a filter.

The filter acts on contents of the field do_ref6

cOpenAmount

Filter the documents which (no matter their status) have an open amount (in local currency) < > = to a given amount.

nIsPaid

The possible values are:

0 – Not paid

1 – Paid

 

EXAMPLE

*/ Return the next 100 documents starting from the documentwith id = 236707 

{
      "Method": "Documents",
      "Parameters": [
            236707
       ]
}

*/ Return the next 100 debtor invoices starting from the documentwith id = 236707

{
      "Method": "Documents",
      "Parameters": [
            236707,
            20        ] }

*/ Return the first 100 debtor invoices created between the 01.06.2018 and the 31.12.2018

{
      "Method": "Documents",
      "Parameters": [
            ,
20, "2018-12-31",
"2018-06-01"
] }

*/ Return the first 100 documents for the Address with the ID (ad_numero)  equal to 284.

{
      "Method": "Documents",
      "Parameters": [
            ,
, ,
,
284
] }

*/ Return the 3 documents with an External reference that contains one of the values passed as parameter.

{
      "Method": "Documents",
      "Parameters": [
            ,
, ,
,
,
"236798; 236812; 236857" ] }

*/ Return the debtor invoices with an unpaid amount equal or bigger than 100 chf.

{
      "Method": "Documents",
      "Parameters": [
            ,
20, ,
,
,
,
">=100", ] }

*/ Return the unpaid creditor invoices.

{
      "Method": "Documents",
      "Parameters": [
            ,
44, ,
,
,
,
,
1 ] }

 

CLASS RETURNED

Property Description
Id Id of the document

 

Type

Document type

Number

Document number

Date

Date of the document

AddressId

Id of the Address of the document

Address

Short description of the address of the document (company name, last name, first name, zip code, city)

TotalAmount

Total amount of the document in the local currency

OpenAmount

Aopen amount of the document in the local currency

OurReference

Reference of the document at the winbiz user

YourReference

Reference of the document at the document recipient

IsPaid The document is paid or not
PaidAmount Paid amount in local currency

Did you find this article useful?

1 out of 2 found this helpful