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 [api]

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

46
votes
3answers
7k views

Magento 2 as a headless solution

I want to know if there are some best practices to use Magento 2 as a headless E-commerce solution. A typical E-commerce in 2017 is to have an omni-channel solution which includes E-commerce CMS ...
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 ...
22
votes
2answers
17k views

Filtering a Magento 2 Object Repository

In Magento 2, can you use a product repository to filter by product attributes? In Magento 2, you can use a search criteria object \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria, ...
21
votes
3answers
3k views

Which api method is best for apps

I want to create iOS and Android apps for my Magento store. For this purpose I want to know which API method is best as app data API. Please suggest below of option of Magento: Soap Api Rest Api ...
17
votes
2answers
27k views

How to enable error and exception logging in Magento2?

I am unable to see any type of error in magento2. i am implementing custom payment gateway but when i add a dropdown list in backend admin panel of magento2 At that time its shows blank page and when ...
17
votes
0answers
3k views

Not able to get OAuth token for Magento Rest API Client

I am using Magento version 1.9.1.0 and server running on my mac and trying to use Magento Rest APIs using OAuth Integration. I have a consumer key and consumer secret. Now, I want to get OAuth token ...
15
votes
1answer
9k views

Why are my SOAP v2 WS-I calls so slow (7-10 sec. per product update)?

We're using the Magento SOAP v2 API with WS-I. The problem is, that the SOAP calls are extremly slow (7-10 seconds per product!). We're calling catalogProductUpdate without images. The shop itself ...
14
votes
3answers
1k views

Magento 2: what are the benefits of using service contracts?

So as some of you may know, Magento 2 recommended way to deal with models/collections for CRUD actions is to use service contracts. But still according to the Magento SE Q&A it seems like most ...
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 ...
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/...
13
votes
3answers
293 views

Improve performance on SOAP calls

I have a performance problem with Magento 2.1 In my shop, I have 90.000 products. I added these products to soap. When I did this it took round about 7 seconds for each article (product?) (Request>...
11
votes
2answers
8k views

Magento 2: Product Repositories, Filter Groups, and `AND`

I'm trying to use a product repository to fetch a list of products. I want to fetch based on two filters, combined with an AND criteria, but things don't seem to be working. Do I not understand how ...
10
votes
2answers
13k views

How can I create a Custom SOAP/XML-RPC v1 & V2 Api in magento?

How can I create a Custom SOAP/XML-RPC V1 & V2 API in Magento?
10
votes
1answer
7k views

Where do you put modified WSDL files for the API to override the core definitions?

We've updated the standard WSDL definitions to support bundled product attributes for sku_type and price_type. I've tried putting the updated WSDL and WSI files in app/code/local/Mage/Catalog/etc/, ...
10
votes
2answers
6k views

Speed up magento soap v1

I have multiple questions for experienced magento developers: Is it possible to improve the speed of the magento v1 soap api? When requesting data it quickly costs 1.5 seconds for magento to compile ...
10
votes
3answers
4k views

REST API Update Product HTTP Method PUT or POST?

The REST API documentation says that PUT /V1/products/{sku} creates rather than updates. Is that an error in the docs because I would have assumed that it is an update method and POST being the ...
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
9
votes
2answers
4k views

What is a Magento 2 “Web API Integration”

Per the developer documentation Integration style web API’s enable a single web API call to run multiple services at once for a more efficient integration. An example of this behavior can be see in ...
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 ...
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 ...
9
votes
1answer
6k views

How to access the Magento API from native client with JavaScript

I need to access the Magento API from a local JavaScript based application (Titanium Desktop) and wondering what's the best way to do so. What I found out so far: The only authentication mechanism ...
9
votes
0answers
923 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 ...
8
votes
1answer
128 views

Magento 2: get product through api using product name

I want to get product information using product name in Magento 2
8
votes
2answers
6k views

Magento 2 Api Getting Error '%fieldName is a required field'?

I am not getting result (id) while using POST method using url is rest/V1/hello/test/3 Screenshot: I have followed this link For Reference Please Click Here 1) webapi.xml <?xml version="1.0"...
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 ...
8
votes
2answers
242 views

Soap API - How to get request by Limit 10 based on pagination?

