Questions tagged [webapi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
0
votes
1answer
11 views

Magento 2.2.2 Custom Api

I have created a custom api and add some getters and setter, I'm looking to find out if it's possible to pass key pair values in the post without having to set the setters. When I call the api I get ...
6
votes
1answer
89 views

Magento 2 : How to create custom webapi?

How to implement web API in custom extension in magento2?
6
votes
1answer
3k views

Magento2.2.5 How to access Magento Log file for Web API?

we use the Magento api to update our warehouse system when we recieve orders and then update magento again with inventory updates from our warehouse system. However we recently had an order that gave ...
0
votes
0answers
31 views

Deprecation of REST APIs?

We are exploring different approaches for Magento integration (V2.3.3) with a storefront hosted on a third party CMS. We've come across 2 different approaches for this; REST based APIs GraphQL As ...
0
votes
1answer
21 views

How to override vendor/Magento/Module-customer/etc/webapi.xml

To prevent spammers to create accounts in Magento 2.2.4. I want to change resource ref= in vendor/Magento/Module-customer/etc/webapi.xml How can I override this core xml ??
0
votes
1answer
26 views

Indexer configured as update on save, get triggered after an update through web api?

Documentation says: Configure indexers Use this command to set the following indexer options: Update on save (realtime): Indexed data is updated as soon as a change is made in the Admin. (...
2
votes
1answer
66 views

Magento 2: Running any command getting error Class Magento\Webapi\Model\Cache\Type\Web Api\Interceptor does not exist

Running any command s:up , s:di:c s:s:d -f cache getting error Class Magento\Webapi\Model\Cache\Type\WebApi\Interceptor does not exist And like below images, any help will be appreciate.
1
vote
1answer
67 views

Magento 2 how to receive a webhook body?

I'm doing an integration with a system called Sift Science. What I need to accomplish is to receive a response whenever someone in Sift Science performs an action (for example> Approve account, ban ...
1
vote
1answer
127 views

Magento 2.3 - Need detail about some newly introduced feature

I need to know about some of the newly introduced featured of Magento 2.3 GraphQL Declarative DB Schema Asynchronous and Bulk Web API There are few blogs information but not elaborating properly. I ...
10
votes
2answers
5k views

Consumer “async.operations.all” skipped as required connection “amqp” is not configured. Unknown connection name amqp

Since I upgraded from Magento 2.2.7 to Magento 2.3.1 I am getting this message in the system.log file: main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not ...
2
votes
1answer
714 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 ...
2
votes
1answer
753 views

where to find Magento 2 API docs?

Finally I found out the magento 2 api endpoint for all products as below rest/V1/products?searchCriteria[pageSize]=20 but I need more detailed docs about api endpoints which I coudn't find out yet. ...
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 '...
0
votes
1answer
52 views

API url for instant purchase in magento 2.2.6

I am new for Magento and want to create REST API of instant purchase functionality for mobile application using Magento version 2.2.6. I have configured instant purchase option for site and it's ...
38
votes
8answers
4k views

What is Progressive Web Apps, or PWAs in Magento 2?

What does it mean that Magento is becoming a Progressive Web Application platform? What will be the code structure of PWAs in Magento? What is the deal with REST APIs and PWAs?
3
votes
2answers
639 views

pass multiple parameter to rest web API

i have created a rest web api. i want to pass multiple parameters to get my required data.How is could be. interface ProductsInterface { /** * Returns greeting message to user * * @...
1
vote
0answers
88 views

Magento 2 - How to configure REST API?

I want to create REST API in Magento 2.3.2 for Mobile Application but I have few confusions regarding REST API. Can anyone guide me on this, please? Is there any quick start or say ready-made API ...
0
votes
0answers
38 views

JSON Serialize DateTime in Web API

A lot of my Web API interfaces use DateTime return types or parameters as follows. interface TestInterface { /** * @param \DateTime $value * @return void */ public function ...
0
votes
1answer
74 views

How to set Rest API oAuth token expire in minutes or seconds

How to set Rest API oAuth token expire in minutes or seconds in admin. Currently it's showing hours and it will not accept like 0.5(for 30 minute etc) magento2. Any One know about this, please help me ...
1
vote
0answers
27 views

Saving only one field from REST web API

Alright, I am just not getting my head around it. Trying to save the only title of existing CMS Page from web API, but looks when I do that all other fields are gone null. I am using postman: PUT ...
1
vote
0answers
193 views

Error during rate request at Dhl/Express/Webservice/Soap/RateServiceAdapter.php:77

I have upgraded magento 2.2.4 to 2.3.2. After upgrade version we have enabled MSI modules. After Enabling MSI modules we are getting below error when we try to create shipment. We are not able to ...
4
votes
0answers
24 views

Magento 2 : How to change in order status and order id for display purpose in custom POS

We have Custom POS system enabled on the website. Like to append some labels in the order id and order current status for the display purpose only in the POS system not for the website(frontend) ...
1
vote
0answers
9 views

Authorization on webapi

I have built a custom webapi endpoind with which a customer can get details of their personalised item. <route url="/V1/personalizations/get/:personalizationId" method="GET"> <...
1
vote
0answers
9 views

Best practices for webapi data manipulation

I am building a custom subscription module. I have exposed a number of APIs for the frontend to consume. I have the API hooked into standard repository endpoints: public function getList(\Magento\...
1
vote
0answers
7 views

Web API interface theory

I am writing a frontend that lists some custom data. It calls an endpoint /rest/v1/custom/get that hooks into my CustomListInterface defined in the webapi.xml, this then returns a list of records in a ...
1
vote
0answers
25 views

Magento 2: Adding Extra Parameters to Exception

I need to return error codes instead of messages in the exception. For example, what I am looking for is below throw new \Magento\Framework\Exception\LocalizedException(__("number is incorrect"),"...
1
vote
1answer
261 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( ...
0
votes
2answers
257 views

Magento 2 WebAPI json encode

I'm returning JSON via an endpoint in Magento 2 this bit of JSON looks like the following: $new_json = [ 'component_1' => '[{....}]', 'component_2' => '[{...}]' ]; ...
0
votes
1answer
238 views

MAGENTO 2 REST API: PUT through POSTMAN [Resolved]

I'm trying a PUT on Magento 2 REST API through POSTMAN like this: https://domain/rest/V1/products/IP_X With only a price change on the json content. getting the following error message: { "...
1
vote
1answer
48 views

Magento 2.2.6 : Shipment creation using REST API

Unable to create shipment in Magento 2.2.6 I am using the following source code like this in postman https://test.com/rest/V1/shipment { "entity" : { "order_id" : 70, "items" : [{ "order_item_id" ...
0
votes
0answers
11 views

Magento 2 : Share with friends rest api

How to create an API to share a product (via email, facebook, twitter etc) in Magento2 for mobile application
0
votes
1answer
22 views

How to Create Token based Router in Magento2?

I want to create Custom API through controller action. How i can authenticate using token to make secure API. Example: http://www.example.com/webapiv1/getItems http://www.example.com/webapiv1/...
1
vote
0answers
25 views

Magento 2x web rest api: Anyone can tell me about endpoint to get order status from store configuration?

I wonder if there is endpoint to get orderstatus by using api in magento 2x. As I check there is issue that created since 2016 but closed because report in github link
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'" : { ...
2
votes
0answers
133 views

custom_attributes not returning from Magento 2 REST API

Using the Magento 2 REST API, I was able to successfully create a new product attribute sending a PUT request to V1/products/attributes/{attribute_code}. In the request, I added a value in the ...
0
votes
0answers
30 views

How to get direct OAuth based access as a third party app?

I was going through the API docs and couldn't find a step-by-step procedure for our use-case. I need to integrate Magento on our SaaS app dashboard for our customers who use magento. So basically, I ...
2
votes
3answers
2k views

Request does not match any route issue in magento 2

I have creating a extension for get cms static block content using rest api. di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
396 views

How to call Web API call inside custom module Magento 2

How can we call Web API in a custom module? I have a third party module, in which they are sending a request with API calls. I have custom functionality where I have to redirect my page to that Web ...
1
vote
0answers
46 views

Headless Magento

Please let me know the best practices to be followed while creating an e-commerce solution which uses the headless approach. Whether Magento or frontend-side need to implement custom business logic ...
1
vote
2answers
1k views

How to create custom API for company and customer creation in Magento 2

I want to create a company/company admin-user in Magento 2 (as what it does from the front-end/back-end panel) via a single API call. Right now am doing with two API calls First is creating a ...
2
votes
0answers
40 views

Magento 2.2 - Custom WEBAPI - Custom JSON Structure

i need to understand following situation: An external systems need to send a JSON Structure ( nearly similar than the magento default structure ) by using the web-api to import / update (POST/PULL) ...
5
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
0answers
95 views

How to create REST API for customer profile update?

Since, I have worked with magento get method api calls but yet didn't work on post or put method. I am trying to update customers to update their profile in mobile app. public function update($id){ ...
3
votes
1answer
305 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 ...
2
votes
0answers
121 views

Magento 2: Is there a way to return custom json response from REST API without building a data interface?

I have a few custom REST API interfaces on my module & they all need to return a standard json response (different on each). After a little research, I realized that I can't do something like @...
0
votes
1answer
1k views

Create product attribute with options in magento2 through rest API

I have created a custom module to create product attribute with option thruogh rest Api. Here is my code samples. etc/webapi.xml <route url="/V1/attribute/attributeCreate" method="POST"> &...
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
3
votes
1answer
773 views

How get wishlist in Magento 2 Rest API?

Get Wishlist product in Magento 2 REST API ? And Add to Wishlist in Magento 2 REST API ? Wishlist API is not provided by Magento 2
0
votes
1answer
226 views

Create configurable product using rest api magento 2.2.6

I am new to Magento 2 and learning Rest API. I was trying to create configurable products using Rest API but I am not getting fully success. I am able to create a configurable product and simple ...