Skip to main content
Answer

How to fetch updated inventory from contract based rest api?

  • April 14, 2025
  • 21 replies
  • 225 views

Forum|alt.badge.img

Hello,

I am using contract based rest api. I was looking for the endpoint which can help me to fetch updated inventory changes nearly on real time based scenario, where I can pass updated date filter. So, can you please suggest which entity or endpoint would work better for this?

And also looking for the endpoint where I can update stock quantity.

Please look into the issue.

Thank you

Best answer by Namrata13

including above query can we also able to get branch list via rest api?
 

Moderator note - Content deleted at the request of OP

21 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • April 14, 2025

Hi ​@Namrata13 ,

  • Use the Inventory Summary screen (IN401000) via the REST API.
  • Create a custom endpoint or extend an existing one.
  • Add the InventorySummary entity to the endpoint and include the required grid fields (like InventoryID, Warehouse, QtyOnHand, Available Qty, etc.) under the Details section.
  • Use the PUT method with appropriate filters (like InventoryID) in the request body to get real-time changes.
     
     

     


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 15, 2025

Hello ​@jinin ,

Thank you for your reply. I already checked and tried inventory summary entity. But the problem is that here it is asking for InventoryID. But I need the entity where only I can pass LastModifiedDate filter I don’t want to pass InventoryID. And without InventoryID it is not giving me the result. 

Hope you get my point. 

Help me on this.

Thank you


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • April 15, 2025

Hi ​@Namrata13 ,

Since the information can't be retrieved directly, you'll need to create a custom Generic Inquiry (GI) using the INSiteStatusByCostCenter table. Apply a filter on the Last Modified DateTime field, and then create an endpoint entity based on that GI. Please give this approach a try.


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • April 15, 2025

@Namrata13 you can get ‘storage details’ inquiry via OData to get this data.

E.g.

{{sitename}}/t/Company/api/odata/gi/DB-StorageDetails?$filter= LastModifiedDateofWarehouseQty ge 2024-01-01

 

 (example for 2025r1 Acumatica version)

 


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 16, 2025

Hello,

Thank you for both response ​@jinin and ​@Dmitrii Naumov .

@jinin regarding creating Generic inquiry, I never created before. So, I need to do some RNDs on that. If you can suggest any tutorial regrding this..

@Dmitrii Naumov, Will try your approach and let you know whether its working or not. 


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 16, 2025

@Dmitrii Naumov I tried with odata concept but it is giving me unauthorized error. I want to ask I am using oauth in rest api but same token not working for odata.

Can you please guide me on that?

Thank you


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • April 16, 2025

@Namrata13 the same token should be good for OData too. 

What version of Acumatica do you have? 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • April 16, 2025

Hello,

Thank you for both response ​@jinin and ​@Dmitrii Naumov .

@jinin regarding creating Generic inquiry, I never created before. So, I need to do some RNDs on that. If you can suggest any tutorial regrding this..

@Dmitrii Naumov, Will try your approach and let you know whether its working or not. 


Reference:

How to Access Data Efficiently Using Contract-Based APIs


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 17, 2025

Hello ​@Dmitrii Naumov ,

I dont know which version I am using. I have shared url which I am trying

 

Moderator note - Content deleted at the request of OP
 

This is staging acumatica in which I am testing. and also shared postman where I am getting unauth error


Forum|alt.badge.img+1
  • Jr Varsity II
  • April 17, 2025

Hi @Namrata13,

As suggested by @jinin, we can retrieve a list of items using a date filter.

Please find below the steps to achieve this using a Generic Inquiry:

you can access GI using Endpoint as below,

http://localhost/ACV24R1241120026/entity/EndpointName/20.200.001/InventoryLastModified?$expand=InventoryLastModifiedDetails

Request:

{  

    "Date": {

        "value": "2024-02-15T18:25:43.511Z"

    }

}

Steps:

  1. Import the Generic Inquiry.

  2. Create an Endpoint for it.

  3. Pass the date parameter in the request.

 

Hope above helps!!


Forum|alt.badge.img+1
  • Jr Varsity II
  • April 17, 2025

Hi @Namrata13,

As suggested by @jinin, we can retrieve a list of items using a date filter.

attached generic inquiry for your reference

Please find below the steps to achieve this using a Generic Inquiry:

Steps:

  1. Import the Generic Inquiry.

  2. Create an Endpoint for it.

  3. Pass the date parameter in the request.

Hope above helps!!


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 17, 2025

Hello ​@Rakshanda ,

Thank you for your response. Will try that Generic Endpoint and let you know if it is working or not


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • April 17, 2025

@Namrata13 You are on 24r1 version. 

In this version you can use the following URL instead

Moderator note - Content deleted at the request of OP


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 18, 2025

@Dmitrii Naumov Thank you. 

The URL you shared is working perfectly—thank you for that! I do have a few questions for clarification:

  1. Will the same URL structure work for other Acumatica customers, or can it vary based on their environment or configuration or version?

  2. If any inventory-related transaction occurs—such as sales order creation, purchase receipt, item receipt, item issue, etc.—will the /DB-StorageDetails OData endpoint reflect the updated inventory accordingly?

  3. How can I retrieve the company name using the API?

I hope my questions are clear.
Thank you again for your support!


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • April 21, 2025

@Namrata13 

  1. It should work for all currently supported Acumatica versions and configurations. For 2026 version it’ll probably need to be changed to the one I’ve provided first here

    @Namrata13 you can get ‘storage details’ inquiry via OData to get this data.

    E.g.

    {{sitename}}/t/Company/api/odata/gi/DB-StorageDetails?$filter= LastModifiedDateofWarehouseQty ge 2024-01-01

     

     (example for 2025r1 Acumatica version)

     

  2. Yes, correct.
  3. I don’t think there is a good way to do it. You should consider the company name a part of credentials and have a setting for that along with site URL

Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 22, 2025

@Dmitrii Naumov 
like in acumatica we are able to view tenant list. Can’t we get this via api? Beacuse we are looking for the automation and actually our all api call created by contract based rest api and only to fetch updated inventory I have to use odata version. That’s why I am looking for the way where I want least involvement from client.

Hope you understand.

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • Answer
  • April 22, 2025

including above query can we also able to get branch list via rest api?
 

Moderator note - Content deleted at the request of OP


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • April 22, 2025

@Namrata13 when you log in in the REST API  or get a token, you should already have a specific tenant name (because tokens cannot be shared between tenants).

 

As for the branches, yes, the branches can be retrieved using Default endpoint CompaniesStructure entity.


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 23, 2025

Dear Support Team,

Thank you so much for your timely response. I truly appreciate your support—it really helped clarify things quickly and easily. Your assistance is highly valued. If I need any further help, I’ll be sure to reach out.

Best regards,
Namrata


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • July 4, 2025

@Dmitrii Naumov 

Hello,

The endpoint which you have suggested is working for one acumatica account but not working for another acumatica account. Url is- 

 

Moderator note - Content deleted at the request of OP

What changes I have to done to this account?

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • July 4, 2025

@Namrata13 I can see two possible reasons for that:

  1. They’ve disabled that GI for OData or deleted it. You can check if the GI has ‘Expose via OData’ checkbox checked
  2. The user you are accessing it with does not have the access rights