Questions tagged [api]

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

594 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
107 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 ...
3
votes
1answer
3k views

Rest API with Magento using PHP with example.

I am new to Magento and want to know how to write Rest web services with PHP. Please suggest me with any material or example with full explanation because i gone through many, but couldn't find a good ...
3
votes
0answers
360 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 ...
3
votes
0answers
411 views

Cart Product Update using API (SOAP v1) only updates quantity but not subtotal or total?

I can successfully add a product in cart and then check the cart.info to verify it. However, if I update any product in cart, only quantity is changed but the rowtotal, subtotal remains same Added a ...
2
votes
2answers
36 views

Not able to get data through API…!

Error is "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5dee36e254394". When you run http://localhost:8888/magento/rest/V1/position/1 Need to get result ...
2
votes
0answers
28 views

how to customize the Magento 2, Core API URL

I want to customize the magento 2 core base API URL. For example, If my magento base url is http://local.m233ee.com/rest/v1/ . As per my project requirement, i have to change the base URL to ...
2
votes
2answers
40 views

Update Cart Item quantity by customer quote id in custom API

I want to Update Cart Item quantity by customer quote_id in custom API. I have tried below code but it's not work with Magento 2.3 $quote = $this->quoteRepository->getActive($quoteId); ...
2
votes
0answers
39 views

Create Module For Send Order Notification on WhatsApp in Magento 2.3.2

I Want To Create Module For Sending Place Order Message On WhatsApp.. Or Also Any Free Extension Available For This I Tried WhatsApp Order Notification But Its Paid I Want To Free Extension Or ...
2
votes
4answers
140 views

Magento2 Copy data from one to another magento installation

I want to copy all data from one to another magento installation. Wants to copy products,product-attributes,category,category-attributes,customers,cms-block,pages,rules everything except orders. I ...
2
votes
0answers
50 views

Add product with customized option in the cart through API

I'm having a problem adding a product with custom options in the Magento cart 2.3.1. After defining a custom option as multiple selection, I tried to add the product to the cart with the following ...
2
votes
1answer
35 views

Create Update product REST API magento2.1

I got below error on my rest API on magento2.1 { "message": "%fieldName is a required field.", "parameters": { "fieldName": "product" } } My URL is: https://XXX/rest/all/V1/...
2
votes
0answers
26 views

Setting the weight unit which gets automatically generated

I am facing this issue since very long now, we have a delivery partner Ecomm express and one of our developers had integrated its API and now he's not working with us anymore. So what is happening ...
2
votes
0answers
33 views

Difference between StockStateInterface and StockRegistryInterface

I was using StockStateInterface to get stock qty, it was working fine in development and staging server but was not working in production server. Then I used StockRegistryInterface to get the result ...
2
votes
0answers
34 views

How to get the ordered items images in the order detail API in magento 2?

I need to get the product image in the order details API of the customer. Please help me to guide how can I achieve this. Thanks in ad
2
votes
0answers
54 views

Get and Add like(Favourite or Unfavourite) product in Magento 2 Rest API With URL?

Get Favourite product in Magento 2 REST API with URL? And Add to Favourite in Magento 2 REST API with URL?
2
votes
1answer
98 views

POST /rest/V1/carts/{cartId}/items isn't working when logged as customer

I'm trying to use all the /carts/{cartId} endpoint list in the magento rest API documentation with the cart ID I've recevied on POST /rest/V1/carts/mine but every time I'm getting a error "message": ...
2
votes
0answers
17 views

Magento 1.x API

In an integration with Magento 1.x SOAP v2 API through WSDL I've encontered many agencies with different Magento versions and WSDL files. The worst case scenario is when the "communication interface" ...
2
votes
0answers
247 views

Custom REST API for fetch all product with stock information

