Skip to main content
15 votes

Magento2 REST API Error 'Class does not exist'

In my case problem was that I used "use" clausule in interface. Magento DocBlockReflection could not handle that and was searching for interface without full namespace. So for example in bellow code: ...
Maciej Pieprzyk's user avatar
7 votes
Accepted

How to log all rest api calls in magento2?

[This may not be a good way to log the Rest API] We should try with Plugin - Magento\Webapi\Controller\Rest::dispatch(): app/code/Vendor/WebApiLog/etc/frontend/di.xml <?xml version="1.0"?> &...
Khoa TruongDinh's user avatar
5 votes

Magento2 REST API Error 'Class does not exist'

Here's the checklist if you struggling with same issue: Service interfaces should be in Api folder. Dto interfaces should be in Api/Data folder. All interface methods should be type hinted. (Argument ...
Artem Y's user avatar
  • 151
5 votes
Accepted

Magento 2.2.5- SOAP-ERROR Parsing WSDL

I tried the SOAP Web Services on my local host and it was working fine. The reason why the Magento 2 was not able to give a response to the request was because it was not able to verify SSL ...
Usman Yousaf's user avatar
5 votes

How to log all rest api calls in magento2?

You can use the following FOSS module: https://github.com/vladflonta/magento2-webapi-log
Alex's user avatar
  • 13.9k
4 votes
Accepted

getting data from external webservice

