We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [api]

An application programming interface (API) specifies how some software components should interact with each other.

586 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
1answer
1k views

Magento2 : API Stock update

Using Magento 2.2.2, I was trying to add stock updates to a pre-existing setup using the official defined endpoint: rest/V1/products/testsku/stockItems/1 with { "stock_item": { "qty": 1234, ...
9
votes
1answer
644 views

Magento 2: Creating configurable product using the REST API

In order to create configurable product I need to create configurable product, virtual product and finally connect them. Example of json request got from here: How do I create a configurable product ...
7
votes
1answer
635 views

How to change currency in magento soap api

I am using Magento 1.8.1 and SOAP API 2. I couldn't find a way to change the currency for the API. How can I do this ? Or is this not possible with Magento ? And if this is not possible, is there a ...
6
votes
1answer
518 views

How can I get only the Store View attributes, without the inherited Global data? I only need the diffs

I'm using the internal Magento APIs to get the product data on a store view level. I only want to get the values that are on that store view level, not the global values that in inherits. But it ...
6
votes
0answers
251 views

How to use REST API for mobile App?

I have found on dev docs that REST API is recommended for mobile application. I have created integration from magento admin panel and tried to access resources with passing access token in header. ...
6
votes
0answers
1k views

Magento REST without oAuth

I have an Android and an iOS app that connect to Magento through SOAP and perform various actions. I have to switch to REST, but the users of the apps must not notice this change. They do not know ...
5
votes
0answers
112 views

HELP - How to convert Default SOAP-v2 API Magento Objects into XML Values?

In Magento1.9 - product collection by default return values as Magento Objects using soap v2, how can i change into XML, <?php ini_set('display_errors','On'); $proxy = new SoapClient('abc.com/api/...
5
votes
1answer
2k views

Magento 2 Unable to assign Product to category via API

There has been similar issues posted without an answer unfortunately but I am posting two ways in the API to set a category on a product both of which give different errors. The first is using the ...
5
votes
1answer
1k views

Magento2 search like searching using REST API

When using magento search REST API you can search with logical AND search http://devdocs.magento.com/guides/v2.0/howdoi/webapi/search-criteria.html#logical-and-search For example I want to search ...
5
votes
0answers
1k views

Magento2 How to get Custom order attributes value in response in rest api v1

down vote favorite I have installed Amasty order attributes extension I followed http://magehit.com/blog/how-to-get-value-of-custom-attribute-on-magento-2-rest-api/ and created app/code/Amasty/...
5
votes
0answers
6k views

SOAP-ERROR: Encoding: object has no 'xxx' property

By each SOAP agent am getting this response "error 500". I am using SOAP v2 with WS-I compliance mode. <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://...
5
votes
0answers
409 views

Paypal Payload for Payment Rest API 2

Can anyone help me for payload of paypal standard we are trying two api's nothing works for us. We tried multiple payloads already but no success in order placement. POST /V1/guest-carts/{cartId}/...
5
votes
0answers
540 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. <?...
5
votes
1answer
1k views

Magento SOAP API call limit?

Is there a limit on API calls using Magento's SOAP API (V1)? The product page for a store I'm working on requires several calls to the "cataloginventory_stock_item.list" method, once for every "simple ...
4
votes
0answers
176 views

Magento2.3 checkout page getting error

I used magento2.3 - when i go to checkout page this error comes below.please if anyone know regarding this reply me Error occurred during "shipping_address" processing. Error occurred during "...
4
votes
1answer
513 views

Magento 2 Add to cart api Item price set zero in Quote Item table

I am trying to add product to cart with Magento 2 default API. POST : http://{{magento2}}/rest/V1/carts/mine/items Request : { "cartItem": { "sku": "p2", "qty": 1, "price"...
4
votes
0answers
84 views

Magento 2 Category list API with layered navigation

Is there any API we can get category product listing with Layered Navigation. I want to use in Mobile Application. Thanks,
4
votes
0answers
290 views

How to update custom order status through custom Api using order id in Magento2?

I have created custom Api to update order status by using Order Id. I have used the below code in webapi.xml file. <route url="/V1/orderstatus/orderUpdate" method="POST"> <service class="...
4
votes
1answer
164 views

Rest api for my orders

Where can i find the rest api for my orders and my downloadable products in magento2. I can't find the list in the swagger file. eg: GET /orders/me GET /downloadableproducts/me Or how can i filter ...
4
votes
0answers
1k views

Add multiple products to cart using Magento2 REST API using custom method

Add multiple products to cart using Magento2 REST API using custom method Their is no default magento api this is single product add to cart json code in rest api body section. { "cartItem": { ...
4
votes
0answers
170 views

Magento - Create order using REST API

I need to create place order using REST API. I want to help someone to create API. If you have any reference URL for perfect code please let me know.
4
votes
4answers
840 views

best practice to connect Magento 2 to price/product service

I have my own price/product service that I need to connect to Magento. The service has a variable amount of products with very variable prices. The price can change with every request a customer makes....
4
votes
1answer
2k views

Magento's REST API responses claiming oauth_callback param is empty

Working with Magento CE 1.9. I'm attempting to make use of Magento's API however I keep running into the same error in my response: oauth_problem=parameter_absent&oauth_parameters_absent=...
4
votes
1answer
654 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 ...
4
votes
1answer
1k views

Scraping data from Magento without privileged access or trust

There appear to be a number of ways of scraping product data from a Magento site, but all seem to have their upsides and downsides. We deal with sites who have little to no technical resource, but ...
4
votes
2answers
1k views

Magento API V2 wsi.xml file

I'm being driven mad by this wsi.xml file which doesn't seem to be doing what I'm asking of it. I'm creating my own API which does a bunch of things using a product's EAN (a custom attribute). It ...
4
votes
1answer
2k views

How to get custom attributes from customer via SOAP API?

I have a few custom attributes to extend the customer with bank account information. The attributes are stored in mage_eav_attribute table. How can I get them via the SOAP API?
3
votes
0answers
75 views

magento2 creating custom search api using elastic search functionality but can not able to create instance

I am creating custom search API using elastic search functionality but can not able to create an instance of \Magento\Framework\Search\RequestInterface $requestInterface, it is giving an error like ...
3
votes
2answers
110 views

Magento2 API to access internal payment method

I am working on creating a way to make an order via the magento api and wondering if it is possible to access internal payment methods (payment methods that are only enabled for the admin panel) via ...
3
votes
1answer
276 views

Magento2 API Filtering Multiple categories

In Magento2 API, how would I filter by multiple categories? V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=%test%&...
3
votes
0answers
39 views

Get list of coupons code for a cart id

Is there any API in magento to get list of all coupons appreciable to a corresponding cart id. can we get sale rules for a cart id and then find coupon through it
3
votes
1answer
303 views

How to return search API response from controller in magento 2?

I have an API(ukvehicledata) for search using registration id. I want to integrate with magento 2.2 I am getting response in controller as JSON format. I have converted it into an array. Now I ...
3
votes
1answer
55 views

Magento 2 - Loading an Order through API

We need to call API's in order to get order details. We are doing so in a dev environment. What happens is that we are not calling any order by the "order_id", instead we use the entity_id. <web&...
3
votes
0answers
265 views

How to create API Endpoint in Magento2?

I want to create API route which can list/return products data in JSON or XML format. By creating this endpoint I will be able to fetch the all the products from Magento. Then I will access it on my ...
3
votes
0answers
171 views

Magento Full Text Search through API

I have an API2 REST end point that is trying to do a full text search. The problem is that it's always returning empty results for not specific reason. This is the code i have: $query = Mage::...
3
votes
0answers
382 views

How to change custom order status through rest api in magento2

Can any one explain me or give me an example for changing the magento2 order status to customized status using rest API
3
votes
1answer
835 views

Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect) magento rest api error

Error message below Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect) {"messages":{"error":[{"code":401,"message":"oauth_problem=internal_error&message=Mage ...
3
votes
1answer
2k views

Add Pagination To Catalog Search Results REST API: Magento 2

I am using this API for search: http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&...
3
votes
1answer
506 views

Magento 2 : Wrong order created and updated date in rest api response

I am fetching the orders using Magento 2 REST api services. I am using IST timezone the dates saved in the database are in correct timezone. I have set timezone to "Asia/Kolkata". On customer ...
3
votes
1answer
1k 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 ...
3
votes
1answer
864 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 ...
3
votes
0answers
220 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
1answer
576 views

what is entity when create an order using REST api

I am trying to create order using REST API I have got an error message ordered: {"message":"%fieldName is a required field.","parameters":{"fieldName":"entity"}}" What is entity field in order of ...
3
votes
1answer
1k views

Magento 2 : Social Login via Rest Api

I need to create a user account using social network via the API. I have created via native iOS application that hooks into magento 2 store API. However, I can not find a way to create an account ...
3
votes
1answer
1k views

Add product to guest cart with custom option and its price in Magento 2 api

I need to add product in cart using magento 2 api. I am using below api "rest/V1/guest-carts/{cart_id}/items I am passing parameters like below, { "cartItem": { "sku": "...
3
votes
1answer
126 views

I want some extra fields on magento 2.1.2 api

What I get : http://example.com/index.php/rest/V1/categories/263/products [{ "sku": "20130", "position": 1, "category_id": "263" }, { "sku": "20134",...
3
votes
0answers
510 views

Magento 2.1: Custom Option IDs regenerated during site edit - how to manage?

I am developing an interface between Magento and Epicor 9 and we access our customer's orders using the REST API. When the customer buys one of our custom products, they modify their order using ...
3
votes
0answers
599 views

How to get images of products in cart using rest API

Doing a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" will give: [ { "item_id": 129, "sku": "24-UG05", "qty": 1, "name": "Go-Get'r Pushup Grips", "price": ...
3
votes
1answer
702 views

Getting all attributes of products does not work in Magento2

I want to create custom API module that will return the same thing as: /V1/products REST API endpoint. In order to do that I created the following custom endpoint: public function __construct( ...
3
votes
1answer
105 views

What's the difference between _create() and _multiCreate() in the REST API methods?

I am trying to extend the Magento's REST to have my own set of API. I looked through the code and figured that there are _create(), _multiCreate(), update(), etc... What's the difference between ...