Acumatica REST API

With Acumatica 6 release you can find (and actually use) new type of API – Rest API.

Acumatica 6 API

Acumatica Rest API is based on Contract based API, so here you have some important points:

Ok, lest try to do some examples. Here I will show you how to call Acumatica REST commands from Browser. By using this approach you can easily test functionality and just feel, how does it work.

To do so, we need a special tool. I will use PostMan extension for Google Chrome browser.

postman api builder

As we need to maintain session and cookies between calls, we also need to install Postman Interceptor extension.

postman api builder

Login
Now we actually can login. To do so, we need to send our credentials for the specific url:
URL: http://acumatica.com/entity/auth/login
JSON:

Response should be 204 No Content.

Geting
Ok, authentication is done, lets try to select data.

Filtering
If we want some filtering or conditions, we just can use “OData” like filters – $filter=ItemStatus eq ‘Active’

URL: http://acumatica.com/entity/Default/6.00.001/StockItem?$filter=ItemStatus eq ‘Active’&$top=9

Additional parameters that you can use together with URL when you retrieve records from Acumatica ERP:

Getting Single Record
If you know key, you can easily get details about single record – just add key field to the url string:

Puting
You also can create new entity using REST API, in this case you need to use PUT method and send item details using JSON format. Name of the fields and containers you can get from Contract definition.

 < "InventoryID" : , "Description" : , "ItemClass" : >

Documentation
Good news that the documentation on the REST API is included right within standard Acumatica Help. There you can find multiple examples and good code snippets that you can use from your favorite language/platform/code.

Have a nice integration!

Categories Sergey Marenich Tags Integration,  Web Services

172 Replies to “Acumatica REST API”

Faizal Nor says: Hi. is there any option to have array on entities instead of details? Sergey Marenich says: HI Faizal, I’m not sure I got your question… What do you mean by array instead of details? Faizal says:

Hi Sergey, my question is how can i use api to add multiple new customers by only sending 1 request, instead of looping 1 by 1. because right now i only able to send array in detail screen

Sergey Marenich says:

Hi Faizal, the only way to import multiple objects with one request is to use old SOAP, Screen-Based API. https://help.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=7cd68dda-8349-4d7c-a060-4a62b8e519c0
Rest API does not support creation of multiple records at once.

Vibindas says:

Hey Guys, I’m struggling with the this issue for a long time now, appreciate if someone could help me. When opening Processing Center screen I don’t see any records under the screen. I have googled and found an article which suggests ‘Integrated Card processing’ to be enabled under Third Party Integrations. I have tried searching for this option under ‘Enable/Disable’ but don’t see it. Am I missing anything?
My user role is administartor , so I believe I should able to see the option..

Sergey Marenich says:

Vibindas, please try to change the Payment Plugin (Type) field. Remove the value and then add it again or just change back and forth.
When you change it, it should reload the parameters.

Vibindas Koloth says:

Is there a way to add new methods to the interface ICCProfileProcessor? I reckon this is used for Credit Card processing.

Vibindas says:

Getting the below error when validating entity on Web Service Endpoints. I have mapped newly added column as field to a customized endpoint. Any idea what could be the issue?
“the following fields or parameters may have been mapped incorrectly”

Sergey Marenich says:

HI Vibindas, your mapped fields should exist in the corresponding DAC. Also, the data view should exist in under the corresponding graph.
If that does not help, please create a support request, our support team should review your code.

Vibindas says:

Hi,
By using RestAPI , I’m trying to trigger an Action that is defined in the endpoint. I’m trying to figure out how to retrieve the parameters defined in the request body when the action is triggered.
Say for example: if below is the action defined in the graph, how do I get the parameters from the request body. If you could share an example that would be great..
public virtual IEnumerable TestParams(PXAdapter adapter)
>

Sergey Marenich says:

The values in the request body must be mapped to the DAC fields. When you send the API request, Acumatica will automatically pass the parameters to the DAC and set the corresponding values.
Then in the action you should use cache.Current to retrieve values from the corresponding DAC.

Vibindas says: any examples that I can refer to please with Action with the above scenario? Sergey Marenich says:

Please refer to the existing actions with parameters, such as
– UpdateDiscounts on Discounts form
– ChangeEmployeeID on Employees form
– ConvertLeadToBAccount on the Leads form

Ted Brown says:

I am using the Rest API / getting an exception because there a popup dialog that needs a response. In the api documentation there seems to be a way to ‘send commands’ to respond to dialog boxes using the Screen-Based Soap API. Can’t seem to find the same for the Rest API. Does anyone know if this can be done vis Rest API?