To access external webservice, you can use Zend HTTP Client class, using the below code: protected $_httpClientFactory; public function __construct( \Magento\Framework\HTTP\ZendClientFactory $...
Pankaj Pareek's user avatar
3 votes

Magento 1.x API V/s Magento 2.x API

The API has been rewritten for Magento 2. It is no longer held in separate classes. Instead, already existing classes are used to fulfill the functionality of the API. This way there is no code ...
Arjun's user avatar
  • 3,586
3 votes
Accepted

Magento 2: How can I store my original REST request in a file on the server?

Serializing the object will most likely serialize the entire PHP Object. That's the reason why you end up with a massive file. You only want to log the payload from that request. I've wrote a module ...
Giel Berkers's user avatar
  • 12.3k
3 votes

Magento 1 - How to set HTTP Response Code in Custom REST API

I am using the following approach please suggest me If I am using the wrong approach? Included following class in my custom namespace use Magento\Framework\Exception\InputException; use Magento\...
Manish's user avatar
  • 3,116
2 votes
Accepted

Magento 2 API vs. Web Interface vs. Web API

In this particular statement, API refers to service contracts. It is different than web APIs. A service contract is a set of PHP interfaces that are defined for a module. A service contract ...
Raphael at Digital Pianism's user avatar
2 votes

Magento2 REST API Error 'Class does not exist'

Make sure below command executed successfully. Don't interrupt or hit any API call. After execution your issue will be resolved. Worked for me. php bin/magento setup:di:compile
L-Board's user avatar
  • 21
2 votes

Adding new order field to API response: /V1/orders/:id without using extension_attributes

The intended mechanism by which to add attributes to existing models is via the extension_attributes mechanism. It take some work to set up, but this exposes the data consistently throughout the API (...
Ryan Hoerr's user avatar
  • 12.3k
2 votes

Magento 1.x API V/s Magento 2.x API

From my experience, Magento 2 APIs are totally different from Magento 1 version. And, more flexible than M1. Magento 2 API docs: http://devdocs.magento.com/swagger/index.html http://devdocs.magento....
Khoa TruongDinh's user avatar
2 votes

Magento 1.x API V/s Magento 2.x API

Magento2 have absolutely different implementation than in M1, so it fully incompatible. See official documentation for more details
KAndy's user avatar
  • 20.9k
2 votes
Accepted

Magento 2. Does Commerce offers more functionality than Open Source in term of Web APIs?

AFAIK, Core WebAPI Structure for both Magento 2 Commerce and Magento 2 open Source is same but Magento 2 Commerce is more optimized in terms of scalability, security. All the Modules that are ...
Pankaj Pareek's user avatar
2 votes
Accepted

Magento2: Web service Call POST method

I checked with above data but the credit usage exceeds for that user account, I tried with the new account it's working, please find the curl call below, $ch = curl_init(); $url = "http://api....
Jeeva Chezhiyan's user avatar
2 votes

"Web services" menu is missing

I've fixed this problem. Got to the "app\etc\modules" Find files Mage_Api.xml Mage_Api2.xml Mage_Oauth.xml In these files, you need to change false to true rebuild Magento cache
Serhii Kozachuk's user avatar
2 votes
Accepted

Magento2 - rest API on custom module "items" object is not populated

as mentioned in the comments, the @return annotations to the getList function were Magento\Framework\Api\SearchResultsInterface. Creating a new interface extending from SearchResultsInterface as ...
grll's user avatar
  • 143
2 votes
Accepted

Call to the “Get_Item_Quantity” function in the web service (trying to call soap api using magento restful services)

I believe you already created a custom Rest API and the only missing piece of the puzzle is API call. Although I have added all steps to create a custom API as well. This is how I am calling SOAP API ...
kamlesh.bar's user avatar
1 vote
Accepted

Sending order XML to web service

I guess you could have a look and try to use the SimpleXMLElement object to build your xml. Here is an example public function ExportSales() { //A collection of orders $...
diazwatson's user avatar
  • 2,440
1 vote
Accepted

Magento2 : Web services Parsing Json Data

You need to json_decode: class Service extends \Magento\Framework\App\Action\Action { /** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\...
kunj's user avatar
  • 3,699
1 vote
Accepted

Magento2: Web service Get method not able to Call properly

Try this: <?php namespace Autosynch\synchProduct\Controller\Page; use Magento\Framework\HTTP\Client\Curl; class Service extends \Magento\Framework\App\Action\Action { /** * @param ...
kunj's user avatar
  • 3,699
1 vote

Magento 2: Calling Restful Web service GET and POST

Here we have 2 action item here. You are using "demo" username to call the webservice which is already crossed the maximum limit. Either you need to subscribe for that webserice ( as a paid serice ) ...
Thamo's user avatar
  • 436
1 vote
Accepted

Magento 2: Calling Restful Web service GET and POST

You can create a custom module and use curl in your controller action to call this URL and Fetch response body Curl Example (Sharing the required fragments of the file) use Magento\Framework\HTTP\...
Vishwas Bhatnagar's user avatar
1 vote
Accepted

How to connect ERP to magento store via Soap?

Endpoint: http://(your host)/api/soap/?wsdl Endpoint v2: http://(your host)/api/v2_soap/?wsdl Use soap call login to generate session $session = $client->login('apiUser', 'apiKey'); then you ...
Vladimir Samsonov's user avatar
1 vote
Accepted

Integrate SimplyPost with Magento store

I manage write an custom module to connect SimplyPost with Magento via RESTful API. I Just wanna share the code. Check Github to find the complete source. 1- app/code/local/Mymodule/Simplypost/etc/...
batMask's user avatar
  • 136
1 vote
Accepted

Magento2 : Where do I start and what do I need?

In your case, it's better to use observer. In your case, you should use observer catalog_product_save_after. So now: Create a new module, let's say Vendor_Module. I assume you know how to create a ...
PY Yick's user avatar
  • 2,705
1 vote
Accepted

Can Magento talk directly to an ERP?

As far as I know, out of the box Magento can't push data to any ERP system. You need an integration for that. That is either a magento module built for your ERP of choice (usually provided for free ...
Andrei's user avatar
  • 797
1 vote

How to log all rest api calls in magento2?

You can also check this light weight API logging module https://github.com/mosesdinakaran/magento-log It has the below features Able to log all the API logs Able to log logged in users API calls ...
Moses Dinakaran's user avatar
1 vote

How to log all rest api calls in magento2?

Check this out, under MIT license: https://github.com/ghostunicorns/module-webapi-logs
Danilo Argentiero's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible