Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

How to get same products from rest api as are visible on frontend?

We would like to use REST API for mobile application where should be the same products as we have on frontend. There are this conditions (params) website ID (or store ID) we have multisite show ...
0
votes
1answer
2k views

Magento 1.9 REST API Callback

so I just set up my M1.9 store, and want to set up a REST API. I wanted to test it out by retrieving a list of products. I only don't know what to put in the callbackurl field, online they say the ...
0
votes
1answer
1k views

Magento 2 API get product price

I'm building an iOS application for my store, and I'm looking for a way to get the correct price of an actual product. Looking at the API I only find requests to get raw product information. http://...
3
votes
1answer
712 views

Getting all attributes of products does not work in Magento2

I want to create custom API module that will return the same thing as: /V1/products REST API endpoint. In order to do that I created the following custom endpoint: public function __construct( ...
1
vote
1answer
855 views

REST Api Products response not showing extension attributes

I am making following REST API call to get product list, response for this API has extension_attributes tag, but in response these tags are missing. V1/products?searchCriteria[filter_groups][0][...
3
votes
1answer
808 views

Magento 2 V1/search

I am not able to understand the what the api V1/search does. For example - http://localhost:8080/magento/index.php/rest/V1/search?searchCriteria[requestName]=catalog_view_container&...
1
vote
0answers
54 views

Unable to log into a customer account created via the Rest API

I create customer through rest api. But I am not able to login that customer. But customer registered on site can login to magento site. Can you help me to solve this.
0
votes
1answer
203 views

REST API Not saving products Magento2

Using the REST api of M2 and for some reason I can't save a new product ? Here's my code Here's the error I get. Any suggestions?
3
votes
1answer
110 views

What's the difference between _create() and _multiCreate() in the REST API methods?

I am trying to extend the Magento's REST to have my own set of API. I looked through the code and figured that there are _create(), _multiCreate(), update(), etc... What's the difference between ...
3
votes
1answer
848 views

Magento2 REST auth help needed

I'm hanging on this issues for nearly a week and cannot find any sollution. I'm trying to send a REST request to my new Magento2 store. It worked allready, but then the oauth/token forced ...
3
votes
2answers
11k views

Magento 2 : Rest Api For Customer Login

I am creating an app for Magento 2 but there is no any API for a customer to check if user/customer is authenticated or not. Followed : http://devdocs.magento.com/swagger/index.html#/ But there is ...
0
votes
1answer
65 views

create an action anytime an order is canceled

For instance, i'm trying to send an API call when an order is cancelled. Shouldn't this work? /** * Cancel order */ public function cancelAction() { if ($order = $this->...
12
votes
3answers
6k 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/...
0
votes
4answers
2k views

How to call magento2 SOAP or REST API outside magento2?

I am using below code to call the API but its showing error: $request = new SoapClient( 'http://magento2-dev.local/index.php/soap/? wsdl&services=foggylineSliderSlideRepositoryV1', array( ...
1
vote
1answer
744 views

Magento 2 Customer Api Custom Attribute

I have added a custom attribute say child_first_name to customer entity. When I try to access through rest API, I can able to get the attribute in the result- snip.. { "custom_attributes": [ ...
1
vote
0answers
333 views

REST API correct error handling

I'm migrating a bunch of xmlrpc API code from magento1 to the rest API in magento two, and was wondering if anyone knew the correct way to return API errors. Previously we would've been throwing a ...
4
votes
2answers
2k views

Magento 2: How to create new customer cart via rest API?

I want to place an order for a customer from API. Currently, I do: Login as integration (OAuth). Create customer Create customer cart (or take an existing one). Remove all items from the cart. Add ...
0
votes
0answers
24 views

Sales OrderController.php moved to my app > local folder and added some custom code

THE ORIGINAL IS STILL IN PLACE. I'm writing a custom module stored in (local folder) and API (restful api) and i need to know in admin when an ordered is cancelled manually through Sales > Orders. ...
3
votes
1answer
2k views

Can't PUT customer in Rest Api Magento2 - fails to complete

How do you PUT (update) a customer using the rest api? I have a ticket open on github, but I was wondering if I'm just doing this wrong.. https://github.com/magento/magento2/issues/5115 I've ...
3
votes
1answer
4k views

Invalid auth/bad request. Magento rest api

I followed http://devdocs.magento.com/guides/m1x/api/rest/authentication/oauth_configuration.html I am able to login to "My first application" with admin. But not with customer. I got $_SESSION ...
1
vote
0answers
1k views

Magento 2: Default REST API unable to update product data to multiple stores

I've been having some issues with saving product data to multiple stores. In any case...... to my plan of attack: First I put in a before plugin to change the current store: (with hard coded store ...
4
votes
1answer
3k views

Magento 2 automatically appends form key at the end of my ajax call

I am trying to use jquery to perform ajax call to a magento rest api from a custom backend (admin) module. For some reason, every time I perform ajax call, the query parameter isAjax=true ...
6
votes
3answers
13k 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
1answer
1k views

REST API authorization errors with POST requests only

I've set up a REST API client (using Ruby) and Magento 1.9.1 back in 2015 and it worked flawlessly. But a few weeks ago I noticed that every once in a while a got an exception: Integrity constraint ...
4
votes
2answers
4k views

Magento2 - Updating a list of stock items using REST (batch update)

I have built a custom module that will save a single stock item via REST API (similar to what is already available) - however, how would this be done with multiple stock items within the same request (...
1
vote
1answer
401 views

Can't update my product name, PUT REST CALL

I've some problems with updating the name of my product. I'm using the REST CALL API. Here's the PHP Code Here's the error I'm using the PUT REST CAll from product repository, to update the name ...
1
vote
1answer
579 views

/rest/V1/products filtering by price and special price

I am using the Rest API to query for products. When I set the order by to "price" it orders everything properly while also taking into account currently active special prices. My issue is that when ...
4
votes
0answers
28 views

How to configure REST without edit the controls manually?

Hello I am developing an extension for magento that adds a new call to the REST API. This call must be accessible to everyone so by now the guest user must be configured manually to allow him use this ...
2
votes
1answer
4k views

Magento 2 Product Custom Attribute in API rest

I added a product custom attribute (type text) through the admin interface. Now I'm trying to save a product through the api rest but if I include the new attribute in the data passed I get this ...
2
votes
0answers
125 views

curl and json approve conversion Rest API

i'm currently coding a little api for extole approve conversion api. It's only suppose to send data on declined orders which is equal to cancelled in the magento admin. Here is what i have written ...
1
vote
2answers
2k views

Speeding up the Magento REST/SOAP API

We have been using Magento's REST/SOAP apis on version 1.7.0.2 and it is far from being performant for us. We constantly experience timeouts even with WSDL cache turned on especially if large data ...
1
vote
1answer
423 views

How can i set a name or custom attribute for a specific storeview through REST API?

How can i set a name or custom attribute for a specific storeview through REST API? Adding a product hroug POST /V1/products it seems like it only sets the Name/Label for the default storeview and ...
5
votes
1answer
2k views

Using searchCriteria with condition_type operators “from” and “to” in Magento 2.0

I'm trying to use the Get Orders API with searchCriteria to filter Orders with base_subtotal range between two values. But I have only been able to use the lt and gt. I'm unable to use both in the ...
1
vote
2answers
695 views

Problem with condition types in the Magento 2 REST API

I'm trying to use the REST API in Magento 2 to get orders created after a certain date. But it seems as though everytime I try to use any condition other than "eq", it fails with the following error ...
4
votes
2answers
10k views

magento2: Creating custom Rest API POST method

I know how to create APIs with GET method, wondering how to create custom REST API with POST Method ??.. I have spend enough time into core module but didn't get anything from there(May be I am not ...
0
votes
1answer
428 views

how do i generate waybill using third party API when click on place order button in magento?

how do i generate waybill using third party API when each order placed, for example if place an order by click on place order button i need to generate a waybill for this order. how to do this?
2
votes
1answer
640 views

Sorting issue while getting product from category ID using REST Api

I am reviewing Magento 2 REST API. I am trying to get all the products from its category ID using below API: GET /V1/categories/:categoryId/products Some how I am unable to get product details (...
2
votes
3answers
5k views

How to create Rest API for the Magento 1.9 hosted in local machine

I have followed the below steps for authentication for REST API http://inchoo.net/magento/configure-magento-rest-and-oauth-settings/ Then I have tried to access this link http://127.0.0.2/magento/...
5
votes
1answer
3k views

Display Out of Stock Configuration not working in magento1.9

I have a configurable product with 3 simple products associated to it that were added via REST. I have set the "Display Out of Stock Products" option in System->Configuration->Inventory to "Yes" ...
2
votes
2answers
2k views

magento2 make image base via REST API

How can I make an image of a product the base image ? I tought setting the position would be enough but that's not true. I create my products via the REST api , this works fine. The images are ...
0
votes
2answers
2k views

Need Help To Connect Magento Rest Api using curl

I would like to use cURL to get all orders using rest API. Can I use cURL instead of Oath. I tried with cURL but returns 403 Forbidden. I have tried with below code : $params = array( "...
2
votes
1answer
2k views

Caching / invalidating cached responses to Magento 2's REST API?

I'm using Magento 2 as something of "commerce engine" for a project I'm working on, which means extending and accessing a lot of Magento's functionality via REST API. To speed things up I intend to ...
1
vote
1answer
1k views

How to post product with image on REST API?

I'm trying to post an image to a product, but on post I dont know where exactly to put it. Should I put on custom_attributes as when I get it on GET ? Didn't have success, even using image, ...
3
votes
1answer
4k views

REST API - categories by store view code

I'm using Magento 2 and try to consume my categories by calling the REST API via /categories. How can I achieve it, to get the categories by an given store view code? Do I have to extend the api by ...
1
vote
1answer
3k views

How to get current cart items for logged in user

Following is my code:- try { $store = $this->_getStore(); Mage::app()->setCurrentStore($store->getId()); $customer_ID = 3; $customer = Mage::...
2
votes
4answers
5k views

Magento2 REST api authentication returns 'Decoding error'

I am trying to authenticate via token based authentication. I am using 'Advanced REST client' extension in chrome to test the API. this is my request http://local.nomo/index.php/rest/V1/integration/...
1
vote
2answers
667 views

Rest api url and data format issue

First of my Guest controller code for a rest api call is as followed: protected function _retrieveCollection() { try { $email = $this->getRequest()->getParams('email'); ...
3
votes
1answer
721 views

Magento 2 REST API Authorization failed while creating product

I am trying to create a simple product using REST Api. The client is a node.js script, I have created an admin user with access to all the resources, and used the credentials to request a token which ...
2
votes
1answer
4k views

How to retrieve products from magento REST API?

I'm new to the REST api concept, after hitting the url- http://magentohost/api/rest/products I can see the products, means can access the product resource through guest user. Then I have created the ...
0
votes
1answer
693 views

Carts in Magento2 REST API and Front-end

I was able to sign in using /rest/V1/integration/customer/token and add items to cart. How do I view the cart(items I added using REST API) from front-end?

1 10 11 12 13 14 16