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 ...
3
votes
1answer
874 views

Sign Up With Avatar REST API Validation Error : Magento 2

I have this code for image attribute (avatar). app/code/Ibnab/CustomerPut/Setup/InstallData.php : <?php namespace Ibnab\CustomerPut\Setup; use Magento\Framework\Module\Setup\Migration; use ...
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 ...
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 ...
1
vote
3answers
9k views

Magento 2: How to get order information using REST API?

I want to get order,customer information by using REST API. Anyone have idea about this?
2
votes
2answers
9k views

Magento 2 : how to create customer using REST API?

I want to create customer using REST API in magento2. I am following this swagger link , but only method is given in this. How to pass parameters of customer in REST API? Help me in this.
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
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 ...
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 ...
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, ...
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?
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/...
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....
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
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/...
3
votes
4answers
6k views

Magento 2: How to generate Product URL Key when creating Product from Rest API?

I am creating Product in magento usign Rest API. Using the below format: { "product": { "name": "Product Name", "sku": "product_name_1498227094", "attribute_set_id": "18", "status": 1, "visibility": ...
3
votes
2answers
6k views

Getting 403 Forbidden response with REST API on CE 1.9.1.0

I'm using this link as my model for testing the REST API, and I get all the way through the authorize prompt to a "403 Forbidden" response (this is for both the customer and admin examples). Invalid ...
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" ...
0
votes
1answer
326 views

Configurable Product Price is 0 in API Response

Dears, Why Configurable products price is always displayed as 0 in rest API response like (sku related to magento 2 sample data): http://domain.com/index.php/rest/V1/products/MH01 Although it is ...
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 ...
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 ...
4
votes
1answer
4k views

POSTMAN rest and Magento-rest with Oath

POSTMAN rest client with magento REST api with Oauth. How to get Token and Token Secret? Magento REST API, how i will get token and token secret to be fill in Postman REST request. I have only ...
3
votes
1answer
1k views

Magento2: Save Product Data for global scope using Rest API

I am trying to add product using Rest API. Adding product is working fine. But I am facing issue in assign in the product information only for Default values instead of copying data for store view. ...
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/...
9
votes
0answers
894 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 ...
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 ...
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 ...
3
votes
2answers
948 views

How to use token base Rest API?

I have created custom module and also implemented API in that but I want to know other two ways Auth base and Token base access. My webapi.xml file:- <?xml version="1.0"?> <routes xmlns:xsi=...
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 ...
8
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
15k 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 ...
4
votes
3answers
1k views

Magento 2 REST API PayPal Payment method

I am using REST API to create orders. I would like to know which is the right API call and payload if paypal express checkout is the payment method to process payment and generate invoice.
4
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
1answer
3k views

How to return Associative Array from API in Magento 2

I have created Custom Api which returns associativeArray. If I use associativeArray it's giving error If I use string[] it's working But I want to return associativeArray. Error: Class "array" ...
3
votes
1answer
115 views

Magento 2 for logged In customer need to add shipping address every time i place a new order?

This is what i am following... 1. Add Configurable product in cart. http://magento-host/index.php/rest/default/V1/carts/mine/items method : POST Authorization : Bearer <customer token> body ...
3
votes
1answer
1k views

Retrieve all available shipping methods/carriers via REST

We're looking for a way to generate a list of all available shipping method codes and shipping carrier codes via REST API. I'm only seeing this available via the cart but I'd like to be able to ...
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%...
2
votes
2answers
3k views

Invalid webservice adapter specified REST API

I have configured the rest api in my localhost magento. When I Hit this url, http://localhost/magento/api/rest/products The error is: Invalid webservice adapter specified.
2
votes
4answers
8k views

Magento 2: get product through api using id?

I want to get product information using API call. I have product id of that product is it possible to do that.
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
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 ...
2
votes
1answer
667 views

Magento custom attribute over the REST API

I tried to get full list of order item attributes by this url: api/rest/orders/25/items . There are: "item_id": "62", "parent_item_id": null, "product_type": "simple", "sku": "...
2
votes
1answer
616 views

Getting Products by category id! Magento 2.1 REST

How can I get products of specific category? For Example If I hit https://www.example.com/index.php/rest/V1/categories/[category_id]/products it should return all products of same Category [...
2
votes
1answer
689 views

Change quote_id(Cart) after logout in Magento CE 1.9

Brief Introduction: I am trying to make custom rest api's for magento. To add a product in customer's cart, I followed following steps: 1) Log In customer(code): public function loginUser( $email, $...
1
vote
1answer
3k views

Rest api, tokens?

Is there anyone that can give me a really detailed guide how to get the access token and Access token secret? i've found my Consumer key in my magento but after that i'm lost :( Where can i find a ...
1
vote
1answer
669 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 ...
1
vote
2answers
4k views

Passing Array in REST Api Magento2 (Post Method)

I have created many rest Api in magento2 which working perfectly... I have only problem to pass the array in custom rest api... for example I am passing the data in below format from postman. {"...
1
vote
1answer
4k views

How to create / update customer information using REST API?

How to create/update customer using REST API in magento2? I searched a lot on google but not getting any solution for this. Please help me in this.
1
vote
0answers
91 views

Property “0” does not have corresponding setter in class “Magento\Sales\Api\Data\OrderPaymentInterface”

I am trying to update the sales_order_item table in Magento 2.1.9 using REST API /V1/orders/create PUT, but it gives the error 'Internal Error. Details are available in Magento log file.'. In the log ...