Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
8
votes
1answer
981 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'...
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/...
0
votes
1answer
711 views

Unable to extend Orders Rest Api of Magento

I am trying to extend Orders rest api in magento. For e.g To create a new update method. For doing this, I have created a new class in the local copy: The file I am trying to override is : app\code\...
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
2k views

Magento REST role and Users Roles: which are the difference and how they are related?

I understood the meaning of roles for the users and how to manage them, but I didn't understand well the meaning of the REST roles and if they interact/interfere each other. I couldn't find any ...
0
votes
1answer
1k views

Notice: Array to string conversion in Magento 2

I have created Magento2 Api which is working fine when return type is string and When return type is Array it's throwing Error. Error: main.CRITICAL: exception 'Exception' with message 'Report ID: ...
3
votes
2answers
1k views

Report ID: webapi-560e30f44811c; Message: Class name does not exis in Magento2

I have created rest api it's not working Could you please suggest me where i went wrong? Error: main.CRITICAL: exception 'ReflectionException' with message 'Report ID: webapi-560e33c7e2c45; ...
4
votes
3answers
3k views

How to create SOAP API in Magento2?

Today i have created Magento2 REST API, it's working. similarly how to create soap api in magento2?. app/etc/config.php 'modules' => array ( 'Learning_CalculatorWebService' => 1, ), ...
2
votes
0answers
388 views

Magento CE 1.9 Rest Api - Redirecting to Customer Account after submitting Customer Login form to generate access token?

I am getting issue while creating Magento Rest Api for Mobile Application. I have a php file containing logic to access Magento Rest Api. Whenever I am hitting the file it is redirecting to me ...
0
votes
1answer
168 views

Magento Restful Api, Creating a virtual product

Finally gotten our Restful API working with our third-party app, and of course bumped into what may become a very stressful headache. How do I go about allowing API Virtual Product Creation? When I ...
4
votes
3answers
5k views

How to set HTTP Response Code in Custom REST API

Hi Guys for a project i try to extend the Magento REST API. I have some problems with my error handling. I don't know how to send the right Http Response Code. I tried it with something like this: ...
1
vote
0answers
870 views

Extending REST API, route to custom method

I have a custom module that implements a few new REST endpoints, which is working correctly. In my api2.xml I have the routes defined as this: <routes> <route_catalog_rule> <...
4
votes
0answers
80 views

Mobile browser is unable to load the XML data of Magento site [closed]

I am new to magento. My question here is that I am unable to load the XML data in mobile browser but with the same link i am able to display the xml data in Desktop browser . Data is coming out of ...
1
vote
0answers
107 views

Rest Api- get sales orders with authorizing only once

I have another website as admin panel which connects with magento store to fetch orders/products etc. I don't want to authorize every time I call the Api. I want the system will ask me for ...
4
votes
1answer
620 views

Set default product image via REST API

I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API. Is there a ...
1
vote
0answers
33 views

Is it possible to return a set of attributes of product using rest APIs.?

Is it possible to return only a set of attributes corresponding to the product by calling api/rest/products. In first stage I might not want the description to be loaded, I just needed the name, price ...
1
vote
1answer
792 views

How to use Rest And Soap API in Magento After sales order to send information to courier partner

I need to send. some information after sales ..to the courier company... I need to build API in magento..when customer purchase anything...and place successful order. Then I want to send some ...
1
vote
3answers
930 views

Sort by price in product collection get by magento rest api

