Questions tagged [webapi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
58 views

Magento2 SOAP with C#

I am trying to read Magento customer from a C# third-party software. When I enter SOAP into the browser, its throwing error. URL:- http://localhost:81/magento2-2.2.5/soap/default?wsdl&...
2
votes
1answer
161 views

profile API call

I enable profiler SetEnv MAGE_PROFILER html in my conf file for magento 2. Is there an easy way to profile Magento 2 API REST calls.
2
votes
0answers
134 views

How to get window.checkoutConfig data via REST API?

I am building a custom frontend for Magento 2 Checkout. Sometimes the checkout uses window.checkoutConfigin the built-in frontend. My frontend uses the REST API provided by Magento 2, but how can I ...
2
votes
1answer
1k views

How to override webapi.xml in custom module?

I want to override /vendor/magento/module-catalog/etc/webapi.xml file in my custom module. <route url="/V1/categories" method="GET"> <service class="Magento\Catalog\Api\...
1
vote
0answers
18 views

Change response to Order IncrementId

In Magento2, I have tried below code and getting response is Order EntityId. http://localhost/pin/rest/V1/guest-carts/7775f2214c7e42e4b7a6d2e53dea34bc/order { "...
1
vote
0answers
39 views

Magento2: In which file gets a response as order entity Id in order API?

I have placed an order using default order APIs in Magento2, In which file gets a response as order entity Id? And need to change the order API response.
4
votes
0answers
341 views

How to update custom order status through custom Api using order id in Magento2?

I have created custom Api to update order status by using Order Id. I have used the below code in webapi.xml file. <route url="/V1/orderstatus/orderUpdate" method="POST"> <service class="...
2
votes
1answer
2k views

SOAP-ERROR: Parsing WSDL: Couldn't load from URL Failed to load External Entity

I'm trying to get all products in $productArrarray from magento 2 API via SOAP client. I tried the below function but it throws this error: Error: SOAP-ERROR: Parsing WSDL: Couldn't load from '...
2
votes
1answer
2k views

Oauth 2.0 in Magento 2.2 with how to access the token

Can please give example to access the magento 2 api by using oauth 2
2
votes
1answer
33 views

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

Does Magento 2 Commerce offer something in addition to what M2 Open Source offers in terms of Web APIs?
3
votes
1answer
309 views

Magento 1 vs Magento 2. Difference between solutions offered by Magento 1 and Magento 2 when is comes to web APIs

Specific on the area of web APIs. Does Magento 2 offer something that Magento 1 does not. Are there any problems with Magento 1 Web APIs that Magento 2 has fixed What are the main differences between ...
0
votes
1answer
531 views

get current customer's cart items count in Magento 2

I want the current customer's cart items count via custom web api in Magento 2. Please help me out to get that
1
vote
1answer
739 views

Set Join in SearchCriteria select

I need to override the get orders list API call, and set a join with my custom table, but without loose the SearchCriteria terms, is this possible? Current Code: (I've created a plugin in Magento\...
2
votes
1answer
401 views

<parameter name=“customerId” force=“true”> in customer module webapi.xml

In Magento2 module-customer webapi.xml file, the API GET "/V1/customers/me" has codes below: <route url="/V1/customers/me" method="GET"> <service class="Magento\Customer\Api\...
1
vote
1answer
173 views

Return string from webapi gives an unwanted extra character

I am using a webapi observer. In the model, I am requiring a legacy file that echo a well-formed XML for SOAP communication. However, Magento2 echo the result of the Model method, and it does it ...
1
vote
0answers
88 views

Admin User unable to access webapi

currently developing web application that utilizes magento's customer / admin tokens (magento 2). I am trying to access my custom webapi with resource assigned as "self" using an admin user with a ...
1
vote
0answers
15 views

Is It possible if I will not add product in Magento2 database?

Is It possible if I will not add product in Magento2 database , or maybe add product ID attribute for identify the existence in Magento2 system only but I will call API to get product from third party ...
3
votes
0answers
77 views

A list of the possible web api shipping method codes for the salesOrderRepositoryV1 GET? [closed]

I am using Magento 2.1.0 web api system to extract new orders from my Magento store and then place them into a 3rd party accounting system. I would like to know what are all of the possible responses ...
1
vote
1answer
262 views

How to Integrate Custom Shipping method in magento2

I need to integrate Aramex Shipping method in magento 2, I have php sample code form Aramex. <?php $params = array( 'ClientInfo' => array( ...
1
vote
1answer
191 views

How to structured data in custom WebAPI?

I have created custom webapi using https://www.demacmedia.com/extending-magento-2-rest-web-api/ This is the code that I am using: <?php namespace Panda\WebService\Model\Resource; use Panda\...
15
votes
2answers
4k views

How to create custom Module Development in magento 2 from Scratch?

How to create Custom Module Development from scratch in magento 2 with following point. 1.How to Create Module 2.How to Install and Upgrade Database 3.How to Create Module,view and Controller ...
2
votes
1answer
1k views

“Undefined index: interface” error from Magento 2 swagger webapi

I'm getting the following error when loading the swagger routes: Undefined index: interface in /mnt/c/develop/php/mage2/vendor/magento/module-webapi/Model/AbstractSchemaGenerator.php on line 156 {"...
1
vote
0answers
224 views

Override default model webapi output magento2

I've began creating a module for a rest api for creditmemos - which I intend on using as an alternative to the built in version. At the moment I've started the normal way for creating a webapi module,...
1
vote
0answers
355 views

Magento 2 soap API 404

I am trying to load the url: http://magento2.dev/index.php/api/v2_soap?wsdl=1 in the browser but gives me 404. Additionally I using SoapUI Software and gives me error too. Error loading [http://...
1
vote
0answers
189 views

oauth_problem=Consumer+key+has+expired

Hello Magento Community, I am trying to integrate the Magento Rest API in my App. But while doing the OAuth authentication for request token I am getting error as Consumer Key has Expired. I have ...
1
vote
1answer
81 views

Where is webapi.xsd located

I have been trying to access a REST API end point that results in a 404 Not Found. I have come across documentation that explains the endpoints have to be configured in the webapi.xsd file. I have ...
2
votes
1answer
499 views

Magento 2 - Session based authentication doesn't work

I don't know if this is a bug in Magento 2 API or not, so I didn't post it on Magento 2 Github issues. According to this link: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-...
1
vote
1answer
589 views

Unit test case for custom module REST API

I wanted to write unit test case for custom REST API in magento2. I have already gone through the : http://devdocs.magento.com/guides/v2.0/get-started/web-api-functional-testing.html I am getting ...
8
votes
3answers
10k views

Magento 2: How to return a JSON object from the API?

I'm trying to return a JSON object from one of my REST Models, something like this: { "settings": { "set1" : 2, "set2" : "key1" }, "extra": { "e1'" : { ...
6
votes
1answer
1k views

Best practice for returning errors in WebApi

So let's say I have a model, responding to my webapi calls, whats the best way to return an error to the api consumer. For example, in the code below, the second line query the category factory (di-ed)...
2
votes
1answer
719 views

Restricting access to anonymous web APIs

As given in the documentation here : http://devdocs.magento.com/guides/v2.0/rest/anonymous-api-security.html By default magento 2 only restrict Catalog, Store and CMS API from anonymous users. In a ...
1
vote
1answer
819 views

Extending Magento2 API

I have a very weird problem when trying to extend Magento2 API, I followed all the right steps, however im getting this syntax error when calling http://appfactory.loc/index.php/rest/V1/appfactory/...
6
votes
1answer
1k views

How do I consume the REST API in Magento 2, using AJAX with session-based authentication?

I am having issues successfully making an AJAX call to Magento 2 REST API endpoints, using session-based authentication. When I run the following javascript, I always receive a 401 (Not Authorized) ...
1
vote
1answer
529 views

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

I need to store my REST request within the file system - I have tried serializing the request object, but obviously the file size is quite a lot larger than the original. I have run a test that ...
2
votes
1answer
4k views

Get list of ALL customers using REST API

I know I can get a specific customer by running: curl -X GET "http://127.0.0.1:32769/index.php/rest/V1/customers/2" -H "Authorization: Bearer token" How do I get the list of ALL customers?.. GET "...
2
votes
1answer
1k views

class [] does not exist for custom extension_attributes over webapi

I created a custom module to store the details of discount per items. I have a custom tables to store informations (quote items, order items, invoice items), and I use a extension attributes to link ...
1
vote
1answer
2k views

How to add cutom customer attribute field to call rest api via create new customer

I have created a custom customer attribute(mobile_number) and set default value of customer create account. I added mobile number to customer_attribute: $customerSetup->addAttribute(Customer::...
1
vote
0answers
254 views

magento2 webapi authorization for admin users

In Magento 2.1.5 I cannot use webapi when I am logged in as admin user. I found this problem on my regular install and verified with a freh one: install magento 2.1.5 from composer repository log-in ...
8
votes
3answers
2k views

Magento2: How to check if request is from Web Service?

In Magento 1, We used to check as: if (Mage::getSingleton('api/server')->getAdapter() != null) { // request from Web-Service } How to check the same in Magento2? I didn't find any proper ...
5
votes
3answers
2k views

Magento 2 : Can the REST API return plain text?

I'm trying to make an endpoint for the Magento 2 Web API that simply returns plain text. Is this possible and if so, how? I'm currently trying this: webapi.xml: <route url="/V1/export/txt" ...
3
votes
2answers
1k views

Magento 2 : Social Login via Rest Api

I need to create a user account using social network via the API. I have created via native iOS application that hooks into magento 2 store API. However, I can not find a way to create an account ...
1
vote
1answer
366 views

Magento 2 - WebApi /rest/V1/products/MY_SKU to create a new product error

I'm having troubles to PUT a product using the WebApi of M2 Im using this JSON: { "product": { "sku": "MY_SKU", "name": "My Product", "price": 20, "typeId": "simple", ...
4
votes
1answer
3k views

Magento 2 Customer login and forgot Password using Rest API

I need customer login and customer forgot password using Magento 2 API. Can you please help me. I was search but not getting any code from google.
2
votes
1answer
274 views

Unable to update custom column value of sales_order via Rest API

I want to trace records of all the completed orders which has been received from my Magento store to my ERP store through Rest API. I have created custom column through SQL query in sales_order so ...
1
vote
1answer
903 views

Geting the available quantity for all products via REST API

How can I get the available quantity for all products via REST API?. Do I have to create a new module for this? What is the most efficient way to achieve this?
2
votes
0answers
77 views

How to implement paypal using Web Api on Magento2?

I am developing a mobile app using Magento2 Web Api. I am wondering how to implement Paypal for my mobile app. What versions of Paypal (express, etc.), is it used as an offline payment method?, do I ...
8
votes
2answers
6k views

How to disable/enable a product programatically in Magento2?

I am trying to emulate the same behavior as when you use the admin panel to disable a product. I am trying to do something like this: $product = $this->productRepository->get($sku); $product-&...