Questions tagged [webapi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
27 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
62 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
65 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
22 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
8 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
24 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
0answers
42 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
165 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
46 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
167 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
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
161 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 ...
5
votes
1answer
75 views

Magento 2 : How to create custom webapi?

I am fresher in magento2, How to implement webapi in custom extension in magento2? Thanks in advance.
3
votes
2answers
491 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
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
2
votes
0answers
115 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 ...
9
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
3answers
1k 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
338 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
42 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
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) ...
1
vote
1answer
124 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 ...
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 ...
1
vote
0answers
85 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
110 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
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 ...
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"> &...
0
votes
0answers
40 views

Magento 2.1 Getting web API error while placing the order

Internal Error. Details are available in Magento log file. Report ID: webapi-5c29c5a5d3bf9 I have been getting above error while placing the order. But I can't access var/report/api, there isn't any ...
0
votes
0answers
60 views

Is Instant Purchase REST API available in Magento 2?

The new Instant Purchase feature provides returning customers with a faster checkout experience by using previously-stored payment credentials and shipping information to skip checkout steps. When ...
0
votes
0answers
61 views

Checkout create issue after Upgradation in Magento 2.2.6

I have an error in checkout page after Upgradation of Magento from 2.2.2 to 2.2.6. This is working fine in Magento 2.2.2. Because of this error shipping methods are not show and loader is ...
2
votes
1answer
654 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
682 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
210 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
31 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
293 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
111 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 ...
4
votes
2answers
756 views

Get customer details by using Authentication Token

I use this Magento 2 rest api to get customer token: curl -X POST "https://my.project/rest/V1/integration/customer/token" \ -H "Content-Type:application/json" \ -d "{"username":"me@awesome....
3
votes
2answers
393 views

Magento2 need to throw 500 internal server error in webapi response

Can anyone let me know how to throw 500 internal error in api response with REST API? i have used below right now: throw new NoSuchEntityException( __( 'Field : '.$fields.' required.' )); but it ...
2
votes
1answer
183 views

Magento2 Rest API reset password with different store id getting default email template

I am using Rest API to reset password of customer, i have already passed websiteId for different store but when i am getting reset password email, it is coming of default store not the store i have ...
2
votes
0answers
53 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
149 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
132 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\...