Is anyone using VB.Net to access the Acumatica contract based REST API? I really need some help getting started. I am experienced in VB.Net, but new to Acumatica and I am a little overwhelmed by all of the documentation. I just want to start with something simple ... for example, log into Acumatica, get a list of stock parts & log out. Does anyone have any VB.Net code they would be willing to share? Or maybe a tutorial you could point me to? I spent a few hours looking through a lot of documentation but could not seem to find what I was looking for to get me started. I would appreciate any help you can provide. Thanks in advance...
I wrote a PHP binding for the Acumatica REST APIs. Some of the criticisms above are somewhat valid...it's a little unique as APIs go, and not very well documented. That's why to get started... you will want to get Postman: https://www.postman.com/
In Postman, setup a POST request to http://youracumsticaurl/entity/auth/login
Use JSON body with your user/pass/company details:
{
"name" : "admin",
"password" : "yourpass",
"company" : "Company name full text",
"locale" : "en-US"
}
for company....use the full text of the company in the tenant...not the id.
Next with Postman do a simple get request for an item:
http://localhost/Acumatica2021R2/entity/Default/20.200.001/StockItem/someitemid
...where "someitemid" is a valid stock item id
Once you get that far, you can start using Postman to write your VB.NET API calls. Here is some info on calling a REST web service with VB.NET: https://dotnetco.de/setup-post-rest-webservice-asp-net-vb-net/
It takes some messing around but the REST API works pretty well once you get your calls setup correctly. I login and logout on every call, which is probably not best practice but avoids some of the session management headaches with cookies and Acumatica. YMMV with that depending on use case and call volume.
I use the rest api client available on the Acumatica github site. (link below)
I'm using C# in my project, but there's no reason you couldn't use this library with vb.net.
I had to update the library to add custom fields and custom endpoints which would require you update the code in C#, but if you just want the base endpoints it should work fine.
https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp
Related
I have few questions concerning PayPal and Classic API. I have spent the last few days reading and experimenting with 1. Single PayPal Payment using variables and HTML post form. 2. Idem but for recurring/subscription payments. Even though I almost succeed to do most of what I want to accomplish, I still have few questions and grey zone I'd like to debunk.
Here it is:
Is it possible to use classic API, HTML form, PayPal variables and post a request to PayPal/Sandbox AND ONLY use credit card information, without having to log in PayPal or have a PayPal account? I never succeed and PayPal always block after you hit the PAY button, returning security codes error message or wrong card/account number etc.
If yes, how and where can I find a real code sample or demo for HTML/MVC-C#?
After a make a payment, I receive an invalid response which nothing happens, then, I receive a second IPN response and this one is verified etc. DO I really need to reply to PayPal/Sandbox to tell them everything is OK? If yes, is there info somewhere or code sample/demo I can see? MY point here is because i receive MANY hits on my IPN and I want to make sure I get the right response, make sure i don't DOUBLE subscribe etc..
Is there A GOOD MVC or C# IPN code sample somewhere? One I could read and analyse/take to handle most possible scenarios/errors/response code and what to do with them? not to copy and paste but something reliable I could adapt to my code.
I have succeeded to get a response to my IPN with a PayPal account only and I had to somehow hack security protocol using this instruction --> ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;//SecurityProtocolType.Tls1.2; and I also had to use ngrok to provide a 'valid' return URL. My question here is, Do I Need to remove that instruction when I go PROD?
Thank you so much in advance,
Mart.
Yes, but this is one of the reasons the question got voted down. You need to sign up for Payments Pro to do credit cards (or you could also use the REST API) and then you would use those specific APIs to process credit cards. The thing is, depending on what version of Pro you end up with or if you decide to go with REST, the APIs are different, so it's hard for anybody to tell you what to use at this point.
Yes, you need to POST back to PayPal to verify that the data actually came from them. This way you can trash any data where wannabe hackers are posting garbage to your IPN listener or anything else like that going on.
As long as your IPN script completes with a successful 200 response back from your server then PayPal will only send a single IPN. If you're getting multiples you must have a failure going on, in which case you'll need to troubleshoot that accordingly.
Yes, PayPal provides lots of sample code. This is another reason your question may have been voted down. It seems you have not taken the time to look into this stuff yourself. Go to http://developer.paypal.com and upon reviewing the APIs you'll find they provide SDKs for different languages. Each of those comes with samples, and their GitHub repos also include samples.
With a quick Google search you'll find loads of tutorials and samples as well, of course.
Within the developer site you'll also find the Integration Wizard, which will let you choose C#, choose the payment integration you want, and it will build it all for you so you can see how it works.
Then, when working on those samples or trying actual code, if you have specific problems / questions, you'd come here and post that specific issue with a code sample that you've tried. Then people here will be happy to help.
TLS 1.2 is a standard requirement for pretty much all web services now because of security vulnerabilities in SSLv3. If you have "hack" anything (outside of configuration files, maybe) then you're probably doing something unnecessary. All it would require is to ensure the software stack on your server not only supports TLS 1.2 HTTP requests, but also uses it by default.
I'm currently developing a C# API that connects to MAL for developing clients applications.
My problem is that currently I'm using the REST API of MAL documented in this page: http://myanimelist.net/modules.php?go=api#animevalues
Everything there function wonderfully, but my problem is that with only that services I cannot query about a user anime list or manga list. Neither for their score, progression, etc of their anime/manga.
My question is that I'm wrong and that info can be obtain with that API?
I know that I can access a user animelist (or mangalist) like: http://myanimelist.net/animelist/ and parse the content to obtain the info. But I was wondering if I can get that info with the REST API that is more robust (not as weak to changes in the page as parsing the html).
Thanks
It seems odd that the API does not appear to have this capability, but I also couldn’t find any information on it.
What you can use however is the following URL:
http://myanimelist.net/malappinfo.php?u=<username>
Apart from the username, it accepts a type parameter to query either the anime or manga list. There appears to be also a status parameter, but I have no idea how that works.
I also just found this thread on the topic.
I am using SugarCRM v.6.5.16
Soap: http://{CRM Path}/service/v4_1/soap.php
I have been tasked to create a program that reads values from a JSON string to input into SugarCRM.
The object creation of Account, Contact, Opportunity etc. is working just fine. I am however unable to the the set_realtionship or set_realationships from the SOAP API to work.
If possible could someone give me a quick example of how to make this work.
I have found very little documentation regarding coding in C# and SugarCRM SOAP functions. I can directly insert into the 'link' table but would prefer to utilize the API since somebody took the time to write it.
If REST would work better than SOAP an example of that would also be useful.
Thanks
It is with sights for the future recommended by Sugar to use REST. Advantages are that REST is faster than SOAP and REST will live longer in the product SugarCRM.
Hi I am trying to create a store locator and I am trying to get the user to input their location manually and then convert that into latitude and longitude without use of googles API due to the restrictions of it T&C and I have come across this piece of code will this do what I need it to do and if it doesn't is there a way I can use this to get what I want.
This code is c# and and i got it from this link http://code.google.com/p/geocoding-net/
IGeoCoder geoCoder = new GoogleGeoCoder("my-api-key");
Address[] addresses = geoCoder.GeoCode("123 Main St");
The reasons why I ask is because I don't have much experience within C# I just need someone to maybe point me in the right direction I just a little help from someone to you need to look into this or an example to work off I don't mind learning new code I'm just not sure what I'm looking for to get this to work.
Looking at your 2 previous questions1and 2 you have PHP available. This means you will probably have MySQL available as well.
You can use the zipcode/postcode of the user along with a database of these codes. These databases are available for most contries either free or for a fee.
This code doesn't do what I needed it to do because you still need to use someones API which is not what I wanted but it does work if you use googles API or someone elses API. im just wondering if anybody knows how to do this manually using javascript or c# or ajax without having to use an api to get it to work
I'd like to make some simple calls to Yahoo Query Language (YQL). Has anyone implemented this in .NET?
Here is the query I'd like to make from .NET:
select MarketCapitalization
from yahoo.finance.quotes
where symbol
in ("YHOO","AAPL","GOOG","MSFT","unknown")
Update
Everything is working 100%, thanks #fernaramburu.
Yes. There two good examples that are actually working because I just tested some hours ago...
http://jarloo.com/get-yahoo-finance-api-data-via-yql/
and
http://jarloo.com/code/get-historical-stock-data/
Hope this help! It helps me a lot!
Not really an example, but a complete .NET library is Yahoo! Finance Managed.
A description for using the lib can you find here.
To access the YQL Web Service, a Web application can call HTTP GET, passing the YQL statement as a URL parameter...
Then WebRequest would be your friend.
You can find tons of information how to make GET calls to a webservice on the net.
Or are you talking about a LINQ-Provider?
There is a complete example (with downloadable .NET source code) here:
http://andy.edinborough.org/C-OAuth-Implementation/
This example implements OAuth to let you take advantage of the higher usage limit of 100,000 requests / day and 10,000 requests / hour.
To create an OAuth key, see So, you want to use some Yahoo! APIs.
The code won't work without a minor change: replace the query for pizza with "show tables".
Update:
YQL didn't work with without appending the following string to the query:
&env=http%3A%2F%2Fdatatables.org%2Falltables.env
The full query string is:
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22MSFT%22%29&diagnostics=true&env=http%3A%2F%2Fdatatables.org%2Falltables.env
To obtain a full query URL from a YQL query:
Browse to the Yahoo YQL query console.
Create a query, e.g. select * from yahoo.finance.quotes where symbol in ("MSFT")
On the base of the page, there is a section under "The Rest Query". Copy this. This URL will work in any browser (or any desktop app that uses YQL).
Modify the C# source to append the string &env=http%3A%2F%2Fdatatables.org%2Falltables.env to the url within the two overloaded QueryYahoo functions.