Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
0
votes
1answer
490 views

Magento REST API - Unable to Login using buyer username and password

We are trying to use the REST API for building a Mobile App. I'm able to retrieve the product list using following URL /api/rest/products as a guest. However if i try to retrieve the product list as ...
4
votes
1answer
832 views

Magento 2 Api Integration

Hello I'm trying to use magento 2 Rest and Soap integrations when I try to activate my integration I get the error Unable to post data to consumer due to an unexpected error these are my current ...
2
votes
1answer
4k views

Magento 2 Rest API - How to add custom option to Cart Item?

I am using Magento 2 default quoteCartItem restful APIs to add, delete and update items in cart. Things are working as expected. GET /V1/carts/{cartId}/items POST /V1/carts/{cartId}/items DELETE /V1/...
1
vote
0answers
29 views

Doubts regarding creating Magento Mobile App

We are planning to create a mobile app for our magento web application. However i'm bit confused on where to start from. We have decided to use the magento REST API Now my doubts are Are there ...
1
vote
1answer
532 views

Limit REST API access to specific store view

I am looking for a way to limit the access for specific REST users/roles to specific stores. I am aware that I can pass a /store/storeid parameter for a GET products call, but I can´t use that with ...
4
votes
1answer
472 views

Differences between Magento 1 and Magento 2 REST API?

What's the difference between endpoints and integrations? My main question is for basic things like products, orders and customers, but also like an overview.
2
votes
0answers
366 views

Magento 2 Customer Attribute in REST Order API

I have added a new custom attribute for order in sales_order table. It contains a value for the order. I have added extension_attributes.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
5
votes
1answer
983 views

Magento SOAP API call limit?

Is there a limit on API calls using Magento's SOAP API (V1)? The product page for a store I'm working on requires several calls to the "cataloginventory_stock_item.list" method, once for every "simple ...
1
vote
0answers
108 views

Magento 2 code to get Magento 1 product detail via rest api

I would like to use Magento 1 rest api to get the product details in Magento 2. Can anybody help me out on magento 2 code for getting the product details from magento 1. http://devdocs.magento.com/...
3
votes
0answers
80 views

How does a REST API URL look like without rewrites?

Magento ships a rewrite for from /api/rest to api.php?type=rest. In case I can not or don't want to use that rewrite, how would I have to change a rest URL such as /api/rest/orders ? api.php/orders?...
2
votes
1answer
117 views

Can Magento 2 handle REST updates from a Multi-threaded application?

I have a question regarding Magento 2's REST API. We've developed an integration between a CounterPoint Database and a Magento 2 website. One of the bottlenecks in performance is updating product ...
3
votes
1answer
3k 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="../../../../../...
3
votes
0answers
591 views

How to get images of products in cart using rest API

Doing a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" will give: [ { "item_id": 129, "sku": "24-UG05", "qty": 1, "name": "Go-Get'r Pushup Grips", "price": ...
0
votes
0answers
461 views

Checkout experience via REST API Magento2 - how to setup quote_currency

Here is the the situation: I created the entire checkout flow using APIs (created empty cart, add products to cart, set shipping/billing address, shipping info, payment info and converting quote to ...
1
vote
0answers
5k views

REST API is deprecated for versions v2.1 and higher (12)

In the last days i got this error on my magento. Problems are on my checkout/onepage that returning to cart instead of success. I saw that it can be a facebook problem with the upgrade (after 7th aug ...
3
votes
1answer
3k views

Swagger UI not working in Magento2: json schema not found

I'm trying to view the cool interactive Swagger UI on my own running Magento 2.1 instance. When I go to https://example.com/swagger it shows the swagger header, but under it is an error message: Can'...
0
votes
1answer
1k views

Magento Rest Api Error

I have created a shopping site in magento now I would like to set up its mobile app using REST API. To set up, In the backend, I created an admin REST Role named “programmer” with all api resource ...
1
vote
0answers
107 views

How to create REST API in magento after configuring REST Roles , OAuth Consumers and Users with that role?

I am not that much aware of API. I have created REST Roles and OAuth Consumers. After that i have created New user and assign that role to that user. I know that I need to create one php or xml file. ...
0
votes
1answer
133 views

Magento Rest Api from Consumer key not found

I am requesting magento Rest api from my test file by appending consumer key and secret but after user login and authorization it shows consumer key not exist/found. I am passing consumer key as $_GET ...
2
votes
1answer
301 views

What is the REST API call to create a product with the image already hosted on a CDN

Background: All of our product images are hosted on Amazon S3. Magento is going to be hosted in a load balance / multiple instance Docker setup. The hosting environment is only going to provide the ...
1
vote
1answer
656 views

Magento REST API Errors

I would like to create mobile app for my magento site for that I have created REST consumer and I got consumer key and consumer secrete.. Then I create rest.php file inside rootdirectory/api/rest. ...
2
votes
2answers
534 views

How to get response from api?

I want to get response from API. function curlExec($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); ...
4
votes
1answer
787 views

REST API PayPal does not call setExpressCheckout method

When making orders through REST API and selecting payment method paypal_express there is issue with invalid token. 1) Create guest cart through REST API: Send POST request to http://example.com/...
4
votes
1answer
1k views

Magento 2 REST api for guest cart - display product in Magento's checkout

I have an Ember app that handles adding to basket via the REST API. I then want to jump back into Magento's front end for the checkout process, however the cart is empty. Is there a way to pass a ...
0
votes
1answer
42 views

Create Magento Rest API

I have a shopping site in Magento now I would like to create its app in iOS and android mobile phone.So I need to create rest apis in Magento.. How I will do this.. I am new to this..
0
votes
1answer
539 views

Magento2 rest api get customer details and cart details as a admin authorization

Magento2 rest api. If i am login as a admin user how can i get details of customer and it's cart items (items kept in cart for order later).
2
votes
1answer
1k views

How to override Magento 2 REST API Product Search Results for Custom Attributes?

Magento 2 REST API returns product search results (V1/products) for custom attributes in the following way by default (exemplary product): { ... "custom_attributes": [ { "attribute_code"...
3
votes
1answer
2k views

Magento 2 call external REST api

I am trying to call external api from Magento. Below is the request, $client = $this->_httpClientFactory->create(); $client->setUri('thirdpartyurl.com/api/'); $client->setMethod(\...
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
810 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
692 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
756 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
687 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
188 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
101 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
817 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 ...
2
votes
2answers
9k 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
63 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
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/...
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
674 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
318 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. ...
2
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
986 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 ...
3
votes
1answer
2k 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 ...