I am using below web service to get a product collection sorted by price : www.magentohost.com/api/rest/products?order=price&dir=asc It is giving the following error: {"messages":{"error":[{"...
6
votes
1answer
724 views

RESTful service calls

I am doing an android application which uses Magento as a back end processing system. Now i can display the products in XML format once the user clicks on the product image. Which restful service call ...
7
votes
1answer
2k views

Can anybody share android app code for magento REST api

I wanted sample android application which uses magento RESTful services ..so that i can browse all the products , catalog , customers , checkout and etc.
3
votes
0answers
349 views

REST products web service filter by Price Attribute

Magento 1.9 provides a web service for products but the response parameters that are different for customer/guest and admin. The problem is that there is a price field in Admin response that gives ...
2
votes
0answers
58 views

3rd party access to Magento CE downloadable products

Having migrated from a legacy system to Magento, I would like to allow access data on my magento store from an: iOS app Android app Web app for the following: Product details inc image (straight-...
2
votes
1answer
623 views

How to set login session in magento by logging in via code?

I am working with the Magento REST API. I have developed a service for users to sign in, and that works fine. But when I call the service and try to load the Magento front end, I can't see the logged ...
6
votes
1answer
123 views

Products are not showing When i search through REST client plugin

This is the XML content I got when I search in the browser/REST client Firefox plugin... <magento_api> <data_item/> <data_item/> <data_item/> <data_item/>...
10
votes
2answers
1k views

Magento redirects to Homepage when i search for products Using REST tokens

I have searched for the products like this localhost/api/rest/products But it is directly redirecting to Homepage of localhost. I have generated all the keys and tokens and i tried this also: 127.0....
1
vote
0answers
2k views

How to get completed sales with rest API in magento 2?

Github issue: https://github.com/magento/magento2/issues/1578 It works for processing status, however I get an error for completed or closed curl -X GET -H "Authorization: Bearer ...
5
votes
1answer
4k views

How to get sales with rest API in magento 2?

I have tried the following, but I get Consumer is not authorized to access %resources" error. Is there something I'm missing? Can you suggest another way to retrieve sales? curl -X POST "http://...
0
votes
2answers
132 views

REST: How to get attribute text instead of id

Getting product and order data through the appropriate api calls work well, but a problem arises when a product attribute uses dropdown or similar lists, where the value I get through the api is the ...
2
votes
1answer
2k views

Running the Magento REST API php example

I'm trying to run the Magento REST API example for fetching item information. This is the code I have: <?php /** * Example of products list retrieve using Customer account via Magento REST API. ...
0
votes
1answer
1k views

Invalid Signature when testing API

I am trying to connect to my Magento API but keep getting an invalid signature response after authorizing. My long term goal is to have an external app that will be modifying select product details. ...
1
vote
2answers
674 views

Magento 1.9 REST Customer Password Field Unable To Save

Been using REST to create or update Customer record but the field password never able to be saved/updated regardless. Below is the JSON output to Magento REST: POST output: {"website_id":1,"email":"...
0
votes
1answer
1k views

Curl based magento API creation

I am planning to create a URL Based api which enable me to fetch resources using curl. For example, If a client can request the resource by using the following url structure. curl -some-variable ...
2
votes
1answer
948 views

How to install php_oauth.dll file [closed]

i am unable to install php_oauth.dll file onto my system therefore not able to see it installed using phpinfo() what i have tried so far: i have downloaded the .dll files for both 32-bit and 64-bit ...
1
vote
0answers
30 views

Android app for Magento store using REST or SOAP? [duplicate]

Hi there i want to know which service to use for making a mobile application for magento does it have to be rest or soap i want to have complete functionality as that of my website inside mobile app....
2
votes
0answers
2k views

How to call localhost/magento/oauth/initiate?

I am trying to call the above url to initiate the oauth tokens. I am following the below link http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html Can u tell me what s the ...
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.
1
vote
1answer
105 views

Need resource to configure my magento REST Apis

I am here to know the step by step configuration of magento RESTful apis. I have basic idea of how it works. But Still I dont know to configure the api to produce the results. Help me to configure it ...
2
votes
1answer
1k views

How to get the sales order date from the REST api?

I am facing a very puzzling aspect of the REST API of Magento. Seemingly, the GET /Orders response does not return any date. This can't be right, sales orders are dated. What am I missing here?
0
votes
1answer
168 views

How to login in Magento website using REST API

I am writing a REST API in Magento to login into the website with REST API. I have called the API to login the user through the web browser its logged In. After that, In the next tab on the browser ...
1
vote
1answer
462 views

Best option for Magento Mobile APP API

We are in the process of developing a heavily customized Magento store which needs to support muti website, and multi stores, the mobile app will also need to easily switch from one store to another. ...
3
votes
1answer
836 views

How can I programmatically create a RESTful api role and consumer?

How can I create a RESTful role and consumer during the installation of an extension (module) using a data-install script located at: app/code/community/Namespace/Module/data/namespace_module_setup/...
1
vote
1answer
869 views

Magento Product REST API for configurable and grouped products

I can not find the REST API documentation for creating a configurable product over the REST API from Magento I also can not find the documentation for relating simple products with a product over ...
4
votes
1answer
2k views

REST API get result page count, or last page

I am sure I am missing something obvious today, as I just cannot work this out. I am doing a REST call, to get all customers, paged at 100 results per page (forced limitation of max allowed per page =...
2
votes
1answer
696 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
3answers
752 views

Showing cart products on frontend in Magento CE 1.9

I am adding products to cart from admin to customer account like this: $quote = Mage::getModel('sales/quote')->loadByCustomer($customer_ID); $quote->addProduct($product, $qty); from this ...
4
votes
3answers
2k views

Magento CE 1.9 Add Product to Cart

I am making rest api's for add product to cart for that I wrote this code: public function _create(array $data) { $id = $data['id']; $qty = $data['qty']; $product = Mage::...
2
votes
0answers
168 views

How to create new shipment using Magento REST API? [closed]

I am looking here http://www.magentocommerce.com/api/rest/introduction.html but I am unable to found any method that supports shipment creation. Please help.
5
votes
0answers
531 views

Magento 1.x : Accessing Magento Rest Api as Admin

I am trying to access magento rest api with following script, but is uses default guest role to access, so I cannot access orders and other stuffs. How can I access Magento Rest api as admin. <?...
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 ...
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 ...