March says: Ted, Did you find a way to respond to the dialog boxes using the Rest API? Dave says:

We are integrating with the Acumatica SAAS product via the REST API by means of lambda functions. This is working fine in general. However, we find that after a period of inactivity, the response to an API call takes much longer than usual, and our lambda function stops executing before the response is received. An Acumatica support rep once mentioned that this could be due to “cache expiration”, but we can’t find any documentation about this. Is it possible to configure the cache expiration time, or something similar that would help us solve this problem? Thank you.

Sergey Marenich says:

Hi Dave,
there is no way to extend the lifetime of internal caches. I think I would recommend you to add an extra warm-up call without timeout before your main call with LINQ. Simple GET should be enough.

Dan Smith says:

Hello, I am having a few problems, i require the SalesOrderNBR from the Purchase Order. ( /entity/Default/18.200.001/PurchaseOrder ) Using 6.00.001 this was easy as I would specify it in my $custom. However now using 18.200.001 this has now changed and the field is located under Details->custom->UsrSOOrderNbr Anyone know how i can get the info from Details->custom. I have tried expanding Details and also using $custom but cannot get hold of it.

Ted Brown says:

Hi: not sure if I am missing something, but other than looking at the underlying database, how can I find out the field lengths of string type fields in the rest API? It would be handy to be able to query this, so fields can be truncated dynamically.

Sergey Marenich says:

Hi Ted, you are right here, REST API definition does not have information about length. Currently the proper way is to use inspect element function on the field that you need and get the information from PXDBString attribute.
We are working on the Acumatica data structure schema browser and hope it will solve this problem later.

Ted Brown says:

Thanks, thought that might be the case. The other issue I’m having it trying to decipher / translate between exactly what I see on a screen vs fields in the json. for normal fields not too difficult. Example: I am trying to create an invoice using a foreign currency with exchange rate. I figured out the Currency itself is a ‘custom’ field named ‘CuryID’ However, still can’t figure out which field is used to specify the exchange rate. I look on the screen, when customization is selected it does not show a ‘Data Field’ element like most ui controls. I assume because it seems to popup a secondary control? Nothing pops in the schema as obvious. It would be handy if there was a way to temporarily / easily tell this thing to return all fields / custom fields, related schema. Am I missing something?

Sergey Marenich says:

Ted, Unfortunately you are right. There is no easy way to find the database schema. As I said, we are working on the schema browser and will provide it later with the product.
Currently I can help you case by case. Rate is stored in the separate table – CurrencyInfo and joined to the document using field CuryInfoID

G2 says:

