Using API to get Single Invoice based on Field Parameters

I’m experimenting using an API to access data from a Manager.
I managed to access the Sales Invoice and get all the data by changing the Key to the Endpoint recursively.

Is there a way to get a single invoice based on field parameters, without having to read all the Invoice data?

As I read in this thread, there we can use FileID as a parameter to get the report.

Thank You

@Lubos indicated in other forum posts that he is about to complete a complete new and better API interface, as such I recommend to hold on for that.

1 Like

Of course, I know about it, and I’m looking forward to it too.

I’m just trying out what we have now, until the next version of the API is released

This feature has been dropped for quite a while now.

The backend API accepts no queries and therefore your only option is to:

  1. get the complete index for the collection of objects
  2. store its state
  3. Recursively get those objects with timestamps greater than the last entry in the previous state in an incremental fashion

This way you will have a parallel record of all objects that you can query as you like with the least number of API calls.

This is the only way to do things right now, however, as @eko said, the API will see further improvements.

1 Like

Thankyou for the response.

Because I have just joined, and I see that the discussion about the API has been very old, I think maybe there have been changes or there are special tricks that can be done apart from the API documentation provided.

The good news is, I can still select the Field Name which contains the Reference Number and Date, determine which data I need to retrieve, without having to open the transaction data one by one.

    "Key": "2f396430-a793-4e56-95e7-f98f2c718306",
    **"Name": "2 — 11/21/2023",**
    "Timestamp": 638361683100394600
    "Key": "58512760-a177-477e-a970-8138b095cca4",
    **"Name": "1 — 11/21/2023",**
    "Timestamp": 638361682323096200

Thank You