I am getting products list using catalogProductList, its taking too long time to return the values(see screenshot) actually my products count is 24K, how can i run by using limit 10 and if i click ...
8
votes
2answers
11k views

Custom api Invalid api path

So I followed this example for creating custom api. But I am not sure if I am calling it wrong or my code is not correct. Here is what I have. Folder structure: Mycompany Syncreports etc ...
8
votes
1answer
4k views

magento 2 api route with input parameter

I'm trying to create an api route with input parameters but I'm not getting the expected result. Here is my webapi.xml: <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/...
8
votes
1answer
1k views

Magento 2 rest API - How to Manage API Authentication Lifecycle on Mobile Devices Application?

In Magento [2.2.4] web API when i pass username and password then it generates token for that specific customer (Which is only valid for 1 hour - it's configurable from admin) http://magento.host/...
8
votes
2answers
3k views

Including generated 3rd party PHP library in Magento2

I am creating a module that connects to a SOAP service, I have generated classes for this service using wsdl2phpgenerator which uses autoload.php. Placing this in "lib/" with the correct class namings ...
8
votes
3answers
2k views

How to upload a file attachment to custom product attribute using Magento SOAP

This is in relation to my question; how-to-get-a-products-file-attachments I'd like to make a script (not on the server) that can utilize the Intellimage_Attachs module in my other question. I am ...
8
votes
1answer
2k views

Getting started with Magento REST API

So the official documentation is very terse (bad!), particularly for someone who hasn't worked with REST/Oauth in the past. I'm using Magento 1.8.1 CE. Can somebody provide a simple PHP example of ...
8
votes
1answer
2k views

Logger for SOAP Requests

we want to connect an external fulfillment partner to Magento and want to log their API requests. Is there any free and open source API logger available?
8
votes
1answer
471 views

What is the recommended page size for GETting sales orders through REST API calls?

I am trying to make a GET call to the Magento 2 REST API to get all the sales orders. What is the recommended page size I should be using? Is there any upper limit on the page size?
8
votes
1answer
974 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'...
8
votes
0answers
823 views

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, ...
8
votes
0answers
535 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 ...
8
votes
3answers
2k views

How to get recently viewed products by customer id?

I want to expose through a SOAP WS the most recently viewed items of a customer. How can I reach those items? I know they're stored in 'reports/product_index_viewed'; however, I don't know which is ...
7
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
1answer
3k views

How do you use the API to add products to a bundle?

I'm developing a system that integrates an existing Django application with a Magento store. I've managed, using this library, to create bundle-type products, along with attributes and categories as ...
7
votes
2answers
16k 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 ...
7
votes
4answers
2k views

Creating a custom module to send order details to external supplier API via XML or JSON

I'm trying to write a custom module for Magento that when certain items are ordered and payment has been made, posts to our clothing supplier's site with details of the ordered item, delivery address ...
7
votes
2answers
531 views

Magento2 Admin dashboard chart is broken in my all Projects

Today suddenly my admin dashboard chart is not visible. Live and Test websites are on different server and suddenly today it's broken. I have check in log file and found that [2019-03-19 05:51:17] ...
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, ...
7
votes
2answers
1k views

Add category image with REST

Has anyone successfully uploaded an image for use with a category? When going through the documentation @ http://devdocs.magento.com/swagger/index.html#/ I don't see any implementation that could ...
7
votes
2answers
5k views

Programatically created order not adding bundle products correctly

I have an order flow outside of Magento that uses both Magento's direct methods and API SOAP methods to create an order. (The API was used completely at first until we found out it wouldn't pass the ...
7
votes
1answer
1k views

Magento 2 : How does shipment tracking data get stored?

I'm trying to figure out how shipment tracking data is stored. Especially when it's set by the API. So when I look at sales/etc/webapi.xml I see the following. <route url="/V1/shipment/track" ...
7
votes
2answers
7k views

Incorrect Location URL returned by V2 SOAP WSDL

When fetching the V2 WSDL via this URL: www.example.com/shop/api/v2_soap?wsdl=1 It is defining the wrong URL for requests: <service name="MagentoService"> <port name="...
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....
7
votes
1answer
3k views

API call to get a list of products and their attributes in one call

I am currently using a foreach loop to iterate through the products and then retrieving the attribute I need. This is very slow, because it makes a call for each product to the API and retrieves the ...