Questions tagged [webapi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
21 views

Magento2 - How to get estimate shipping rates for guest users using js?

I have followd this link to get estimate shipping rates, its working fine for logged in user. But I need to implement this with guest user as well. I have changed service url for guest user as ...
1
vote
0answers
18 views

How can I add a custom Middleware for header validation in Rest API?

I have added 2 new Web APIs for the customer, but I want to add a new HTTP Header authentication with parallel to Authorization token. My customer header is AppToken. How can I add a middleware to ...
0
votes
0answers
19 views

How to get customer details from REST API customer Login Token?

I am getting customer token after hitting login rest API. I have a requirement in which I want to login the customer in web by using the Token got from rest API. Is there any possible way to do ...
1
vote
0answers
26 views

How to correctly use “self” resource in Magento 2 webapi.xml

I have created some endpoints in a module that have a resource of "self" When I call the request using a jQuery ($.post) I get an Not allowed to accesses resource "self". These requests are done on ...
4
votes
2answers
67 views

Magento 2.3.3 Getting issue in custom module GraphQL

I would like to create custom GraphQL for a custom module. but I am facing an issue. see below GraphQL response. In the above image, you can see I am able to get the response of days and **details** ...
0
votes
1answer
12 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 ...
0
votes
0answers
32 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
25 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
29 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
157 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.
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 ...
0
votes
0answers
47 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 ...
1
vote
0answers
106 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
1answer
77 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 ...
4
votes
0answers
25 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
8 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
26 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
90 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 ...
0
votes
2answers
314 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' => '[{...}]' ]; ...
1
vote
1answer
50 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
1answer
310 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: { "...
0
votes
0answers
12 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
202 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 ...
6
votes
1answer
96 views

Magento 2 : How to create custom webapi?

How to implement web API in custom extension in magento2?
3
votes
2answers
772 views

How to 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 can I do that ? interface ProductsInterface { /** * Returns greeting message to user * ...
1
vote
0answers
26 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
2
votes
0answers
145 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 ...
11
votes
2answers
6k 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
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:...
1
vote
1answer
444 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
52 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 ...
2
votes
0answers
41 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) ...
1
vote
1answer
130 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 ...
7
votes
1answer
4k 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 ...
1
vote
0answers
96 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){ ...
2
votes
0answers
131 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 @...
1
vote
2answers
2k 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 ...
0
votes
1answer
2k 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
805 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. ...
3
votes
1answer
834 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
246 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 ...
0
votes
0answers
34 views

Magento2 Rest api without any module

I am new to Magento and I am having an issue with the use of the rest API. I see some blogs/tutorials on the Internet where they create modules to use the web API. Also in magento2 API doc, they tell ...
0
votes
1answer
353 views

Magento 2 Service Contracts and WebApi

I have implemented the Magento 2 Service Contracts, everything is working as expected, I can use my repository's getById and getList in Controller but as we know we can use Service Contracts for ...
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?
1
vote
1answer
129 views

Magento 2: How can I do an integration with magento 2 and sap business one?

i want to create a integration with magento 2 and SAP B1, I created a web application in magento 2 I gave it a name and I gave it permission to API and it was saved then create a new role, assign the ...