Hi team,
my requirement is
In stock item screen Get Active vendor details
I use below code
Method : PUT
URL : http://localhost/ACM201030019/entity/KNVendorInventory/18.200.001/StockItem?$expand=VendorDetails&$filter=Active eq ‘true’
Request:
“InventoryID”: “value”: “AACOMPUT01”
>
> I am getting below error can you please help me “message”: “An error has occurred.”,
“exceptionMessage”: “Term ‘VendorItems.Active eq ‘true’ ‘ is not valid in a $select or $expand expression.”,
“exceptionType”: “Microsoft.Data.OData.ODataException”,
“stackTrace”: ” at Microsoft.Data.OData.Query.SelectExpandTermParser.ParseSingleSelectTerm(Boolean isInnerTerm)\r\n at Microsoft.Data.OData.Query.SelectExpandTermParser.ParseSelect()\r\n at Microsoft.Data.OData.Query.ODataUriParser.ParseSelectAndExpandImplementation(String select, String expand, IEdmEntityType elementType, IEdmEntitySet entitySet)\r\n at PX.Api.ContractBased.OData.Helpers.ParseSelectCustomAndExpand(ODataUriParser uriParser, String select, String expand, String custom, IEdmEntityType elementType, EntityImpl entity, Nullable`1 returnBehaviorToSet, Boolean mapFilesByDefault)\r\n at PX.Api.ContractBased.OData.Helpers.FillRestQueryOptions(IEdmModel edmModel, EntityImpl entity, String filter, String select, String expand, String custom)\r\n at PX.Api.ContractBased.SystemContracts.V2.RestController.PutEntity(EntityImpl entity, String select, String filter, String expand, String custom)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.c__DisplayClass6_1.b__3(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.d__1.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.d__6.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.d__6.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.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.d__6.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.d__6.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.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.Controllers.ActionFilterResult.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.AuthorizationFilterAttribute.d__3.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.d__6.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.d__6.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.d__15.MoveNext()”
>

Lakki says: Lakshman says:

Hey Sergey, I did like to know if there is a way to create custom entities on the Rest API side of things. For example, is there an option to extend the salesinvoice entity found on the Default endpoint(version 17.200.001) to include a custom field like CustomerType? Also, how about the ability to specify multiple detail entities along with a single header entity? Thanks,

Sergey Marenich says:

Hi Lakshman, you can do all of these things in the latest Acumatica. However It may not be possible in 2017 version.
Please read about Endpoint Extensibility.
https://help-2018r1.acumatica.com/(W(1))/Wiki/ShowWiki.aspx?pageid=c450492e-06fe-4563-95c3-efa76975415b

Sameer S says:

Hi,
I am curious to know more about the fact that ” I can send GET requests without including any authentication or token”. So is my below assumption right?
1. Login using POST Request by sending credentials through BODY.
2. Play with the data- GET, POST, DELETE and PUT requests to get and modify the data
3. LOGOUT using Another request?

Sergey Marenich says:

Yes, login, than operations, than logout.
But through all these operations you need to keep cookies. Authentication token will be stored in the cookies.

Aleksandr says:

Hi Sergey. There is C#-based REST API client on your official Github account (https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp).
Would you recommend to use it for real product that integrates with Acumatica or is it mostly for educational purposes?

Sergey Marenich says:

Aleksandr, this API client is done by my colleague in Partners Support team to make your life easier. Surely you should try to use it. I hope it will save you a lot of time.

Andrey Baranov says:

Hi Sergey, I’m trying to use Rest API to create Sales Orders and release them (I have custom action called “ReleaseOrder”, which does some validation checks and if everything is OK just sets SOOrder.Hold checkbox to ‘False’ which sends it to processing flow) What I found is a huge difference between the time needed to execute Release action in UI, and to execute the same action through REST API. Through the REST API a call runs up to hundreds of secs, while in UI for just a few secs. Here’s quick number from Request Profiler:
~/entity/edi/6.00.001/soorder/releaseorder/
Server Time, ms: 188,269.89
SQL Time, ms: 3,956.58 What could be the reason for such long execution?
What can I look at to optimize in such cases? I’m on Acumatica v6.0

Sergey Marenich says:

I recommend you to create a development support case on Acumatica Portal.
I guess our team need to review your code.

Brent says:

Hey Sergey, I need to have Accounts and Contacts automatically reach out to a third party api and store the data in attributes when they are loaded. I am finding a ton of information on how to use acumatica’s apis but not alot on how to use third party apis within acumatica. Can you help me out?

Sergey Marenich says:

Hi Brent, this is not a topic for the blog comments. Please reach out to me in linked it and we can have a call.

Lakshman says:

I was able to make it work. This is what worked for me. cd
F:
cd\
cd Tools\curl-7.66.0_2-win64-mingw\curl-7.66.0-win64-mingw\bin
curl -X POST –cookie-jar headers https://XYZnc.acumatica.com/entity/auth/login -d “@F:\EDI Data\Temp\XYZInc\Login.json” -H “Content-Type: application/json”
curl -X GET -b headers “https://XYZnc.acumatica.com/entity/Default/18.200.001/Invoice/Invoice/007878?$expand=Details” -o “F:\EDI Data\Temp\XYZInc\OUT\810\Inv2\201910241734341ED4E027.json”
curl -X POST https://XYZnc.acumatica.com/entity/auth/logout -d “@F:\EDI Data\Temp\XYZInc\Login.json”
cd\
exit Thanks,
Lakki

Lakshman says:

Hey Sergey, I know and have been able to use the Acumatica APIs using Postman. Do you have examples of how to use consume these APIs using cURL? For example, if we were to login, get a salesorder and then logout, I suppose there would be three cURL commands back to back. I was able to come with something like this to be put in a batch script for execution. cd
F:
cd\
cd TOOLS\curl-7.61.1-win64-mingw\bin
curl -X POST –dump-header headers https://xyz.acumatica.com/entity/auth/login -d “@F:\EDI Data\Temp\XYZInc\Login.json” -H “Accept: */*” -H “Accept-Encoding: gzip, deflate” -H “Cache-Control: no-cache” -H “Connection: keep-alive” -H “Content-Type: application/json” -H “cache-control: no-cache” -o “F:\EDI Data\Temp\XYZInc\OUT\810\Inv2\Login.json” curl -X GET -b headers -H “Accept: */*” -H “Accept-Encoding: gzip, deflate” -H “Cache-Control: no-cache” -H “Connection: keep-alive” -H “Host: xyz.acumatica.com” -H “cache-control: no-cache” https://xyz.acumatica.com/entity/Default/17.200.001/SalesOrder/3def9dhhgs9845f7af6fe2afc3d9f7b5 -o “F:\EDI Data\Temp\XYZInc\OUT\810\Inv2\AXA.json” curl -X POST -H “Accept: */*” -H “Accept-Encoding: gzip, deflate” -H “Cache-Control: no-cache” -H “Connection: keep-alive” -H “Content-Type: application/json” -H “cache-control: no-cache” https://xyz.acumatica.com/entity/auth/logout
exit I could not make it work though. Any pointers? Thanks
Lakki

vannak says:

I can retrieve records with equal condition using $filter=CustomerName eq ‘vannak’, but I want to retrieve records with condition ‘contain’ and don’t know short key of contain in acumatica rest api. please tell me.

Sergey Marenich says: Vikas says:

Hi Sergey, I need to create a Invoice using SOAP api. Do you have any sample or references for the same. Thanks in Advance,
Vikas

Sergey Marenich says: Guna Shekar says:

Hi, I am trying to fetch via Postman all sales invoices with status ‘Open’ for Customer ‘ABC’ with all Details like (Document Details (i.e Item details with Item number quantity, UOM and price), TAX, Billing Address and etc). Even though AdHoc SalesInvoice schema is having Details, BillingAddress details, unable to fetch all details and throws error. When I use request without “Details in Expand” I am able to fetch Invoice, but response does not have Item level details, Get – https://www.b2biass.net/acumaticaerp/entity/Default/17.200.001/SalesInvoice?$filter=Status eq ‘Open’ and CustomerID eq ‘AVACUST1’ When I use request with “Details in Expand” as below, I am getting error. Get – https://www.b2biass.net/acumaticaerp/entity/Default/17.200.001/SalesInvoice?$expand=Details&$filter=Status eq ‘Open’ and CustomerID eq ‘AVACUST1’ Response Error – “message”: “An error has occurred.”,
“exceptionMessage”: “Optimization cannot be performed.The following fields cause the error:\r\nDetails.Amount: View Transactions has BQL delegate\r\nDetails.UnitPrice: View Transactions has BQL delegate\r\nDetails.UOM: View Transactions has BQL delegate\r\nDetails.BranchID: View Transactions has BQL delegate\r\nDetails.Description: View Transactions has BQL delegate\r\nDetails.InventoryID: View Transactions has BQL delegate\r\nDetails.LineNbr: View Transactions has BQL delegate\r\nDetails.OrderNbr: View Transactions has BQL delegate\r\nDetails.OrderType: View Transactions has BQL delegate\r\nDetails.Qty: View Transactions has BQL delegate\r\nDetails.ShipmentNbr: View Transactions has BQL delegate\r\n”,
“exceptionType”: “PX.Api.ContractBased.OptimizedExport.CannotOptimizeException”,
“stackTrace”: ” at PX.Api.ContractBased.OptimizedExport.NotWorkingOptimizedExportProvider.get_CanOptimize() in F:\\Bld\\AC-FULL2018R200-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\OptimizedExport\\NotWorkingOptimizedExportProvider.cs:line 84\r\n at PX.Api.ContractBased.EntityService.GetList(ISystemContract systemContract, String version, String name, EntityImpl entity, CbOperationContext operationContext, Boolean ignoreValueFields, PXGraph graph) in F:\\Bld\\AC-FULL2018R200-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\EntityService.cs:line 116\r\n at PX.Api.ContractBased.Soap.SoapFacadeBase.GetListImpl(Entity entity) in F:\\Bld\\AC-FULL2018R200-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\Soap\\SoapFacadeBase.cs:line 83\r\n at PX.Api.ContractBased.SystemContracts.V2.RestController.GetList(String objectName, String select, String filter, String expand, String custom, Nullable`1 skip, Nullable`1 top) in F:\\Bld\\AC-FULL2018R200-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\SystemContracts\\V2\\RestController.cs:line 247\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.c__DisplayClass10.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.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.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.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.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.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.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.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.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.d__1.MoveNext()”
> Looking forward for someone to suggest how to fetch complete Invoice details. Thanks in Advance

Sergey Marenich says:

Hi Guna, please check this article: https://help-2019r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=775ca16b-cba6-4c1d-89d5-c1df7833bfea
Note part: “Usage Notes for Endpoints with Contract Version 3”.
To improve database performance, Acumatica optimize select query and remove all details from the select. In case it can’t be done, it will throw the error you have.
So in your case you “$expand=Details” – brings a problem.
You need to retrieve items in 2 steps – get keys from all records first than get record by record using keys.

Adam says:

How would I make a custom endpoint for a generic inquiry where I need to return the view inquiry info?

Sergey Marenich says:

Hi Adam, you need to create a custom endpoint by extending the default one. There is a button – Extend endpoint.
Than you can add your inquiry to the list of entities. Don’t forget to populate fields.
As soon as that is done, you can use endpoint with PUT method.
Please find more details here: https://openuni.acumatica.com/courses/integration/

Adam says:

I’m having a hard time figuring out the login url. Currently, to get to acumatica from a browser it is “https://mycompany.acumatica.com”. I’ve tried that in postman but I get status 401.

Sergey Marenich says:

Hi Adam. Acumatica instances usually have different URLs, so you need to figure out url of your Acumatica and use it to login thought web services.
http:// /entity/auth/login

Adam says: I figured it out its “https://mycompany.acumatica.com/entity/auth/login” Maulik says:

In exception message
xceptionMessage”: “PX.Data.PXException: Error: ‘Value’ cannot be empty.\r\n —> PX.Data.PXOuterException: Error: Inserting ‘Customer Payment Method Detail’ record raised at least one error. Please review the errors.\r\n at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e)\r\n at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description)\r\n at PX.Data.PXCache`1.PersistInserted(Object row)\r\n at PX.Data.PXCache`1.Persist(PXDBOperation operation)\r\n at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation)\r\n at PX.Data.PXGraph.Persist()\r\n at PX.Objects.AR.CustomerPaymentMethodMaint.Persist()\r\n at PX.Data.PXSave`1.d__2.MoveNext()\r\n at PX.Data.PXAction`1.d__31.MoveNext()\r\n at PX.Data.PXAction`1.d__31.MoveNext()\r\n at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()\r\n How can I get exact exception message like “nserting ‘Customer Payment Method Detail’ record raised at least one error.”

Sergey Marenich says:

Hi Maulik,
There is no build in tool for that, but I guess you can use regExp tool to parse it in parts and than combine back. Unfortunately I don’t have a ready solution for that.

Maulik says: yes I checked it but format in ExceptionMessage is always different Maulik Sakhare says:

yes I checked it but format in ExceptionMessage is always different.
Do you have any idea how I can achieve it?

Sergey Marenich says: Hi Maulik,
Unfortunately there is no tool to parse exception i know about. Really sorry about that. ssp27.bleuciel says: ssp27.bleuciel says:

Can you please help me out to resolve this error? xceptionMessage”: “PX.Data.PXException: Error: ‘Value’ cannot be empty.\r\n —> PX.Data.PXOuterException: Error: Inserting ‘Customer Payment Method Detail’ record raised at least one error. Please review the errors.\r\n at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e)\r\n at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description)\r\n at PX.Data.PXCache`1.PersistInserted(Object row)\r\n at PX.Data.PXCache`1.Persist(PXDBOperation operation)\r\n at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation)\r\n at PX.Data.PXGraph.Persist()\r\n at PX.Objects.AR.CustomerPaymentMethodMaint.Persist()\r\n at PX.Data.PXSave`1.d__2.MoveNext()\r\n at PX.Data.PXAction`1.d__31.MoveNext()\r\n at PX.Data.PXAction`1.d__31.MoveNext()\r\n at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()\r\n

Dafza says: How to post shipment and Invoice using API through Postman? Sergey Marenich says:

Hi Dafza,
I recommend you to check Acumatica Integration training. There is an example of shipment creation. Invoice will be a second call but almost the same:
https://openuni.acumatica.com/courses/integration/i320-web-services-data-manipulation/

Dafza says:

I made an update on the sales order, but only the header that was updated did not go to the grid line .
the method I use at the postman is put for update .

Sergey Marenich says:

Hi Dafza,
Put is correct for update. Please note that to update grid records, you need to specify key of the record. I recommend you to use ID for that. So assign ID (guid) and send it back using Put method.

Dafza says:

how to get an invoice inventory id, I always error while the sales order does not Eror List : “message”: “An error has occurred.”,
“exceptionMessage”: “The given key was not present in the dictionary.”,
“exceptionType”: “System.Collections.Generic.KeyNotFoundException”,
“stackTrace”: ” at System.ThrowHelper.ThrowKeyNotFoundException()\r\n at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n at Microsoft.Data.OData.Query.SyntacticAst.ExpandBinder.GenerateExpandItem(ExpandTermToken tokenIn)\r\n at System.Linq.Enumerable

Sergey Marenich says:

From the error message it looks like you provide a key that does not present in the system.
please note url should be: https://

Post Views: 78,516

Links

Popular Posts:

Recent Posts