I am creating custom rest API for getting all products including out of stock products too but I am not able to get out of stock products. /** * Get products with filter. * * @param string $...
2
votes
0answers
84 views

Update select attribute in custom_attributes via catalogProductRepositoryV1 API PUT request

I'm trying to update a product with the catalogProductRepositoryV1. I want to change a custom select attribute for the given product. When sending the following request: { "product": { "...
2
votes
0answers
76 views

Magento 1.9 : I am unable to generate session using soap api v2

Can anyone help me, regarding soap api v2 , I am unable to generate session using v2 version, is there any changes to change? I am getting below error message: Fatal error: Uncaught SoapFault ...
2
votes
1answer
666 views

where to find Magento 2 API docs?

Finally I found out the magento 2 api endpoint for all products as below rest/V1/products?searchCriteria[pageSize]=20 but I need more detailed docs about api endpoints which I coudn't find out yet. ...
2
votes
0answers
43 views

What is the correct way to create Mock input interface in Web-Api functional test?

I've already write successfully a Web-Api unit test for a Custom API. But I'm wondering if there is a way to automatically create a Mock for input data for the API? For example, AccountManagement ...
2
votes
1answer
147 views

Duplicate sales order grid to custom admin page

I need to copy the sales_order_grid table to a custom admin page. Is there a way to do so using Magento's API?
2
votes
0answers
249 views

How to find Magento version using API (JSON specifically)

Using the JSON RestAPI, I need to do things slightly differently depending on the version of Magento due to as-yet un-fixed bugs (specifically https://github.com/magento/magento2/issues/18005). I can ...
2
votes
0answers
120 views

Magento2 Rest Api to Delete an item after place order

Can anyone help me how to remove an item from an order after order completion using resti api in magento2 Thanks
2
votes
0answers
26 views

Connect Customers With Recurring Profiles to MailChimp

Site Info: Meal prep company, running a site on Magento 1.9.3, the site was developed by a company in India, I work with these guys on some other projects as I'm not really familiar with Magento, but ...
2
votes
0answers
46 views

Magento 2 : Rest APi Management payment methods

I need a solution to manage payment methods. Ex. Credit cards. in the web version we have the option to list the cards already used in purchases. (html: // vault / cards / listaction /).   Is it ...
2
votes
1answer
134 views

event sales_order_invoice_save_commit_after is not being dispatch over REST API

May I know how can I dispatch event sales_order_invoice_save_commit_after when I create invoice via REST api? I noticed there are quite a number of extensions is observing this particular event but ...
2
votes
0answers
31 views

Is there an API for retrieving information about search terms (e.g. zero-result searches, etc)?

Couldn't find any information on this. Only v1/search, but that seems to be for simulating searches on the site. I'm wondering if there is a way (outside of using Google Analytics) to retrieve the ...
2
votes
1answer
372 views

How can I get user information from JWT tocken?

I'm react-native developer, I'm new to Magento, REST and OAuth. I want to use the Magento 2.0 OAuth REST API to login into my app I am getting this token as shown in the image, how can I use this ...
2
votes
0answers
83 views

Problem adding attribute options to configurable product via REST Api

I have been following the Magento documents about API's. https://devdocs.magento.com/swagger/index_20.html#/ I am using this API: catalogProductAttributeOptionManagementV1 Using Postman I POST ...
2
votes
0answers
64 views

Custom REST API returns duplicate “response” tag

I am struggling because I get an invalid response from my custom API module for Magento 2 (2.2.5). When I send a request to my endpoint via GET with the header "Accept application/xml" (which is ...
2
votes
0answers
91 views

If we can access data by using simple http request ,then why to use rest or soap api or curl?

I am accessing database using simple http request and use it on another interface.for example api's for Andriod or iphone .Even simple http request and method created in mage functionality without ...
2
votes
0answers
70 views

REST API: One Magento refuses to accept tokens

I have a weird problem- I am trying to use the REST API in Magento 2. I am using exactly the same method with two other Magento installations successfully, and I was looking for some help debugging ...
2
votes
0answers
24 views

How to develop a SOAP API as a guest user

I am trying to developing a SOAP API. For first I created a module like this app\code\MyVendor\MyModule in which I created etc\module.xml, etc\webapi.xml and etc\di.xml. Then I created my API ...
2
votes
0answers
93 views

How to Manage API Authentication Lifecycle on Mobile Devices? Magento2

Every hour regeneration of token and after that login again every hour is not logical for Mobile Application. Then how Magento manages user login data and authentication in Mobile application,...
2
votes
0answers
24 views

Magento 2. Looking at Magento 2 provided API they all start with /V1/… why?

Looking at Magento 2 provided API they all start with /V1/... Why is this? Is it mandatory? What is the reason behind this? Thanks
2
votes
0answers
71 views

Adding custom options in to cart through API in magento2.1

I have custom options like 'booking_from' and 'booking_till' in my custom module, everything works in the backend is fine. But how can I add those options in a cart through REST API in magento2.1.7? ...
2
votes
1answer
197 views

Braintree and Kount (GENE version 2.2.3) installation on Magento ver. 1.14.0.1

I'm trying to configure ENS via a Braintree, Kount, Magento workflow, and are experiencing errors that i'm unable to diagnose. Here's what I'm doing: Order # 100096149 | Jan 8, 2018 3:51:07 PM (...
2
votes
1answer
303 views

Is there any API for creating and editing catalog price rules in Magento 2.2.x

I needed to perform this task for a customer where I have to create, edit and delete catalog price rules in his magento site based on some backend functionality in another system he runs internally in ...
2
votes
1answer
730 views

Magento 2 How to get rest API response as an object?

I am getting rest API response as like below, [{ "field1" : "val1", "field1" : "val2", .... }] How do I get API response as object, without braces []. It will return only one object every time, so ...
2
votes
1answer
562 views

Get Configurable Products Under Specific Category REST API Magento 2

I am trying to get configurable products only under specific category using http://domain.com/index.php/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=type_id&...
2
votes
0answers
170 views

Catalog Search gives different results every request : Magento 2

I did search several consecutive times for catalog search in the search box in the header of the store, but every time gave me different results as following: Also, I can see this difference when use ...
2
votes
1answer
344 views

How to build Magento 2 rest API for product info using SKU

i am learning Magento 2 but i don't know how to create API for product info and am getting error while trying This page contains the following errors: Error on line 2 at column 1: Extra content at ...
2
votes
2answers
1k views

MG2 Integration give error Unable to post data to consumer due to an unexpected error

I'm follow the http://devdocs.magento.com/guides/v2.0/howdoi/webapi/integration.html and i have an error when i try do activates the integrator. [2017-06-20 05:22:08] main.CRITICAL: Exception: Notice:...
2
votes
0answers
132 views

Magento 2 : Add Custom Validation After Shipping Address Has Been Entered

When a customer enters their shipping address (in standard Magento 2 checkout process), I need to look at each of items in their shopping cart and call an External REST API to validate that item is ...
2
votes
0answers
231 views

Magento2 rest api error on product search on extension attribute

I've an extension attribute on products, declared in the following way: <attribute code="stock_item" type="Magento\CatalogInventory\Api\Data\StockItemInterface"> <resources> &...
2
votes
0answers
442 views

How to create product using SOAP API magento 2

I want to create product and update product using SOAP API , can anyone guide me how to do it with Magento 2. I am using bellow code to create product $wsdl = "http://thebetaserver.in/magento2/soap/...
2
votes
0answers
290 views

Magento API 2.1 catalogProductRepositoryV1 - cannot submit price

I am using magento 2.0 API catalogProductRepositoryV1 to POST my product to the magento. Below is my body. The problem that I am facing is that when I submit this product for the first time to create ...
2
votes
0answers
371 views

Create order with magento 2 api using credit cart payment method

I want to create order with Magento 2 API using check/money order payment method. I want to save check no. in database it's throwing following error:- ordered: string(104) "{"message":"Internal ...