All Questions
1,856 questions
3
votes
1
answer
1k
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 ...
0
votes
1
answer
2k
views
How to Get all Order using GraphQL in Magento 2?
I want to get all Pending order Status Orders using GraphQL, Anyone can share a complete example or module. How to I'll do that ?
I have create Custom module Admin Grid, Now i want to display Only ...
2
votes
1
answer
3k
views
Magento 2 filter products by price from Rest API
Magento-2 we would like to filter the products from REST API
I have filtered product by price in the frontend please check the result in the below screenshot
(24-MB02 price and special price we ...
1
vote
1
answer
2k
views
Magento 2: Rest API "Checkout Cart Product Add After" event is not working
I have faced issue in checkout_cart_product_add_after event using add to cart rest API.
Same add to cart event is working in website. But it is not working in Add to cart rest API.
Add to cart API ...
0
votes
2
answers
1k
views
Get product using SKU with respect to the store data using Magento 2 REST API
I use the core API /V1/products/:sku to get the product using the SKU.
for example, I have 2 stores, one in English and another in Japanese.
My API Endpoint is like
http://local.mystore.com/storefront/...
0
votes
1
answer
28
views
Adding Groped Products items to the cart using the Api
I am using this endpoint :
http://mage.local/rest/V1/carts/3747/items
and this is the body:
{
"cartItem": {
"sku": "8717752030514",
"qty": 1,
&...
0
votes
1
answer
3k
views
Magento 2 Rest API getting "The signature is invalid. Verify and try again on some installations but works in postman
I have a small php script that fetch some product information from the Magento 2 Rest API.
The problem I am facing is that it works fine for some Magento 2 shops, but not others. For some shops I get
&...
0
votes
1
answer
29
views
How to save products in bulk using API?
I am new bee in API development and need to save bulk products in my Magento using API.
Do I need to create custom API module or is there any default API to save the products in magneto2?
What are the ...
4
votes
3
answers
8k
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
1
answer
1k
views
API to add an option gives me an error: {"message":"%fieldName is a required field.","parameters":{"fieldName":"option"}}
I've been using the Magento API for a while now, and create products via it, as I am now using 'Option' in a dropdown I want to populate it if the option is not found....
As such, I am using the ...
2
votes
3
answers
2k
views
400 bad request from rest/default/V1/carts/mine/estimate-shipping-methods
Whenever I go to cart page or checkout page after adding products, console always throws 400 Bad Request. I tried reinstalling Magento and did many things but there is no luck. Estimate shipping ...
2
votes
2
answers
1k
views
Magento 2 : How to clear cache using REST?
How can I clear the Magento 2 page cache using REST API after updating the product quantity from 0 to 10?
1
vote
1
answer
2k
views
Magento 2 How to get the Order Extension_Attribute Value in AfterPlugin
How to get an order's extension attribute value when creating the order via the API?
For example to create an order I'm calling /rest/V1/carts/mine/payment-information with the following payload:
{
...
3
votes
4
answers
1k
views
Magento 2 - Between "Rest" and "Soap", Which is better then one?
Between "Rest" and "Soap" API, Which is better then one ?
I have some cases below:
1) Apply for mobile app call web-service.
2) Apply for desktop app call web-service.
3) Apply for web app call web-...
0
votes
4
answers
2k
views
how to get rest URL in Magento2
I need to get a link of this kindhttp://localhost/Magento2/rest
I have a code by which I get base_url:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $...
2
votes
1
answer
5k
views
Error Consumer is not authorized to access %resources
It seems that similar questions have been asked but none seem to solve my specific problems. We have developed a routine to automatically update and create product information using the REST API. This ...
1
vote
2
answers
2k
views
Login into Magento 2 site from external site
I have a site outside Magento's domain and I should allow Magento customer to login into Magento Store from this external site. Being completely new to Magento , I don't know how to implement this ...
0
votes
1
answer
10k
views
Magento2 REST API get all customers details
public function __construct(\Magento\Framework\App\RequestInterface $request,
\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerFactory
)
{
$this->...
4
votes
2
answers
3k
views
Magento 2: Override for product custom option value Interface and model file
I have added custom product option value to below interface ProductCustomOptionValuesInterface.php and Value.php model file.
File path: magento2/vendor/magento/module-catalog/Api/Data/...
4
votes
1
answer
2k
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 ...
0
votes
2
answers
4k
views
Need Help To Connect Magento Rest Api using curl
I would like to use cURL to get all orders using rest API. Can I use cURL instead of Oath.
I tried with cURL but returns 403 Forbidden.
I have tried with below code :
$params = array(
"...
0
votes
1
answer
2k
views
Magento 2: How to run CLI command on admin store (storeId:0)?
I have a multi-store setup with Magento 2.1.7 CE on the domain a, domain b, domain c. I want to apply images to some products programmatically. When I make an API call on any domain with the "all" ...
1
vote
2
answers
3k
views
Bulk price and quantity update using rest api
How to update price and quantity in bulk using rest api, provide us the process to update in bulk using rest api.
Single price and quantity is updated using rest api, but i need to update in bulk ...
8
votes
1
answer
2k
views
Magento 2.3 V1/Search with sortOrders not working in REST API
Magento 2.3 Search Criteria with REST API, SortOrders not working in V1/Search API.
I am trying to fetch Category products using Magento REST API by below request URL.
http://127.0.0.1/magento230ee/...
0
votes
1
answer
1k
views
Rest Api service for shipping information Post -
V1/carts/mine/shipping-information for this service which parameter are required..
I had given below parameters
{
"addressInformation": {
"shippingAddress": {
"id": 0,
"region": "...
1
vote
2
answers
4k
views
Magento 2 REST API delete all products
I want to delete all product using Rest API in Magento 2.
1
vote
2
answers
4k
views
Rest API import product Magento2
I want to add a product using REST API but don't know how should I do.
could you please help me what should I do? Magento 2.1 I use. this is the code that i used:
{
"id": 989898989989989898,
"...
5
votes
2
answers
4k
views
Retrieve all available shipping methods/carriers via REST
We're looking for a way to generate a list of all available shipping method codes and shipping carrier codes via REST API. I'm only seeing this available via the cart but I'd like to be able to ...
3
votes
1
answer
1k
views
magento 2 : Place order using REST API and stripe payment method
We are working on mobile which use magento 2 REST API. In which we are facing issue while try to place order using Stripe payment method. For stripe we are using magenest stripe extension.
REST API ...
0
votes
2
answers
3k
views
Magento 2.3.5 - API error The "array" class doesn't exist and the namespace must be specified
We get the following API error on our Magento 2.3.5 store;
The "array" class doesn't exist and the namespace must be specified. Verify and try again.
More info;
<![CDATA[#0 /vendor/...
2
votes
2
answers
2k
views
Magento2 REST API products list and out of stock
In the api call V1/products i get also out of stock products, even though I've set in Stores->configuration->catalog->inventory "Display out of stock products" to No.
there's a way to get rid of this ...
0
votes
2
answers
1k
views
How to add Customer Address Attribute to order API rest/V1/orders - Magento 2
I want to add Custom Address Attribute field in order api,
The field data is saved in sales_order_address table, but it dosen't show in order api
Anyone have idea how to add it to order api?
0
votes
2
answers
3k
views
PUT request on Magento 2 REST API through Postman
I'm trying a PUT on Magento 2 REST API through Postman like this:
https://domain/rest/V1/products/IP_X
With only a price change on the JSON content.
I'm getting the following error message:
{
&...
0
votes
1
answer
2k
views
Magento 2 - Custom REST api POST method not working
I have created a custom rest api module. When i am using GET method it's working fine. But when i am trying to use POST method it giving below error
Request does not match any route.
Does anyone ...
0
votes
0
answers
11
views
Add To Cart API and Read From Cart API, unable to retrieve configurable product variant - Magento 2.4.4-p4
So I was creating an add to cart API and read from cart API
The problem that I encounter is unable to retrieve variant of configurable product
Below are my addToCart API code
/**
* POST add to ...
1
vote
0
answers
76
views
The consumer isn't authorized to access %resources. Magento 2.4.7 & 2.4.7-p3
The consumer isn't authorized to access %resources.
{
"message": "The consumer isn't authorized to access %resources.",
"parameters": {
"resources": "...
1
vote
1
answer
2k
views
Magento 2 API get product price
I'm building an iOS application for my store, and I'm looking for a way to get the correct price of an actual product.
Looking at the API I only find requests to get raw product information.
http://...
6
votes
3
answers
4k
views
How to Get Customer data by telephone number in Magento2?
I have a telephone number which is given in Default address..by using this telephone number i need to get Customer Full data.Data like customer id, customer full name..etc
0
votes
2
answers
1k
views
How to get coupon times used with coupon code using REST Api?
I have no experience with Magento. I was asigned the task to validate a coupon code via magento rest api. I've tried to use /V1/coupons/search GET method. My request url is:
https://example.com/...
5
votes
1
answer
1k
views
Magento 2 : Wrong order created and updated date in rest api response
I am fetching the orders using Magento 2 REST api services. I am using IST timezone the dates saved in the database are in correct timezone. I have set timezone to "Asia/Kolkata". On customer ...
0
votes
1
answer
1k
views
Filter orders using Product Id in Magento 2 Order rest API
I am using this API "http://localhost/test/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=product_id&searchCriteria[filter_groups][0][filters][0][value]=24"
to filter orders by ...
4
votes
2
answers
2k
views
How to get pdf file in response for Magento 2 rest api?
Currently Magento 2 is providing JSON and XML response in web REST API
I want to include a custom response format PDF.
So if any third-party will call our API then we can sen them PDF in response.
3
votes
1
answer
3k
views
Retrieve Entity Id from REST API using Order ID
Working with the REST API on Magento 2.1.9 I notice that the Entity ID is needed for the /V1/orders/ endpoints. How can entity_id be retrieved via the API when I only know increment_id?
1
vote
1
answer
2k
views
Injecting Guzzle with Parameters Magento 2
Writing some REST API bits and going to use Guzzle, which I have used many times before.
The issue I am coming across is, I know Guzzle has to take the configuration via parameters when constructing ...
0
votes
3
answers
2k
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
3
answers
2k
views
custom "sales_order_item" attribute to API response
I followed this guide to add a custom product attribute to quote and sales order item throughout the order process and this works fine.
My custom attribute is added to the sales_order_item table ...
0
votes
1
answer
2k
views
Magento 2 Rest Get Orders C#
I am using C # to search for orders from last month (last 30 days). Magento version 2 using REST, I am using the call as follows:
http://magentoserver/index.php/rest/V1/orders?searchCriteria[...
0
votes
1
answer
2k
views
Magento 2 set order extension attributes via API
Is it possible to set an order's extension attribute value when creating the order via the API or is there an appropriate API endpoint to update an existing order with this information?
For example ...
0
votes
0
answers
5
views
Get CartID of existent cart
Yes, I can create cart and get ID in post answer, but how to get the id of existent cart to manipulate with the items, for example. Preferred way is REST API, may be cookies, storage, etc, make be ...
0
votes
0
answers
17
views
API with price filter and configurable products
I'm working with the Magento 2 API and can't work out why when using a price filter configurable products are being filtered out completely from the results. I remove the price filter and the products ...