Document filters

There are three places where documents can exist:

  1. Draft documents. A document can be created before sending in a documents folder (GetDocuments).
  2. A document can be send and placed in the Outbox (GetOutboxDocuments) and
  3. a document can be received in a Inbox (GetInboxDocuments).

The call’s GetDocumentsGetOutboxDocuments and GetInboxDocuments can select documents with the following criterea:

Fieldname Description
ExternalId Unique Id returned during delivery or sending of a document. Applies to inbox and outbox. Used within the search returns only the document information about the document and not the document. This will not count as a download of the document.
DocumentId Unique Id returned during creation of a document. Applies to the draft documents folder.
Subject Subject of the document.
CreatedOn Date range for selection of creation date. With the creation date you can retrieve the new documents created after the last document retrieved. The date is in XML DateTime.
ModifiedOn Date range for selection of modification date. The modification date is used to identify the document that are changed. A  important change is the Status change. The date is in XML DateTime.
Sender Sender of the documents. Name or E-invoicing routing Id.
This field is only filled for documents send or received.
Reciever Receiver of the documents. Name or E-invoicing routing Id.
This field is only filled for documents send or received.
Template A template identifies the type of the document. See: Overview of documents and templates
Standard is Template/MasterId. Template/Id is only used in specific cases.
Status Status of the document. The possible statuses depend on the Template that is used. Name or Code can be used. The best way is to only use the Code.

Possible filters in the request

<Search>
    <ExternalId>ExternalId1</ExternalId>
    <DocumentId>DocumentId1</DocumentId>
    <Subject>Subject1</Subject>
    <CreatedOn>
        <To>1900-01-01T01:01:01.0000000+00:00</To>
        <From>1900-01-01T01:01:01.0000000+00:00</From>
    </CreatedOn>
    <ModifiedOn>
        <To>1900-01-01T01:01:01.0000000+00:00</To>
        <From>1900-01-01T01:01:01.0000000+00:00</From>
    </ModifiedOn>
    <Sender>
        <EConnectPartyId>EConnectPartyId1</EConnectPartyId>
        <Name>Name1</Name>
    </Sender>
    <Reciever>
        <EConnectPartyId>EConnectPartyId1</EConnectPartyId>
        <Name>Name1</Name>
    </Reciever>
    <Status>
        <Name>Name1</Name>
        <Code>Code1</Code>
    </Status>
    <Template>
        <Id>Id1</Id>
        <Name>Name1</Name>
        <MasterId>MasterId1</MasterId>
        <MasterName>MasterName1</MasterName>
    </Template>
</Search>

Examples

Lookup metadata for one document without retrieving the XML payload itself

<Search>
    <ExternalId>XCNIN232054</ExternalId>
</Search>

New invoices since the last check

#1 Determine the highest <CreatedOn> value of the last document list and this in <From>.
#2 Be sure the paging of results is implemented – to avoid missing documents.
#3 Use the invoice templateId to avoid receiving other kinds of documents.

<Search>
    <CreatedOn>
        <From>2016-11-01T01:01:01.0000000+00:00</From>
    </CreatedOn>
    <Template>
        <MasterId>GLDT9223370666504283001RA000000006DTP2000001</MasterId>
    </Template>
</Search>

Incoices created between 1 and 3 November 2016

<Search>
    <CreatedOn>
        <To>2016-11-03T01:01:01.0000000+00:00</To>
        <From>2016-11-01T01:01:01.0000000+00:00</From>
    </CreatedOn>
    <Template>
        <MasterId>GLDT9223370666504283001RA000000006DTP2000001</MasterId>
    </Template>
</Search>

Incoices where status is changed to 20 (Opened) between 1 and 3 November 2016

<Search>
    <ModifiedOn>
        <To>2016-11-03T01:01:01.0000000+00:00</To>
        <From>2016-11-01T01:01:01.0000000+00:00</From>
    </ModifiedOn>
    <Sender>
        <EConnectPartyId>NL:KVK:00006661</EConnectPartyId>
    </Sender>
    <Status>
        <Code>20</Code>
    </Status>
    <Template>
        <MasterId>GLDT9223370666504283001RA000000006DTP2000001</MasterId>
    </Template>
</Search>

 

Was this article helpful?