ListTransactionsByCompany - Unique IDs?

  • 2
  • Question
  • Updated 2 months ago
  • (Edited)
When I use ListTransactionsByCompany, I get multiple records with the same ID, apparently for each set off values when the records have been updated.  However, when I use GetTransactionByID, I just get the latest record. Is there a way to have ListTransactionsByCompany just list the latest, current record?
Photo of Randy Kaempen

Randy Kaempen

  • 14 Posts
  • 0 Reply Likes

Posted 1 year ago

  • 2
Photo of Wayne Myer

Wayne Myer, Official Rep

  • 210 Posts
  • 25 Reply Likes
Hi Randy,

Thanks for your question regarding filtering results using ListTransactionsByCompany. I have been investigating your question to see if there is some combination of REST filters that could be applied. Unfortunately, the filtering does not currently provide a means to get the only the latest record. If you have other criteria by which you can identify the transaction, the $orderby parameter to narrow your results. 

Let me know how that works for you.

Thank you,
Wayne Myer
Photo of Wayne Myer

Wayne Myer, Official Rep

  • 210 Posts
  • 25 Reply Likes
Hello Again Randy,

I got additional information that should help you with your goal of filtering transactions. If you set a $filter parameter to status of committed, saved, or posted, you will get the latest, most current record. 

For example, that filter string would look like:
api/v2/companies/DEFAULT/transactions?%24filter=status%20EQ%20Committed%20or%20status%20EQ%20Saved%20or%20status%20EQ%20Posted
Let me know how that works for you.

Thank you,
Wayne Myer
Photo of Craig Constantine

Craig Constantine

  • 6 Posts
  • 0 Reply Likes
...and if you wanted a list of uncommitted transactions (since "status eq uncommitted" is not valid) you can filter for

status ne Committed AND status ne Cancelled AND status ne Adjusted
(Edited)