Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
10 views

Magento2 Update customer attribute via API

I'm trying to update an attribute for a customer using the rest API Being that I have a customer id, it should be a simple API call to /V1/customers/{id} The description of that endpoint is Create or ...
0
votes
0answers
7 views

Magento 2 user field validation using an API

In a dedicated data table where we stored customer's privilege card number in order to validate them with users that they enter to a field called "privilege card no" On such an occasion I'll have to ...
0
votes
0answers
10 views

Preventing recursion in custom Magento API

I'm having some issues dealing with recursion in a custom API endpoint I have written for Magento 2. I have an endpoint that returns an entity which contains a number of fields, one of these fields ...
0
votes
0answers
3 views

Programatically change all product names to the short description

I would like to modify the way Magento loads the product names and change it to load the short_description instead. We use the API to synchronize between an ERP and the Magento itself, so once the ...
0
votes
3answers
48 views

how to pass json ecoded array in custom magento2 API

I have created custom API that excepting 'mixed' type parameter and returning the 'string' as I defined. In interface I define parameter type 'mixed'. As I am trying to pass array as json_encode, it ...
0
votes
0answers
11 views

How to add product with category name instead of category id in Magento using Rest API

I want to add product with category name instead of category id in Magento using Rest API.
1
vote
1answer
27 views

Magento 2: Api getting product collection using category id

