Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
1
vote
2answers
1k views

How to get Custom HTTP header in Magento2 controller?

I'm accessing my controller via postman tool (Postman) I've passed custom header as shown in image and trying to access it in controller through this code: $this->_response->getHeader('APP_ID'...
0
votes
1answer
1k views

Magento 1.9 REST API - updating/creating products with custom attributes

Is it possible to use Magento 1.9 REST API to create or update products that have custom attributes? example: http://magentohost/api/rest/products/8 Request Example: JSON { "...
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
1
vote
1answer
507 views

Is possible to create REST API with Basic Auth?

I've created REST API in Magento2 but everyone can use it. How can I add basic auth to my API?
1
vote
1answer
2k views

Add multiple products in single API call in magento2

I have to migrate data from RMS to magento. There are thousands of records that needs to be migrated. I am using REST API to save product. http://localhost:89/index.php/rest/all/V1/products This is ...
0
votes
1answer
622 views

pulling order IDs via REST API in magento 2.0

we are seeing a big dependency between the order ID that we are getting from Magento via REST and the order ID that we see in the order confirmation email. for example REST returns 45, the email has ...
2
votes
2answers
4k views

Adding regions in addresses other than US in Magento 2

We are running Magento 2.1.6. We want to set predefined regions and areas as drop down lists in addresses, just like when you select country us, you have the states pre selected, etc.. For example, ...
2
votes
0answers
135 views

Custom file attribute Rest Api

I'm using the Magento 2 rest API to read out the orders in to our system. If an order line product have a custom file option we want to download this file. From the order items we get the following ...
1
vote
3answers
7k views

Magento 2: Update order status using rest API

Guys I want to update order status using API. I am using this api to change the order status but it's not working: http://dev-jawed.com/index.php/rest/V1/orders { "status" : "Out-for-delivery", "...
0
votes
0answers
2k views

{“message”:“%fieldName is a required field.”,“parameters”:{“fieldName”:“criteria”}}

I am trying to get all slides, but I have an error: {"message":"%fieldName is a required field.","parameters":{"fieldName":"criteria"}} when I call this API: /V1/jeffSliderSlide/search: Any ...
2
votes
1answer
1k views

class [] does not exist for custom extension_attributes over webapi

I created a custom module to store the details of discount per items. I have a custom tables to store informations (quote items, order items, invoice items), and I use a extension attributes to link ...
0
votes
0answers
68 views

fedex not working india as origin magento 1.9

I tried almost all available methods to sort out but nothing happens. For the USA as origin, it works perfect in testing mode but when I change origin to India with same details as I registered to ...
3
votes
1answer
717 views

Get Countries and related Cities REST API

I have a form in my mobile app for shipping information. I am looking for REST API to get countries and its related cities. I found only an API: V1/directory/countries How can I get cities for ...
1
vote
0answers
246 views

home page banner res api magento 2

I am trying to get an API for banners in home page to list in my mobile app. Is there is a module for that? Ex: https://{{magento-host}}/index.php/rest/V1/banners
2
votes
1answer
2k views

magento rest api V1/products endpoint

I use following code to call rest api in magento 2.1.5 $consumerKey = 'aca1rh9env59axm0ob48xfu62t9s4a5e'; $consumerSecret = 'dgn4y1ejfu9aixb5mrio4kbsor5tq208'; $accessToken = '...
1
vote
1answer
1k views

How to add cutom customer attribute field to call rest api via create new customer

I have created a custom customer attribute(mobile_number) and set default value of customer create account. I added mobile number to customer_attribute: $customerSetup->addAttribute(Customer::...
1
vote
2answers
193 views

Creating an API to communicate directly with Magento DB

We have been using the Magento Rest API to communicate between external systems and Magento. Painfully, we have discovered that the REST API does not scale well. Specifically, often times requests ...
0
votes
1answer
757 views

Get pending, completed, processing orders REST API problem

I have an API module to get orders with any status for a specific customer. I am calling the API as : https://{{magento-store}}/index.php/rest/V1/order/myorder?status=processing and authoriaztion : ...
1
vote
0answers
186 views

Some SKUs not returning the product details through REST API using get / update method in Magento2.1.3

Am trying to update the product details from third party machine to magento 2.1.3 using REST API. here some of the SKUs not returning the details while get/update and then i logged that SKUs and ...
1
vote
1answer
445 views

List orders history using Customer token?

There is no option to get all customer orders without setting there admin rights. So is there is an API to call like /V1/orders/mine ?
3
votes
1answer
556 views

Get pending orders for a specific customer using REST API Magento 2

I am trying to get the pending orders for a specific customer using : https://{domain.com}/index.php/rest/V1/orders?searchCriteria[filter_g‌​roups][0][filters][0‌​][field]=status&searchCriteria[...
0
votes
1answer
1k views

Magento 2 REST API: Products not saved correctly

I create products through the REST API (catalogProductRepositoryV1) using a POST request. For some reason there is something different about these products. Just after creating them everything seems ...
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 ...
1
vote
0answers
52 views

Search typing rest API

Is there is a built in API for search typing? I have an autocomplete search for mobile app like website. How to get API for searching products every charcter hit?
0
votes
1answer
431 views

Can anyone explain step by how to add product to CART using REST API?

I tried this link http://devdocs.magento.com/swagger/index.html#/ - But not able to understand what exactly to do? Please help me.
1
vote
1answer
1k views

Get all products with a specific attribute code with REST API in Magento 2

Is there is a built in rest API to get ALL products with a specific attribute_code ex. this API https://domain.com/index.php/rest/V1/products/:productID returns .. <item> <...
2
votes
1answer
1k views

Get stores countries and Languages REST API

Is there is a built in rest API to get : Stores Countries. Stores Languages. Please help.
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.
0
votes
2answers
641 views

Get Full product link REST API

I am trying to get all product details via: https://domain.com/index.php/rest/V1/products/:sku but, I can't find a full product rewrite link, How to get that?
2
votes
1answer
209 views

Magento : Create Layered Navigation API to Show Attributes

I want to fetch these attributes of layered navigation using REST API. Provide me suitable solution.
0
votes
1answer
2k views

How to add product using REST api?

How to add product using REST api. Getting below error - Invalid auth/bad request (got a 500, expected HTTP/1.1 20X or a redirect) Service temporary unavailable I tried, $oauthClient->fetch(...
0
votes
1answer
2k views

Get categories and its sub categories REST APi

How to get subcategries for each category in REST API? I tried to get category as: https://domain.com/index.php/rest/V1/categories/:categoryID
1
vote
0answers
1k views

get customer info based on email address using rest API in Magento 2

I have a requirement that I need to migrate users from a remote RMS to existing magento 2 website using Rest API. Migration will either create new user if it doesn't exists or will update the existing ...
0
votes
2answers
2k views

Invoke rest api from c#

I am successfully getting access token, but when I call customer service it is throwing error. Error:Bad Request/Unauthorized for this I have tried below code. using System; using System....
0
votes
1answer
140 views

How to get a product full link REST API?

I am trying to get Full product link, so can use it in share in mobile application. I already used API: GET https://domain.com/index.php/rest/V1/products/:sku and have a response, but can't get ...
1
vote
1answer
2k views

Featured and related products REST API Magento 2

Is there is a built in REST APIs for both Featured and Related products in Magento because I looked in the reference and couldn't find?
1
vote
2answers
1k views

Magento 2 Rest API - how do I add values to dropdown product attribute

I have problems in adding values to an existing product attribute, using the API POST /products/attributes/:attribute_id/options. The corresponding GET API is working fine, as explained below. I have ...
4
votes
2answers
1k views

Sign out REST API Magento 2

Is there is a built in REST API for sign out in Magento because I looked in the reference and couldn't find?
1
vote
1answer
599 views

Get orders REST API problem

I am trying to get orders for a specific customer through API: GET on https://domain.com/index.php/rest/V1/orders and header parameter is Authorization Bearer x1v9pvmag5rvkb0vgekpdtwri6ak1pxh ...
1
vote
2answers
913 views

Login into Magento 2 site from external site

I have a site outside Magento's domain and I should allow Magento customer to login into Magento Store from this external site. Being completely new to Magento , I don't know how to implement this ...
1
vote
1answer
431 views

how to use magento REST api for creating products

I'm trying to create a product using magento REST api. I created a OAuth Consumer in magento admin and got key and secret key, I also assigned a OAuth consumer to the user. (Followed http://help....
3
votes
0answers
199 views

How to get featured products REST API

How to get REST API for featured products, Best sellers and Sale products? Is it possible with searchCriteria parameter?
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=> ...
3
votes
2answers
3k views

How can I generate a full swagger doc for Magento 2 REST API?

I have a fresh Magento 2.1.5 install, and I'd like to access the full swagger spec, like the one published on http://devdocs.magento.com/swagger, but with the Try it Out! buttons enabled. I've ...
3
votes
0answers
407 views

3rd party OAuth integration with Java

I'm following the documentation http://devdocs.magento.com/guides/v2.1//get-started/authentication/gs-authentication-oauth.html and I'm a little stuck. Basically I want to make REST calls from my ...
0
votes
1answer
926 views

Magento 2 REST API - Generate Coupon

I am trying to generate a coupon through the Magento 2 REST API. It works, except that I cannot change the usage_limit and expiration_date. They are always set to the values of the rule. Is there any ...
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"...
0
votes
1answer
478 views

Creating an exposed endpoint URL for service returns in Magento 2

I'm writing an extension that utilizes web services and I need a way for those web services to send information back to the extension over the internet. Would I just use a controller like every other ...
0
votes
2answers
3k views

How to add media gallery entries via REST API - Magento 2

I stored image in pub/media/catalog/product. How to add that images into media gallery entries. I have tried like http://myhost/rest/V1/products "media_gallery_entries"=> array( array( ...
0
votes
1answer
255 views

where should I get format of request body of REST api - Magento 2

I'm trying to create simple product using magento REST api. I have tried this link, it works but I need to know full options of create product like media gallery entries,product links,...etc. So I ...