Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
24
votes
4answers
15k 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
985 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
5k 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 ...
2
votes
4answers
11k 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
10k 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.
10
votes
2answers
10k 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 ...
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": ...
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) ?
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
12k 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
8k 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/...
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
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 ...
3
votes
2answers
1k 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=...
7
votes
2answers
18k 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 ...
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 ...
1
vote
1answer
722 views

Geting the available quantity for all products via REST API

How can I get the available quantity for all products via REST API?. Do I have to create a new module for this? What is the most efficient way to achieve this?
0
votes
1answer
364 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 ...
0
votes
0answers
68 views

Magento2: How to stop sending customer welcome email when order created using magento rest api?

Actually i'm creating orders using magento2 rest v1 api http://example.com/index.php/rest/V1/orders/create and order successfully created by calling api. But when customer order created then there ...
16
votes
0answers
14k 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 ...
9
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
5k 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
1answer
1k 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 ...
4
votes
1answer
2k views

Magento2: Add a New Customer Address

I'm trying to add a new customer address using Magento 2 REST API in C#. I'm using POST /V1/customers/:id. I keep getting the below error. Where do I find the regionId? Is there another API I can use ...
3
votes
2answers
8k views

Update product using rest api in magento 2

First thing I would like to share is that I am very new to magento. I am working on addition of products using rest api. I tried one product and it was created. $headers = array('Authorization=> ...
2
votes
1answer
728 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": "...
14
votes
3answers
3k 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 ...
7
votes
4answers
19k 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 ...
5
votes
1answer
4k 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" ...
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
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.
3
votes
1answer
151 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
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
688 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
2k views

How to update quantity of all products in cart with REST API

For updating a single cart item I am using a request like this: PUT /V1/carts/:cartId/items/:itemId with body { "cart_item": { "sku": "Some SKU here", "qty": 7, ... "quote_id"...
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/...
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
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
9k 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.