All Questions
86 questions
30
votes
5
answers
39k
views
How to create order using REST API?
I need to use the Magento REST API to create an order from a mobile client. In my case, the mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by ...
2
votes
2
answers
3k
views
How to fetch post method xml data in Magento2 controller
We have to implement the punchout concept in magento2.
There is a 3rd party system they will send data using the cXML format to Magento 2 endpoint. We need to fetch that data in the Magento2 & ...
4
votes
1
answer
2k
views
Sign Up With Avatar REST API Validation Error : Magento 2
I have this code for image attribute (avatar).
app/code/Ibnab/CustomerPut/Setup/InstallData.php :
<?php
namespace Ibnab\CustomerPut\Setup;
use Magento\Framework\Module\Setup\Migration;
use ...
3
votes
2
answers
1k
views
Rest API - magento 1.9 - Return 403 Access denied - Magento\Framework\Webapi\Exception::HTTP_FORBIDDEN - format - https://abc.in/api/rest/customers
Error : Rest API for customer return 403 access denied error.
Format : website/rest/api/customer -> 403 access denied error
Magento\Framework\Webapi\Exception::HTTP_FORBIDDEN
8
votes
5
answers
61k
views
Magento 2: How to get order information using REST API?
I want to get order,customer information by using REST API.
Anyone have idea about this?
7
votes
3
answers
12k
views
Get Token Authentication For Customer Logged With Facebook & Twitter : Magento 2
Dears, I created a custom REST API, So customer can login Via facebook and twitter through mobile app. The API consists of one service which take some parameters and email parameter and check if this ...
6
votes
3
answers
13k
views
Develop a mobile app with Magento 2 REST API.?
I couldn't find some needed API functions in Magento 2 REST API Document . I am very doubted. Is it possible to develop a mobile application with current Magento REST API.?
I couldn't find methods to ...
15
votes
3
answers
33k
views
Magento 2 REST API usage with examples
need to call Magento2 rest api in code level how to call default magento REST APIS
0
votes
2
answers
5k
views
Magento 2 Get Value of Custom Attribute on Magento 2 Rest API V1/orders/items
I am trying to get the Custom Attribute I have in the sales_order_item to display on the rest/V1/orders/items API call. I was able to get the Attribute to display on the rest/V1/orders API call. Using ...
14
votes
5
answers
53k
views
Receive Post Parameters In Magento 2 Controller
I am calling HTTP request for controller, I am getting get parameters, but I am not able to receive post parameters in Controller.
Basically I want to call Magento 2 APIs and send customized response ...
9
votes
2
answers
22k
views
How to integrate magento REST API with third party?
I was just trying to find information about REST API. There are some examples at Magento resource and some private blogs. All are the same!!
As basic info, I found if I want to update products through ...
7
votes
5
answers
7k
views
error oauth_problem=signature_invalid for POST
i am using magento rest api for get data and it work very well but when i wanna send data return this error
"messages": {
"error": [
{
"code": 401,
...
7
votes
2
answers
9k
views
Using searchCriteria while searching attributes in magento 2.0
Fetching attribute info, if I apply multiple filters in a single search criteria, it does not work. But in case of single filter it works perfectly.
Multiple filters HTTP request:
http://192.168.1....
7
votes
3
answers
13k
views
Magento2 How to set expiration time for token
I Have generated a token for API calls by using following code :
curl -X POST "http://magento2.ce/rest/V1/integration/customer/token"\
-H "Content-Type:application/json"\
-d '{"username":"john@...
7
votes
2
answers
10k
views
Magento 2 REST API checkout payment gateway redirect
I am creating a Magento 2 store that sells virtual products, this site have its checkout directly at the product page. The customers will never buy more than 1 product at a time.
This checkout uses ...
6
votes
2
answers
10k
views
Create Custom Rest Api in Magento2 and solution for "InvalidArgumentException" error
I started on Magento2 Custom rest API module creation
for that i follow the below post
API Module for Magneto2
url:- http://localhost/magento2a/rest/V1/calculator/add/1/2
app/code/AlanKent/...
6
votes
4
answers
18k
views
How to add product in Magento using REST API?
I want to add a product using the REST API in Magento 2.
How can I achieve this?
5
votes
3
answers
14k
views
How do I create a shipment via REST API?
I'm trying to create a shipment via the REST API. I'm able to edit existing shipments via /rest/V1/shipment, but I can't seem to figure out how to add one. I consistently get a "Could not save ...
3
votes
2
answers
2k
views
How to use token base Rest API?
I have created custom module and also implemented API in that but I want to
know other two ways Auth base and Token base access.
My webapi.xml file:-
<?xml version="1.0"?>
<routes xmlns:xsi=...
3
votes
2
answers
7k
views
Getting 403 Forbidden response with REST API on CE 1.9.1.0
I'm using this link as my model for testing the REST API, and I get all the way through the authorize prompt to a "403 Forbidden" response (this is for both the customer and admin examples).
Invalid ...
0
votes
1
answer
1k
views
Sign Up with Customer Image attribute REST API : Magento 2
I added image attribute in customer create account, edit account in Setup/InstallData.php as following:
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{...
0
votes
1
answer
678
views
Configurable Product Price is 0 in API Response
Dears, Why Configurable products price is always displayed as 0 in rest API response like (sku related to magento 2 sample data):
http://domain.com/index.php/rest/V1/products/MH01
Although it is ...
18
votes
3
answers
6k
views
How to return a JSON object with a custom REST API in Magento 2?
I'm writing a custom REST API demo; now it can return numbers and strings in my demo, but I want it to return a JSON object like other REST APIs.
In my demo, I call the Magento 2 API (i.e. get ...
16
votes
2
answers
18k
views
Magento2 REST Update custom attributes
How can I update the custom attributes such as description?
The following code properly update price and product name, but not custom attributes (unchanged). The new product is created properly with ...
13
votes
1
answer
5k
views
Magento2 Rest API Order Flow
I am making REST API calls to magento website for order placement. Below is the sequence of my calls.
Create a cart rest/V1/guest-carts/
Get the cart rest/V1/guest-carts/...
11
votes
1
answer
6k
views
Magento 2 rest API - How to Manage API Authentication Lifecycle on Mobile Devices Application?
In Magento [2.2.4] web API when I pass username and password then it generates token for that specific customer (Which is only valid for 1 hour - it is configurable from Magento admin)
http://...
9
votes
2
answers
9k
views
How to return Associative Array from API in Magento 2
I have created Custom Api which returns associativeArray.
If I use associativeArray it's giving error
If I use string[] it's working
But I want to return associativeArray.
Error: Class "array" ...
9
votes
2
answers
5k
views
merge guest quote with customer quote(if custommer log in) magento 2 rest api
if 2 items in cart if customer login both item should need to add cart , Both quote (before login & after login) merge and create final quote which contain all item of customer quote
Refference ...
9
votes
4
answers
24k
views
How can I get product list with its detail in rest API I'm on magento2
I'm working on native mobile application and want to display product after customer selected a category. I am able to get list of the product by category in rest request but that list don't have much ...
8
votes
4
answers
31k
views
How do I get a response from REST API in JSON format in Magento 2?
I used the resources in “Creating a New REST Web Service in Magento 2” and “Creating a New REST Web Service in Magento 2” to create a custom API module, but the response is in XML format. I need a ...
8
votes
1
answer
2k
views
Getting started with Magento REST API
So the official documentation is very terse (bad!), particularly for someone who hasn't worked with REST/Oauth in the past. I'm using Magento 1.8.1 CE.
Can somebody provide a simple PHP example of ...
8
votes
3
answers
8k
views
Magento 2 - Construct a HTTP Post REST API
I construct a REST api using POST as follow
etc/webapi.xml
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../...
8
votes
1
answer
632
views
What are the use of ExtensionAttribute JoinProcessorInterface and CollectionProcessorInterface at magento 2.2.3
I built Magento 2 Module which has a model and Service contracts/API.
During this implementation, I have followed vinai Kopp article and also magento2 module Magento_Quote.
On this Magento\Quote\...
6
votes
2
answers
14k
views
How can I generate a full swagger doc for Magento 2 REST API?
I have a fresh Magento 2.1.5 install, and I'd like to access the full swagger spec, like the one published on http://devdocs.magento.com/swagger, but with the Try it Out! buttons enabled.
I've ...
6
votes
5
answers
26k
views
Magento 2: get product through api using id?
I want to get product information using API call. I have product id of that product is it possible to do that.
6
votes
1
answer
6k
views
Get multiple product images using REST API
I'm requesting products list using the following API call GET /V1/products
http://127.0.0.1/magento2github/index.php/rest/default/V1/products?searchCriteria%5BpageSize%5D=100000&searchCriteria%...
5
votes
2
answers
22k
views
Update product using rest api in magento 2
First thing I would like to share is that I am very new to magento. I am working on addition of products using rest api. I tried one product and it was created.
$headers = array('Authorization=> ...
5
votes
1
answer
2k
views
Magento2 how to apply layered navigation filters at REST API Level?
I would like to implement below REST API in magento 2
"How to retrieve which layered navigation filters are applied as like
in the product list page?"
Can you please suggest me how we can ...
5
votes
1
answer
1k
views
Angular JS2 REST API call with Magento 2 headers not send
I try to write code to call Magento 2 API with AngularJS 2
// headers.append('Access-Control-Allow-Origin', '*');
// headers.append('Access-Control-Allow-Headers', 'Content-Type');
// headers.append('...
5
votes
1
answer
1k
views
How to get recently viewed products by Customer Id in Model file Magento 2?
Create Recently Viewed Products for Model file in Magento 2 ?
5
votes
1
answer
5k
views
Invalid Signature - add a product using Magento REST API
i have created AccessToken and AccessTokenSecret as mentioned in the Oauth Rest API Documentation and I am able to retrieve the products using GET Request. But when i try to Create a new product (POST ...
5
votes
3
answers
5k
views
is it possible to create mobile app using the rest api / or soap?
I'm evaluating is it possible to create a mobile app by using the rest api / soap. i've checked the rest api, seems there are some feature are missing in rest api, for example: adding the product into ...
5
votes
2
answers
4k
views
Magento REST API: What populates the api2_acl_attribute Table?
I'm trying to run through the oAuth/REST examples on the Magento website and I'm hitting a snag.
I've successfully created a consumer key and a consumer secret, and used these to fetch an ...
4
votes
3
answers
9k
views
Magento 2 searchCriteria using REST APIs
I have the following query:
$url =
http://kostakfashion.com/rest/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=category_gear&searchCriteria[filter_groups][0][filters][0][...
4
votes
3
answers
9k
views
Magento 1 - How to set HTTP Response Code in Custom REST API
Hi Guys for a project i try to extend the Magento REST API.
I have some problems with my error handling. I don't know how to send the right Http Response Code. I tried it with something like this:
...
4
votes
3
answers
6k
views
Magento 2 REST API PayPal Payment method
I am using REST API to create orders. I would like to know which is the right API call and payload if paypal express checkout is the payment method to process payment and generate invoice.
4
votes
4
answers
4k
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
4
votes
4
answers
6k
views
How to change quantity of product in cart using REST API in magento 2?
How to change quantity of product in cart using REST API in magento 2?
How can i change quantity of product listed in cart of magento 2 using api call ? (without changing order of items)
4
votes
1
answer
9k
views
POSTMAN rest and Magento-rest with Oath
POSTMAN rest client with magento REST api with Oauth.
How to get Token and Token Secret?
Magento REST API, how i will get token and token secret to be fill in Postman REST request. I have only ...
4
votes
4
answers
7k
views
Magento2: How to get shipping address for order in REST API?
I can't seem to find a way to get the shipping address for an order though the REST API. Does anyone have an idea?