Question

How do I get discontinued item using the REST API

  • 9 June 2023
  • 1 reply
  • 44 views

Userlevel 1
Badge +5

Trying to get a discontinued item.

but when I use GET  "https://????/assystREST/v2/items?shortCode=abcitem” it fails if the item “abcitem” is discontinued but succeed if it is not.


1 reply

Userlevel 2
Badge +5

If you ever need to know the available parameters for a resource then using the RAML will tell you:

https://{server}/assystREST/v2/items/raml

In your case you need the includeDiscontinued query parameter:

https://{server}/assystREST/v2/items?shortCode=abcitem&includeDiscontinued=true

Reply