AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Everything Else
API and GET Request...
 
Notifications
Clear all

Questions API and GET Requests

 
Everything Else
Last Post by Tim Rodman 8 years ago
3 Posts
3 Users
0 Reactions
4,980 Views
RSS
Posts: 10
 Brandon Crisp
Topic starter
June 14, 2018 3:56 pm
(@brandon-crisp)
Member
Joined: 8 years ago

Hello,

I've recently started trying to use the API to be able to connect to Acumatica and update inventory through our PXM service, Salsify, directly. I've successfully been able to connect to the API through basic auth, and when I do a GET request through "StockItem" with my Inventory ID, I get a response with the information of Default Price, DimensionWeight, etc. However, when I try the exact same thing under InventorySummaryInquiry to get the QtyAvailable data piece, I get the following error message:

{
"message": "An error has occurred.",
"exceptionMessage": "Operation is not valid due to the current state of the object.",
"exceptionType": "System.InvalidOperationException",
"stackTrace": " at PX.Api.ContractBased.EntityService.FillEntityImplWithKeys(String version, String name, EntityImpl entity, String[] keys)\r\n at PX.Api.ContractBased.SystemContracts.V2.SoapFacade.PX.Api.ContractBased.IRestGate.FillEntityImplWithKeys(EntityImpl entity, String[] keys)\r\n at PX.Api.ContractBased.SystemContracts.V2.RestController.CreateEntityFromKeys(String objectName, String idsString)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}

The URL that I am using is: "https://acumaticalink.com/entity/Default/17.200.001/InventorySummaryInquiry/InventoryID" with InventoryID being my product's SKU. Any ideas?


2 Replies
MichaelHansen
Posts: 149
 MichaelHansen
June 14, 2018 6:06 pm
(@michaelhansen)
Estimable Member
Joined: 6 years ago

I would post this question in Stack Overflow. We don't usually handle code in this forum, the developers do lurk around in S.O. though.

That being said, I don't think that screen is a table that can be queried with a GET request. I think it's a View (not the right word, there's another term for it that escapes me at the moment) that gets spun up on the fly. I'm heading out for the day so I can't test it right now.


Reply
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
June 15, 2018 10:34 pm
(@timrodman)
Famed Member
Joined: 10 years ago

I agree with Michael, the Inventory Summary (IN401000) screen is not a data entry screen so I don't know how the REST API would allow you to post something into it. If you want to load in inventory numbers, I would use the Receipts (IN301000), Issues (IN302000), or Adjustments (IN303000) screens.

As far as Stack Overflow goes, I also agree with Michael there. That's a better place for REST APIs because that forum is monitored by Acumatica developers:

https://stackoverflow.com/questions/tagged/acumatica


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,527 Topics
  • 10.9 K Posts
  • 10 Online
  • 2,412 Members
Our newest member: Peter Paasch
Latest Post: Can't export GI's to excel that contain the FATrans DAC after upgrade to 2025 R1 in less than 25 min
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×