Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

Magento 2.0 Rest APi orders - multiple ID filters

I'm having a really hard time to retrieve orders by entity_id. I'm calling '/rest/V1/orders' and passing this parameters: { 'searchCriteria[filter_groups][0][filters][0][field]': 'entity_id', '...
4
votes
2answers
7k views

Set Shipping Address via Magento 2 REST API

I have a JS application where I create a cart object with items and an associated gift-message. I would like to set the shipping (and billing) address for the order and am using the following endpoint:...
2
votes
1answer
912 views

REST API create simple product

I am doing an integration with our other systems where I am trying to create a simple product (for now) in Magento 2.0.0 (will update soon but in the middle of this) using a rest call. I have tried ...
1
vote
2answers
1k views

Magento 2: how to send POST request to REST API

I am struggling with POST REST API's in Magento 2 as I am quite new to it. If possible, can anyone provide me one example for POST like creation of product or add to cart using oAuth and admin account,...
1
vote
1answer
831 views

How to create complex search filters while doing a GET on sales orders through Magento 2 REST API?

I have 12 sales orders which have "store_id" = 1. Out of which 3 orders have "status" = "pending" I get all the 12 orders when I make a GET request to http://mystore/index.php/rest/V1/orders?...
8
votes
1answer
482 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?
1
vote
1answer
439 views

How to call the Observer in REST API

I have the below observer event in my REST API . Mage::dispatchEvent('salesrule_validator_process', array( 'rule' => $rule, 'item' => $item, '...
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 ...
0
votes
1answer
793 views

Magento inventory rest api returns 404 for some products

When I try to fetch inventory of a product using /api/rest/stockitems/id URL, I get a 404 error. But when I try to fetch the same product using /api/rest/products/id URL, it works just fine. GET /api/...
0
votes
1answer
84 views

Magento 2: Custom module to show the available downloads

I am working on a requirement to develop a module which will have a REST api to get the number of remaining downloads for a given Order id 'increment_id' and Item id 'item_id'. As a first step, I ...
3
votes
2answers
4k views

Magento 2: cURL webAPI request for Customer search

Trying to find a way how to integrate Magento 2 via cURL to search for a customer. For Example the below command is able to bring the customer details of 8 curl -X GET "http://example.com/index.php/...
2
votes
1answer
758 views

REST API Order including a configurable product

When I get a order which includes a configurable product there seems to always be two order items for it. The first being the configurable product with price set to zero and the second being the ...
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 ...
2
votes
3answers
1k views

Magento 2 Web API pre/post dispatch events (REST/SOAP)

Is there any pre/post dispatch events for the Magento 2 web API (REST/SOAP) ?
0
votes
1answer
217 views

Call admin controller from another server

My team and I are building a Magento website for a client and we need to regularly perform data exports from another server to the Magento server. I'd like to call a custom admin action from another ...
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

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?
0
votes
1answer
552 views

Magento REST API: how to get custom table information in API?

How to create REST API which will fetch data from custom table?
0
votes
1answer
1k views

Adding products to magento guest cart

Hi I am following this flow to add products to a guest cart: 1.Create a guest cart (this will give me the cartID)-> POST: http://192.168.1.5:8100/magento/index.php/rest/V1/guest-carts 2. Get cart ...
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 ...
3
votes
1answer
3k 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%...
1
vote
1answer
223 views

Magento API calling using HTML and javascript

I'm new to Magento and I'm developing a PhoneGap app using HTML5, CSS and Javascript. I searched many places and read Magento documentations, but couldn't get any example for authenticating, calling, ...
1
vote
1answer
688 views

category_ids attribute missing while searching for products via REST API (rest/V1/products)

The response does not have the "category_ids" key. I need this key. Is there any other API which can provide this key? "id": 10, "sku": "Nike 3 color half sleeve tshirt", "name": "Nike 3 color ...
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....
0
votes
2answers
1k views

Magento2: How to update price with REST without changing category_ids attribute?

Does someone know how to update the product price with REST API without changing the category_ids attribute. If i perform a PUT /V1/products/{sku} With body { "product": { "price":"123" } } It ...
3
votes
2answers
3k views

how to get mixed or multi array response in rest API magento2

i have my custom api which will return multi dimension array , which will have key pair value, where key and value are dynamic from database in that case how to achieve in rest api of magento2
4
votes
1answer
1k views

How to use V1/search to get the names and SKU's of the magento products

How to use V1/search to get the names and SKU's of the magento products? I need a text based search to get the names and SKU's of the magento products. While using V1/products API, the response is ...
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 ...
0
votes
1answer
1k views

Simple REST API

I want to create a RESTful api for my products. I have set up the roles and settings in admin panel for rest api. Now where to create the API PHP code and where to place the PHP file in the Magento ...
5
votes
1answer
3k views

Magento 2 API Product Search Option Attributes

I'd like to be able to search products via the API but in my experiments so far I've found that if I am searching for a value of an option attribute (e.g. drop-down list) then I have to specify the ID ...
2
votes
1answer
2k views

Filtering data in magento REST API

I use this API to fetch the visible products using the filter: http://192.168.1.180/magento/index.php/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[...
0
votes
2answers
2k views

Authorization failed during category creation using REST API

I am playing with magento 2 Rest API to add category in magento admin. I am writing below code, but showing "401 Unauthorized" and showing message Consumer is not authorized to access %resources ...
4
votes
2answers
4k 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?
2
votes
1answer
771 views

How can I extend the category products Rest API?

/V1/categories/(cat ID)/products This API provides very less detail of all the products. { "sku": "Nike 3 color half sleeve tshirt", "position": 1, "category_id": "3" }, { "sku":...
4
votes
2answers
2k views

Getting full image url for products via REST API

After accessing the Rest API (http://192.168.1.180/magento/index.php/rest/V1/products/SKU) to get the product details, the response is something like this: { "attribute_code": "image", "value": "/6/...
1
vote
0answers
467 views

Order status is not getting changed

When i am submitting the invoice from the admin panel for an order the order status is changed to processing from pending, but when i am submitting the invoice by using the REST API order status is ...
1
vote
1answer
2k views

How to create oauth_signature for OAuth-based authentication using Magento 2.0 REST API

How to understand how to create an oauth_signature for OAuth-based authentication in Magento 2.0 REST API requests? Assuming I use PHP's hash_hmac: hash_hmac ( 'sha1' , $string , 'Integrations-...
1
vote
1answer
2k views

REST API for getting cart details of specific customer

I am trying to get the allocated cart detail for specific customer, but there are no api available to getting the cart information from customer detail (from customerId). How can i get the cart ...
1
vote
1answer
2k views

How to create REST API in Magento 2?

i'm new to Magento 2, i am assigned to create a HTML search form which take input as a CustomerID and return the Customer info associated with that CustomerID, using oAuth and REST API. I have no ...
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 ...
0
votes
1answer
376 views

How to create empty block in frontend, just for REST purpose?

I registered a new action that should receive POST and return JSON encoded data to my javascript, I don't need any blocks such as header, footer, etc, so I tried to do the empty page this way in my ...
1
vote
1answer
387 views

Create ORDER through REST Api return error 500 (post SUPEE-6788)

I'm working with Magento CE 1.7.0.2. I've deployed SUPEE-6788 security patch and related 3rd party extension compliant patches on my test and preproduction environment. I went successfully across an ...
0
votes
0answers
47 views

Are product attribute names accessible from Magento API?

My goal is to pull this information as a guest but I have tried as both an admin and a guest. My results look like this: URL: {magento_base_url}/m/api/rest/products/category/12 <magento_api> ...
2
votes
2answers
942 views

Client Side OAuth

So I'm trying to make a SPA that uses Magento 1.9.2.2 as its back office. To do this, I would like to use its REST API. And of course, it forces you to OAuth with Magento first. I have tried ...
1
vote
2answers
503 views

How to get the current day orders through REST API?

I am getting the initial 10 records by the following step -- oauth = OAuth(client_key=CONSUMER_KEY, client_secret=CONSUMER_SECRET, resource_owner_key=TOKEN, resource_owner_secret=SECRET) h = {'...
0
votes
3answers
2k views

Can we fetch all the products using REST API without using limit

I have found API calls for product listing like http://xxxxxx.com/api/rest/products?limit=100 and http://xxxxxx.com/api/rest/products by default its 10 products and after passing limit its giving ...
2
votes
1answer
2k views

OAUTH Flow in Magento2

I need to create the Rest API in magento in 1.x or 2.x and I need to expose to the third party , I have doubt on the authentication how its going to be carried out for the OAUTH ->How the 3rd party ...
1
vote
1answer
1k views

How do I retrieve a product using either the REST or SOAP APIs?

An external utility needs to retrieve products from Magento by SKU--either one at a time or in batches, ideally returning the product with all attribute values, photo URLs, categories, etc. So far I ...
3
votes
1answer
2k views

Product POST call to Magento REST API results in 302 and redirect (Nginx)

Having an issue when POST'ing to the Magento 1.9 REST API. Magento is being served by Nginx 1.8.0 using OAuth (successfully authenticating). My Magento rewrite config for the API looks like this: ...
8
votes
1answer
980 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'...