Questions tagged [api]

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

Filter by
Sorted by
Tagged with
6
votes
6answers
23k views

How to create order programmatically in Magento 2?

I have special order form and now I need to create orders without payment. So the payment needs to be skipped. I am not sure what would be the best way to accomplish this part. Should I send my form ...
24
votes
4answers
16k 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 ...
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?
48
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 ...
14
votes
3answers
2k 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 ...
3
votes
2answers
528 views

Rest API - magento 1.9 - Return 403 Access denied - Magento\Framework\Webapi\Exception::HTTP_FORBIDDEN - format - https://abc.in/api/rest/customers

Error : Rest API for customer return 403 access denied error. Format : website/rest/api/customer -> 403 access denied error Magento\Framework\Webapi\Exception::HTTP_FORBIDDEN
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/, ...
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 ...
23
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 ...
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
5answers
12k 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?
5
votes
1answer
8k views

Magento 2 REST API add product with category

I'm adding products with the following way to /rest/V1/products on Magento 2. How can I add a product to a specific category? I'm using curl to post the data and can see the product added. ... ...
12
votes
2answers
9k 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 ...
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 ...
1
vote
1answer
4k views

Magento 2 - sales_order_shipment_save_after

I need to call some API on ship item from magento but nothing is working. Following things I already tried: 1) Use event/observer: sales_order_shipment_save_after (As I thought It will work in ...
24
votes
2answers
19k 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, ...
11
votes
2answers
11k 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
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 ...
5
votes
0answers
105 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/...
8
votes
2answers
380 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 ...
2
votes
1answer
777 views

Magento 2 : Wish list of customer Using API

Get wishlist of customer using Magento 2 API. I refereed Magento Dev but, I'm not able to find wishlist for customer.
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 ...
4
votes
2answers
1k views

How to Get core_config_data using Magento soap api?

How to get value of core_config_data eg. general/region/state_required using Magento soap api?
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, ...
6
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?
5
votes
1answer
1k views

Magento 2 - “Property \”Slider\“ does not have corresponding setter in class ”Magento\\Eav\\Api\\Data\\AttributeOptionInterface\“.”

I am trying to override Magento\Eav\Api\Data\AttributeOptionInterface in my custom module. I want to add one new option to existing interface. The idea behind is, As of now we can only pass defined ...
18
votes
2answers
28k 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 ...
7
votes
2answers
5k 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 ...
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/...
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=...
2
votes
1answer
297 views

How to solve Soap_V2 - Uncaught SoapFault exception looks like we got no XML document - SoapClient->__call('login', Array)?

After configuration SOAP_v2 for getting products info, Magento version : 1.9.2.3 Code: <?php $proxy = new SoapClient('abc.com/api/v2_soap/?wsdl'); $sessionId = $proxy->login((object)array('...
7
votes
2answers
19k 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 ...
6
votes
2answers
8k views

Programmatically Update Image Labels

I'm trying to update my product images' labels. I want them to be the same as the name of the product. What I've tried $mediaModel = Mage::getModel("catalog/product_attribute_backend_media"); $...
3
votes
2answers
941 views

Is there a Magento API reference?

Is there an API reference or documentation for Magento that I can refer to find out the methods available in the different Mage classes? Let's say I want to find out more about the method ...
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
8k views

soap api : Start tag expected, '&lt;' not found'

I am getting some soap fault error with the message as below : <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><...
6
votes
2answers
2k views

configurable product options are not added to cart using magento soap api

I have tried to add a configurable product in using magento soap api. I am using the following code to add $product = array( 'product_id' => 23, // simple product id ...
4
votes
3answers
1k views

Magento 1.x API V/s Magento 2.x API

I have a project in which we are using Magento 1.4 API for mobile app now we want to migrate our platform to Magento 2.x . My question is that what's different in Magento 2 API V/s Magento 1 API ...
2
votes
4answers
4k views

MIME type not valid when uploading image using REST API

I'm trying to set a product image using the web api by POSTing to this url: http://my_magento_server/rest/V1/products/my-url-key/media With the following content: {"entry": { "media_type": "...
1
vote
1answer
5k views

SOAP API Call not working with Magento 1.9.1.0

I am facing a issue with the SOAP Call request in Magento ver 1.9.1.0. I have tested the code in my local site, it works fine, but when i move the code to my online server it is not working. I have ...
0
votes
1answer
754 views

Magento 2: How to put authorization to custom module API

I am developing a webapi for my custom module. I referred the below article and able to create the basic webapi that will accept arguments from the URL and do some processing. http://alankent.me/...
0
votes
0answers
16 views

Validate email using MAGENTO 1.9 (not way)

I've been trying several times to validate an email from my website against MAGENTO without success. I know it is possible to use MAGENTO REST API through JAVASCRIPT or maybe a PHP script but THIS IS ...
0
votes
1answer
384 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
301 views

Magento1.9 inventory updates api

I have a fields in inventory section qty, like below scree shot, i wants to update the qty fields both at a time using magento1.9 soap apis, In the above screen shot i wants to update Main and ...
10
votes
2answers
7k 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 ...
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 ...