>

Issue with searching and downloading documents via API

Answered

Comments

4 comments

Date Votes
  • Francesco Torchia

    Perhaps Rudy Scoggins can help

  • Francesco Torchia

    Here's the result when testing in API Help:

     

     

  • Seth Halvaksz

    Mike Schepker please review

  • Rudy Scoggins

    Hi all!

    I'm thinking there's a bit of confusion surrounding this.  Download Document and Document Search return different things.

    - Document /Download - This returns the byte array representing the document file
    - Search Document - This is the search where you return document information stored in Enterprise.

    The document.download() functionality in the SDK should be working, at least to some degree.  We've got 4 unit tests implementing it successfully every night.

    Here's a snippet of functionality that is succeeding:

          const string orgCode = "10";
         const string type = "9";
         const int sequenceNumber = 14178;
    return apiClient.Endpoints.Documents.Download( orgCode, type, sequenceNumber);

    In the code example, I am not a fan of it passing in 0 as a fallback parameter.  Not much point to that and would be a 404 at best, error at worst.

    The search URL parameter looks valid.  I ran it myself:

    Type eq 'C' AND Subject eq 'INV' AND EnteredOn gt DateTime'2025-05-07'  AND substringof('Faktura - Basware', Description) AND substringof('FAKT', EnteredBy)

Please sign in to leave a comment.