Solved

How to check for inventory change using REST API

  • 21 February 2022
  • 4 replies
  • 471 views

I am working on an automated Integration that picks up the products based on the last date modified and updates those products in an e-Commerce platform. but whenever the inventory is updated, it's not affecting the last date modified of the products and I am not seeing those products in my response.

URL :  https://<host_url>//Entity/<endpoint_name>/<endpoint_version>/StockItem?$filter=LastModified ge datetimeoffset'2022-01-19T05:17:43'
This the API and parameters I am using in order to fetch recently updated products (date will change based on the integration run time)
if a Qty of a product is updated (Qty added to a product, shipment completed with a product in order) it's not affecting this last date modified.

Is there a way to find the Inventory change of a product, any separate endpoint just to determine a change?

Thanks,

icon

Best answer by jinin 21 February 2022, 13:08

View original

4 replies

Userlevel 4
Badge +1

hi @RanjithKumar ,

 

As Sales order, shipment and receipts updates of the product will not updated the inventory last modified date. 

We need to create a GI that looks for INTran and Inventory Item last modified date and get records to GI based on datetime modified on any of these table.

This GI screen has to be exposed to GI.

we can also add date filters on the GI if required.

 

 

Hi @deebhane Thanks for response, I will check on this!!

Userlevel 7
Badge +11

Hi @RanjithKumar ,

Stock item entity only updates the details available on the stock item screen. The Quantity will maintain on the warehouse level. The Qty updates are available on the InSiteStatus table. 

To get the qty updates through the endpoint, we need to create a GI with InventoryItem and InSiteStatus table. And also create a Custom endpoint to get the updates.

I’ve created a sample package with GI and endpoint. Please review.

You can adjust the GI and the filter based on your requirement.

Endpoint url: …./entity/InventoryUpdate/20.200.001/GetInventoryUpdates?$expand=GetInventoryUpdatesDetails
Method: PUT
Input:

{   

    "FromDate": {

        "value": "2021-01-01"

    },

    "ToDate": {

        "value": "2022-12-29"

    }

}

Hi @jinin Thank you for your insight, much appreciated. I will try to implement this in my system.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved