36 votes
Accepted

Magento2 REST API Error 'Class does not exist'

A DocBlock is required in app/code/Test/Calculator/Api/CalculatorInterface.php as described here: http://devdocs.magento.com/guides/v2.0/coding-standards/docblock-standard-general.html <?php ...
Matthew's user avatar
  • 950
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
11 votes

Webservicex giving wrong EUR:USD conversion

There does seem to be an issue with the WebserviceX currency conversion service. I've knocked together an extension that integrates with the fixer.io service, which can act as an alternative: https://...
mustdobetter'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
7 votes
Accepted

How to access Magento SOAP WSDL

SOAP V1: http://magentohost/index.php/api/soap/?wsdl (this one is more like RPC, no concrete operations defined in WSDL, just call) SOAP V2: http://magentohost/index.php/api/v2_soap?wsdl=1 . For ...
Alex Paliarush's user avatar
5 votes

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

You can configure the whole HTTP response with the response object from a controller: $this->getResponse() ->clearHeaders() ->setHeader('HTTP/1.0', YOUR_STATUS_CODE, true) ->...
Dani Garval's user avatar
5 votes
Accepted

Webservicex giving wrong EUR:USD conversion

It's because of an error on webservicex website. Check this link: http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=EUR&ToCurrency=USD It shows "-1" as response, seems ...
vsushkov's user avatar
  • 168
5 votes
Accepted

On Magento2, is it better to declare Interfaces on Api/Data before create Model and Ressource?

With service contracts usage (API interfaces), it will be possible to expose custom module functionality as web API just by adding config etc/webapi.xml. Improved capabilities for integration with 3rd ...
Alex Paliarush'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

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.7k
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
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,546
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,096
3 votes

Currency Rate not importing from Webservicex in magento 2

WebserviceX has been down for some time now. Its API is now returning a -1 for all currency conversions. You can test it here if you want: http://www.webservicex.net/CurrencyConvertor.asmx/...
Raphael at Digital Pianism's user avatar
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.2k
2 votes
Accepted

API SOAP V2 CatalogProductList Complex Filter with OR

For in complex filter you must specify value in coma separated format (without spaces): value = '34,37'.
Alex Paliarush's user avatar
2 votes

Currency Rate not importing from Webservicex in magento 2

Fixer.io as additional currency converter service has been added into Magento2.
Arkadii Chyzhov's user avatar
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.2k
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.7k
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
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
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
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

"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

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