Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
1
vote
1answer
374 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
622 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
8k 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
405 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
532 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
4k 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/...
4
votes
1answer
3k views

Display Out of Stock Configuration not working

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
1k 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
3k 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
2k 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
3answers
4k 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
627 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
605 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
601 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?
5
votes
0answers
235 views

How to use REST API for mobile App?

I have found on dev docs that REST API is recommended for mobile application. I have created integration from magento admin panel and tried to access resources with passing access token in header. ...
2
votes
0answers
269 views

Observing REST API requests from 3rd party

I would like to know if there are any API events that are fired when a third party API sends a request to Magento? For example, if a 3rd party makes a call to salesOrderShipmentCreate() method app/...
2
votes
3answers
5k 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 ...
2
votes
1answer
408 views

Why doesn't the cart contain any items when called from REST?

According to the rest api, calling /V1/carts/mine should return json with { "id": 11, "created_at": "2016-04-05 12:02:58", ... "items": [ { "itemId": 0, "sku": "string", .....
5
votes
4answers
2k views

Need REST api for “Add to Wishlist” in Magento 2

I want REST api for "Add to Wishlist" in Magento 2, and also need to know in which folder to place and the endpoint
2
votes
1answer
2k views

How to handle multi level array as input parameter from custom POST webservice in Magento2

We have request to create custom REST webservice for creating gift orders and we are successfully able to create order for single item but facing issues on taking multi items as input. Can anyone ...
11
votes
3answers
12k 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 ...
0
votes
1answer
735 views

Return a 304 HTTP response from within a REST API method?

In a custom REST API endpoint method, returning the object promised in the service class interface will generate a 200 OK response. Additionally, I can return a specific HTTP error code by throwing an ...
0
votes
1answer
830 views

Magento 2 - How to disable access Rest API Default

How to disable access permission Rest API default? Such as I can view all product attribute information by: http://localhost/magento/rest/V1/products/attributes/status { "is_wysiwyg_enabled": ...
0
votes
1answer
355 views

magento 2 rest api variable type

I created web api and trying to validate entered data ":postcode". Here is code in etc/webapi.xml <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
652 views

Magento 2 - Between “Rest” and “Soap”, Which is better then one?

Between "Rest" and "Soap" API, Which is better then one ? I have some cases below: 1) Apply for mobile app call web-service. 2) Apply for desktop app call web-service. 3) Apply for web app call web-...
0
votes
1answer
603 views

Curl error : name lookup timed out

I'm working on a custom shipping method linked with an external REST API. When the seller submits a shipment, an API call is done in order to reserve a shipping course for our carriers. The problem ...
1
vote
1answer
1k views

REST search for category with custom attribute?

Is it possible to search for a category by a custom attribute? I have added a custom attribute "category_code" that i would like to do a rest search on. Is there a way to do this througt the V1/...
1
vote
1answer
5k views

Consumer is not authorized to access %resources REST API

I use MAGENTO 2 REST API in MobileFIrst project (Worcklight) in my adapter : function _retrieve(token) { if (!token) return { 'isSuccessful': false, 'errorMsg' : 'params is ' + params}; ...
5
votes
2answers
1k views

Merge Guest cart with Logged in - Rest API`

We are in a project where Magento 2 CE is used as the commerce service provider. Usually when a guest user who has items in Cart login the cart gets merged to the customer's cart and the guest cart ...
2
votes
2answers
1k views

Magento 2 custom authentication for API

I want to implement custom ACL for my custom API. Can someone assist me how to achieve this. Below is my webapi.xml file content: <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/...
2
votes
1answer
347 views

Magento search rest api

In the application we are implementing a search function using rest api. The search will happen using multiple filters. By default, magento is using "and" operator between filters for producing search ...
1
vote
0answers
326 views

How to integrate Payment gateway with Magento 2 REST API?

We are trying to build the generic android mobile app which can be used by magento 2 owners using REST API for Magento2 and have implemented the basic features for the app. As most of the people uses ...
5
votes
1answer
665 views

Where does Magento 2 Make its REST Order Call

I recently discovered that Magento 2's checkout flow does not place an order during the PHP page request. Instead, an additional RESTFUL API request is made to the application to place the order. ...
5
votes
0answers
1k views

Magento REST without oAuth

I have an Android and an iOS app that connect to Magento through SOAP and perform various actions. I have to switch to REST, but the users of the apps must not notice this change. They do not know ...
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/...
3
votes
0answers
427 views

Shopping cart price rule not applying when creating order by REST Api

I'm working with Magento CE 1.7.0.2. I create order by sending REST Api request (working fine) but when I'm adding coupon code to my XML (or JSON) request, the discount is not applying and the amounts ...
0
votes
2answers
3k views

How to set a method in route action_type in rest API (api2.xml)?

My route section in api2.xml <routes> <route_collection> <route>/mymodule/user</route> <action_type>collection&...
0
votes
1answer
994 views

Magento2 API update multiple inventory items

I'm developing integration with magento. My client want to update his inventory via REST or API, the problem is that he has thousands of products and it will take a lot of time to update them one by ...
1
vote
1answer
32 views

REST endpoints limited in v1

I have been in the process of building a simple frontend for Magento, but stopped because the API only allow access to products, categories, orders and customers, and I would at least also need Brands....
3
votes
1answer
2k views

Custom REST API - resource not found

I have followed the tutorial and making a simple REST API. api2.xml FILE <?xml version="1.0"?> <config> <api2> <resource_groups> <custac translate=...
0
votes
3answers
2k views

REST API creating more than one media entry for product

I am trying to import some images for some products using rest rest API (POST to /V1/products/{sku}/media). Works fine for the first image for each product but always fails for the second with the ...
2
votes
1answer
4k views

REST API Pull Sales Orders By Date [duplicate]

I am trying to pull a list of sales orders updated between 2/27/2016 12:00 AM to 10/29/2016 11:59 PM. What should my URL look like? Here is what I have: http://magentohost.com/index.php/rest/V1/...
5
votes
1answer
6k views

Magento 2 Custom Web Api call

I'm trying to write a custom web api call in Magento 2. The point of the API call is to listen for a POST request containing an XML document containing order status updates from my fulfillment system....
0
votes
1answer
1k views

Rest Api service for shipping information Post -

V1/carts/mine/shipping-information for this service which parameter are required.. I had given below parameters { "addressInformation": { "shippingAddress": { "id": 0, "region": "...
4
votes
1answer
2k views

create custom REST API in magento

I want to create my own custom REST API in my magento site. I am new in magento api. I have followed following tutorial to learn to put authentication for particular consumer added in magento rest ...