I am trying to get product collection using Rest Api Below is my code file: ProductsManagementInterface.php interface ProductsManagementInterface { /** * GET for Products api * @param string $...
0
votes
2answers
46 views

First steps of creating API integration with Magento2.3

background: I'm new to Magento as I haven't used it before, but I've read through most of the API documentation now. I have an online dashboard application with various widgets that are different API ...
0
votes
0answers
13 views

How to get Image data in Magento\Quote\Api\CartTotalRepositoryInterface using extension_attributes?

GET V1/carts/mine/totals This API Returns information for the cart totals a specified customer. How to get Item Images using extension_attributes on get function of Magento\Quote\Api\...
7
votes
1answer
99 views

Magento 2: get product through api using product name

I want to get product information using product name in Magento 2
0
votes
0answers
16 views

undefined rest api checkout cart

We've multiple websites in Magento (magento2.2.4) and we've got an issue at checkout cart and checkout page. We have also enable guest checkout. "/checkout/undefinedrest/buy/V1/guest-carts/.../buy/V1/...
1
vote
0answers
14 views

How to save lines of my custom object via API?

I have the next JSON example and I need to save this with a model via POST. The problem is how to save the field lines of this JSON... { "sizeCurves": { "external_key": "...
1
vote
0answers
14 views

API issue returning object

We have this API where we save different fields, but the object $lines we have created doesn't save properly. The code below are the getters and setters for the object $lines. Save method API: ...
0
votes
0answers
12 views

How to get Timezone details in magento1.9 through magento Soap or Rest api

How to fetch Magento 1.9 store timezone using API. I am able to get store_id, code, website_id, group_id but no timezone. In Magento 2.0 and above I am able to fetch timezone but Magento1.9 API is not ...
0
votes
0answers
12 views

How to get the Admin code of an option from an attribute? REST API

I have a problem, and I want you to give me a light at the end of the tunnel. I am doing an integration REST and need to get some information from the options of an attribute, in the admin panel I ...
0
votes
0answers
8 views

Dual CMS setup login to Magento from primary site

We have a dual setup for our website, most of the site is served up on another CMS but the commerce side is all Magento 2. The primary CMS doesn't have any frontend logins for users but we need to ...
0
votes
0answers
10 views

Using product api to upload video but deletes the product custom image roles

I am using api call = rest/all/V1/products/sku/media to upload video to a product but it deletes custom image roles. Can anyone please help me out.Thanks in advance.
1
vote
1answer
46 views

Magento 2 REST API ship order tracks error

I can create a shipment for an order via REST API. But when i try to add tracks i get the error: Carrier Code can not be empty. This is my code: Array ( [items] => Array ( ) [...
0
votes
0answers
14 views

Magento 2 API authorisation error

I am trying to get API for product attributes. http://mysite/elec/rest/V1/products/attributes?&searchCriteria[filterGroups][0][filters][0][field]=attribute_code&searchCriteria[filterGroups][...
0
votes
0answers
15 views

How to solve Soap API : Could not connect to host Error?

I am using SOAP V2 : abc.com/api/v2_soap?wsdl getting details from OroCRM, after Sync most of the data syced, but few of them not sync properly. Error Message : [message] Could not connect to host [...
1
vote
0answers
23 views

Magento 2 Rest API get all products with certain attribute_set_id

I need to elaborate de URL that will bring all products with certain attribute_set_id through Magento 2 Rest api, and then change though the api the attribute_set_id of all those items. My problem ...
-1
votes
0answers
20 views

Magento 2: Get Cart Items From Outside Magento

I am fairly new to Magento, and I am trying to integrate its cart in a website that is not using Magento. Basically I have a central website, a shop, running Magento 2. I would like to show items in ...
-1
votes
0answers
15 views

Magento 2.2 : Session-based authentication not working

If I want to access: https://www.myshop.com/rest/V1/customers/me I have an empty response 'not authorized to access' ... If I first login as a customer and access the same page, it should give me ...
0
votes
1answer
10 views

what are the basis on which I should define resources tag in webapi.xml

what are the basis on which I should define resources tag in webapi.xml. for example if I build an api to return product information who can access it. I've searched for that but all I found is what ...
0
votes
0answers
24 views

How to show quote_id in response of /carts/mine/totals API in magento-2.1?

I want to show quote_id in response of /carts/mine/totals API in magento-2.1. Anybody guide me.
5
votes
1answer
139 views

How to get recently viewed products by Customer Id in Model file Magento 2?

Create Recently Viewed Products for Model file in Magento 2 ?
2
votes
1answer
37 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. ...
0
votes
0answers
38 views

Magento SOAP Cannot create an empty shipment C#

I am trying to create sipment with SOAP API in C# here is my code (I create API based on this documentation: magento.docs: ... orderItemIdQty[] itemIdQties = {}; foreach (var itm in tmp.items) { ...
0
votes
0answers
14 views

How to get the Api response in another custom folder of magento2

I am calling one API in custom module to calculate the tax , now I want the response in another folder of my custom module how can i achieve this? can anyone help me to solve this?
1
vote
1answer
42 views

Magento2 save Custom shipment field by API

I have add field track_url in table sales_shipment_track. I'm creating shipment with API http://192.168.0.105/magento2/project/rest/V1/order/1292/ship { "items": [ { "order_item_id": ...
4
votes
1answer
87 views

Get tax class ID by tax rate with REST API

I'm trying to get a tax class ID with only the tax rate value, all with the API. I found that I need a first request that returns me the tax rate ID : /rest/all/V1/taxRates/search?searchCriteria[...
0
votes
1answer
217 views

Magento 2 How to add custom attribute to Quote Item Rest API

I want to add custom attribute to http://{{magento2}}/rest/V1/carts/mine/totals API response. I have done follwing way but it not working. extension_attributes.xml <config xmlns:xsi="http://www....
0
votes
2answers
50 views

Magento 2 Add New Integration error

I have seen this has been posted before but but cannot find a definitive answer. When trying to add a new integration (System > Integrations > Add New Integration), the New Integration page ...
1
vote
1answer
91 views

How get wishlist in Magento 2 Rest API?

Get Wishlist product in Magento 2 REST API ? And Add to Wishlist in Magento 2 REST API ? Wishlist API is not provided by Magento 2
1
vote
0answers
22 views

Magento2.2 How to get userContext into ScopeConfig

It's more a core logic issue than a technical issue! I created one new table for admin_user: admin_user_config_data |config_id|user_id|path|value And, like in core_config_data, in this new table ...
0
votes
0answers
25 views

How to make API call on placeorder in magento2?

I am working on payment module, in that i need to call API , I tried to include that in namespace\modulename\Model\Newcc.php::capture() and even tried to include in namespace\modulename\Model\Newcc....
0
votes
0answers
10 views

Update Custom tax amount in credit memo in magento soap api

I would like to add custom tax amount to credit memo by using soap api in magento1.9 Help me Great. Thanks
4
votes
0answers
55 views

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

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/v2_soap/?wsdl', array('trace' => ...
2
votes
1answer
35 views

customer not logged

I'm building rest api to get data based on customer session, but it always returns false when I call isLoggedIn() function that's my module.xml: <?xml version="1.0"?> <config xmlns:xsi="...
0
votes
1answer
49 views

How to add my own Magento 2 WSDL file

Magento 1.9 I used the WSDL https://github.com/marouanbmm/magento-Apis/blob/master/code/local/Tecnifibre/SerienFlow/etc/wsdl.xml file as part of my development Delphi win 32 to have access to the ...
0
votes
1answer
121 views

Magento 2: Rest api for getting cart items is returns empty array

I need tho get current customer cart items using rest api, so I've created Cart module and Here is my interface: <?php namespace Bit68\Cart\Api\Cart; interface MyCartInterface{ /** * @api * @...
1
vote
1answer
25 views

How to download Invoice without login Magento Admin?

I need to get invoice without login Magento admin, is it possible using any CRM or API Services?
0
votes
1answer
26 views

Magento API error while creating gost account

When i'm pasing $customerObject->newsletter = $wantToSubscribe; in magento API in log there is error LogicException: Property "Newsletter" does not have corresponding setter in class public ...
1
vote
1answer
43 views

Magento 2.2: How to add a custom attribute in to Order?

I have created a custom attribute of type customer_address and I would like to have the API to return me the value as an attribute when I call the API to receive an order. Attribute: private ...
2
votes
1answer
114 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('...
2
votes
1answer
321 views

how can I get an image to be used in mobile app by rest api

I've written the following function public function getImg($sku){ $product=$this->productRepository->get($sku); $image=$product->getImage(); return $image; } as an api method ...
0
votes
0answers
67 views

What is the type of 'Magento\Sales\Model\ResourceModel\Report\Bestsellers\Collection'

What is the return type of the following function public function getBestseller(){ $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $productCollection = $objectManager-&...
0
votes
0answers
14 views

Add custom attribute to order API

I am looking for a way to read a field added with success using the order api. I can save any data I want to the sales_order (extension_attribute.xml). But I have no idea how to read it with API. ...
0
votes
0answers
15 views

Why to build api

While I'm building rest APIs to build a mobile app, like for example getting product by its sku and find its stock status. I see that APIs are already build by Magento. So why I need to build it? Can ...
2
votes
0answers
126 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"...