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

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

0
votes
0answers
7 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
1
vote
0answers
11 views

How to convert 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
23 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
25 views

How to add me 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
27 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
21 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
24 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 ...
0
votes
1answer
19 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 ...
1
vote
1answer
43 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('...
0
votes
0answers
11 views

Product Attribute Options

I am currently utilizing the rest api for Magento 2.2.6 to update product attribute options. I am talking about this API: catalogProductAttributeOptionManagementV1 GET /V1/products/attributes/{...
1
vote
1answer
51 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
50 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
8 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
8 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 ...
0
votes
0answers
8 views

Not able to use ShipperHQ custom shipping method while creating the order using Magento 2 API

We are in Magento enterprise cloud environment and use Magento 2.2.6 version. We have enabled ShipperHQ, but not able to use ShipperHQ custom shipping method while creating the order using Magento 2 ...
2
votes
0answers
23 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"...
0
votes
0answers
14 views

magento 1.9 + REST API+ POST Method _create

I would like to know what is the right way to return data or single id for REST POST Method in magento 1.9 Please help me out.
0
votes
0answers
12 views

Magento 1.9: Rest Api + _create method return 301 status

I try to create a _create[post] REST api in magento 1.9 but i am getting issue while print or return some data from api. This api work perfect on localhost with 200 status code, But on server it ...
0
votes
0answers
22 views

Consumer is not authorized to access %resources

I am trying to access Orders in Magento 2.2.6 but i am getting the error Customer is not Authorized to access... I am testing with POSTMAN with two types of Auth, User and Pass, and also with ...
3
votes
1answer
29 views

How to create Mobile Application of Magento 2 Native?

How to create Mobile Application of Magento Native ? Using Magento 2 default REST API's how to create Front-end Magento 2 application ?
0
votes
0answers
21 views

M2: Updating stock with API call

Our inventory management software is trying to update our stock levels through API call but constantly getting a 400 error with following message: {"message":"%fieldName is a required field.","...
0
votes
0answers
20 views

API call issue updating a subscription

I'm integrating with a third party app for subscriptions. I've got everything working and synching properly but I'm having an issue if a customer has one subscription active and one subscription ...
0
votes
1answer
33 views

How do I correctly access WSDL for SOAP connection?

When running this, I only get an "HTTP ERROR 500" page. As I've seen in other solutions I've added the 'index.php' before the /api section. I've also enabled WSI-Compliance mode as I've seen suggested....
2
votes
1answer
22 views

PHP Online refund in Firstdata payment gateway (Payeezy)

I have implemented the Firstdata payment gateway for online payment. It is working fine. Now I want to implement the online refund functionality. If anyone provide me the sample script for Firstdata ...
0
votes
0answers
13 views

Refresh Cache via JSON API

When there are changes to prices and/or currencies, the cache in Magento needs to be refreshed (there are also other times, but that is my current focus). The changes are sent via the JSON API, and ...
0
votes
0answers
24 views

API call on click of button in magento 2

I am new to magento2 and I am finding it very difficult to call API, actually my requirement is as follows. I have a button at checkout page on click of that I want to call API and I need to get the ...
0
votes
1answer
25 views

How to check is valid token or not. Magento 2 API

I need to do API method, which return data from db table just for admin. There is my method: /** * @return array * @throws \Magento\Framework\Exception\LocalizedException */ ...
1
vote
0answers
16 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 ...
3
votes
2answers
170 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 How can i solve the ...
0
votes
0answers
21 views

API catalogProductAttributeOptionManagementV1 return different result than doc

When I'm using catalogProductAttributeOptionManagementV1 API (get All options of attributes), with the URL https://local.dev/rest/V1/products/attributes/color/options, I get this result : [ { ...
0
votes
1answer
24 views

REST API routes for blog-module

I can't seem to find the API routes for this module, while the module is available by API. How can I translate the code to API routes? https://github.com/mirasvit/module-blog
2
votes
1answer
107 views

Magento 2 Api/Data, When To Create It?

I have fairly simple REST API request to get guest country code by his ip. In my block file this works perfectly fine when using curl: $url = "http://........./".$guestIp."?access_key=".$...
0
votes
2answers
22 views

Magento2 Shipping Methods rest api

Is There any possibility to fetch all shipping methods using rest api in magento2 Thanks
0
votes
1answer
33 views

Create REST API with post params

I have below JSON Data for rest API {"region_id":"475","city":"city","item":[{"qty":"1","weight":"","price":"10.0000","sku":"test"}]} and i wann to create api class I do like this /** * @api * @...
0
votes
0answers
22 views

Customize the API error response

I need to customize the JSON response of the Magento REST services when an exception is thrown. Examples: { "message": "Request does not match any route.", "trace": null } { "messages": ...
1
vote
0answers
33 views

Magento get product link using V1 API

$storeUrl."/index.php/rest/V1/products?searchCriteria[page_size]=200&searchCriteria[currentPage]=1" It returns products list but I want to get each product link. How it is possible?
0
votes
1answer
30 views

Add No-Required params to custom REST API

I made a custom REST API on Magento 2. I want some params to be required and other to be no required or accept null. I have the next code: Api/Order/ShippingInterface /** * API00004. Envío de ...
2
votes
2answers
76 views

Consumer is not authorized to access %resources Magento_Sales::sales

I have this basic API script: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); $usr = [ 'username' => 'username', '...
2
votes
1answer
34 views

I am trying to override core interface in Vendor\magento\sales\Api\Data\OrderItemInterface.php

My di.xml code is here, is there any alternative way to override an interface for core file. <preference for="Magento\Sales\Api\Data\OrderItemInterface" type="Vendor\Name\Api\Data\...
1
vote
0answers
42 views

Magento 2 - How to add custom order item field on order export API

I added a new field on table sales_order_item. I need to display it on REST API order export, in the "items" node. Is it possible to do that ?
22
votes
6answers
470 views

What is Progressive Web Apps, or PWAs in Magento 2?

What does it mean that Magento is becoming a Progressive Web Application platform? What will be the code structure of PWAs in Magento? What is the deal with REST APIs and PWAs?
1
vote
2answers
61 views

Magento 2 - Update multiple products programmatically

I'm trying to update products programmatically but I got only first product from array updated. All of products in array have status "2" (disabled) in DB. I'm using $this->...
1
vote
0answers
28 views

Magento 2 API - crud for all tables

Is it possible to create a new REST API to update or create data in all magento tables from a xml added in POST : <data> <row table="Nom_Table_1" key="Nom_Champ_Key_1"> <...
1
vote
0answers
22 views

Problem with importing from Cludes ERP System to Magento backend

I am importing products from Cludes ERP System, but Product base image is not set in Magento Backend.
1
vote
0answers
12 views

Can we implement Alexa Skill to use with our Amazon pay Account in magento 1

In Magento 1 websites, we want to implement Alexa Skills to use our amazon payment account. Can anybody please share knowledge/steps/guide, how we can implement alexa skill to use our amazon pay ...
2
votes
0answers
46 views

Magento 2 for logged In customer need to add shipping address every time i place a new order?

This is what i am following... 1. Add Configurable product in cart. http://magento-host/index.php/rest/default/V1/carts/mine/items method : POST Authorization : Bearer <customer token> body ...
3
votes
1answer
39 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 ...
2
votes
1answer
31 views

Magento cancel onhold orders

Is there any possibility to cancel the on hold orders magento1.9 soap API.
5
votes
1answer
79 views

How to capture the User ID using magento's customer Token?

How do I make a call to that URL that captures the User ID, using Magento customer Token in magento 2 rest API? How Magento 2 makes calls in-between for the APIs ?
4
votes
0answers
58 views

What are the use of ExtensionAttribute JoinProcessorInterface and CollectionProcessorInterface at magento 2.2.3

I built Magento 2 Module which has a model and Service contracts/API. During this implementation, I have followed vinai Kopp article and also magento2 module Magento_Quote. On this Magento\Quote\...