Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rest]

Denotes questions related to the REST API on Magento

23
votes
4answers
14k views

Magento 2 - Create order using REST API

I need to use the Magento REST API to create an order from a mobile client. In my case, mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by ...
17
votes
0answers
3k views

Not able to get OAuth token for Magento Rest API Client

I am using Magento version 1.9.1.0 and server running on my mac and trying to use Magento Rest APIs using OAuth Integration. I have a consumer key and consumer secret. Now, I want to get OAuth token ...
16
votes
0answers
13k views

REST API returns 404 [closed]

I am using magento community edition 1.9.0.1. I try the REST Client Example explained here: http://www.magentocommerce.com/api/rest/testing_rest_resources.html But every time I send a request I got a ...
14
votes
3answers
2k 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 ...
13
votes
1answer
3k 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/...
12
votes
3answers
5k views

Magento 2 Rest Api get Thumbnail Image url

How do we get the url to thumbnail image of of a product through rest API. /V1/products/{sku}/media would get us the relative url such as "/m/b/mb01-blue-0.jpg" and the image url would be baseurl/...
11
votes
3answers
11k views

Magento2 REST API Error 'Class does not exist'

I've created a test Magento 2.0.2 REST web service based on Alan's blog: http://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ I'm using Postman to call the custom web service ...
10
votes
2answers
1k views

Magento redirects to Homepage when i search for products Using REST tokens

I have searched for the products like this localhost/api/rest/products But it is directly redirecting to Homepage of localhost. I have generated all the keys and tokens and i tried this also: 127.0....
10
votes
3answers
4k views

REST API Update Product HTTP Method PUT or POST?

The REST API documentation says that PUT /V1/products/{sku} creates rather than updates. Is that an error in the docs because I would have assumed that it is an update method and POST being the ...
9
votes
2answers
9k views

Magento 2 REST API usage with examples

need to call Magento2 rest api in code level how to call default magento REST APIS
9
votes
4answers
16k 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 ...
9
votes
2answers
20k views

How to integrate magento REST API with third party?

I was just trying to finding information about REST API. There are some examples at magento resource and some private blogs. All are same!! As basic info I found if I want to update products through ...
9
votes
0answers
905 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 ...
8
votes
1answer
2k views

High-loaded service. Soap vs Rest

I have a task to make an api for Magento using it's SOAP or REST implementation. I've read a lot about both services, also have experience with them. But not in high-loaded projects. The task of ...
8
votes
2answers
6k views

Magento 2 Api Getting Error '%fieldName is a required field'?

I am not getting result (id) while using POST method using url is rest/V1/hello/test/3 Screenshot: I have followed this link For Reference Please Click Here 1) webapi.xml <?xml version="1.0"...
8
votes
2answers
6k 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 ...
8
votes
1answer
5k views

Magento 2: How shipping rest api function called On Checkout?

When u click on "Ship here" on Checkout Page it calls magento/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id Then it goes to below JS files magento\vendor\magento\module-...
8
votes
1answer
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
1answer
464 views

What is the recommended page size for GETting sales orders through REST API calls?

I am trying to make a GET call to the Magento 2 REST API to get all the sales orders. What is the recommended page size I should be using? Is there any upper limit on the page size?
8
votes
1answer
970 views

REST api call for Guest user

Developing android native application using scribe library, and uses Rest based web services from existing Magento based eCommerce platform. I have got prerequisite requirement like 'Key' and 'Secret'...
8
votes
0answers
528 views

Magento 2: Creating configurable product using the REST API

In order to create configurable product I need to create configurable product, virtual product and finally connect them. Example of json request got from here: How do I create a configurable product ...
7
votes
4answers
18k 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 ...
7
votes
2answers
16k 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 ...
7
votes
4answers
4k 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
2answers
1k views

Add category image with REST

Has anyone successfully uploaded an image for use with a category? When going through the documentation @ http://devdocs.magento.com/swagger/index.html#/ I don't see any implementation that could ...
7
votes
2answers
6k 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
1answer
2k views

Can anybody share android app code for magento REST api

I wanted sample android application which uses magento RESTful services ..so that i can browse all the products , catalog , customers , checkout and etc.
6
votes
3answers
1k views

How to get CustomerId in API in magento 2? and how magento gets customerId for the same?

Magento didn't load the customer session in API as used in web session based authentications. and i am aware about the API <magento.host>/rest/V1/customers/me My question is, how do I make ...
6
votes
2answers
7k views

Magento2: Get all orders using REST API?

I want to get all orders using REST Api. I am using this code but it's not returning any result. Request: $this->get('rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=entity_id')...
6
votes
1answer
4k views

How to pass data to update Order tracking number in magento 2 using REST API?

I am passing data to update tracking code : $userData = [ "entity" => [ "paymentStatusId" => 10 "orderStatusId" => 8 "tracking_code" => "...
6
votes
3answers
4k 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
1answer
4k views

How do I create a configurable product using the REST API v2?

I am trying to create a configurable product called "Kudos Configurable" with options for the user to select from small green, large green, small orange and large orange. I have got to the stage ...
6
votes
2answers
7k 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
2answers
4k 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
1answer
701 views

RESTful service calls

I am doing an android application which uses Magento as a back end processing system. Now i can display the products in XML format once the user clicks on the product image. Which restful service call ...
6
votes
1answer
145 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
1answer
2k views

How to implement create, update, delete in magento rest api?

How to set methods in api2.xml I create _create(), _retrieve() , _update(), _delete(), _retrieveCollection() functions in Module/Model/Api2/Test/Rest/Guest/V1.php I think its manage in /app/code/...
6
votes
1answer
123 views

Products are not showing When i search through REST client plugin

This is the XML content I got when I search in the browser/REST client Firefox plugin... <magento_api> <data_item/> <data_item/> <data_item/> <data_item/>...
5
votes
3answers
5k views

How to add a new address (shipping or billing or another) via Magento 2 REST API?

There are API's available to fetch and delete address of a customer but not create a new one. GET /V1/customers/addresses/:addressId GET /V1/customers/me/billingAddress GET /V1/customers/:...
5
votes
3answers
4k 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 ...
5
votes
3answers
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
1answer
4k views

Magento 2: How to authorize REST API call of customer after login?

I am using rest API to login in customer account usig the below URL and details: URL: https://magento.host/index.php/rest/V1/integration/customer/token Header: "Content-Type:application/json" Data: "{...
5
votes
3answers
11k 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
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" ...
5
votes
3answers
4k views

Magento 2 requesting external REST API

I want to call a 3rd party REST API within Magento 2. Is there any class to handle the HTTP requests and responses for that?
5
votes
1answer
3k views

Magento 2 rest api - get orders with products' custom attributes

I would like to have the proper cURL command for getting all pending orders with the products' custom attributes in Magento 2 REST API. I use this, but there are no custom attributes on the products ...
5
votes
2answers
3k 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 ...
5
votes
1answer
93 views

Do I need to add shipping address every time whenever I place a new order in Magento 2 REST API?

STEP 1 - Using REST API I created a customer,And in address data I passed default shipping and billing true "defaultShipping": true, "defaultBilling": true, STEP 2 - In GET customer detail API ...
5
votes
1answer
480 views

How to capture the User ID using magento's customer Token?

How do I make a call to that URL that captures the User ID, using Magento customer Token in magento 2 rest API? How Magento 2 makes calls in-between for the APIs ?
5
votes
2answers
1k views

Getting value through javascript and REST api

The problem actually is defined in two steps: 1. How to define a REST Api which returns an array? 2. How to use that REST Api through javascript? Description: What I have done but not achieved ...