As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [rest-api]

Magento REST API defines a set of functions that a developer can use to perform requests and receive responses. These interactions are performed using the HTTP protocol.

Filter by
Sorted by
Tagged with
0 votes
1 answer
72 views

GET Products API call with paging takes increasingly longer with each page number

On behalf of an integration with a client using Magento 2, we are fetching products from their Magento system using the /v1/products GET REST API call for version 2.4.4. They have a large number of ...
zola25's user avatar
  • 51
0 votes
0 answers
120 views

Magento2 Logout Customer using rest API

I am using magento2 core api for logout customer using id but it is not working
Syed Hassan Zamir's user avatar
0 votes
1 answer
158 views

Magento 2 How to Upload Image For Category Using Rest API?

I want to upload a Webp image for category using Rest API. i did the same thing for product with reference of product image upload API (that support image with jpg or png extension) that's provided by ...
Niraj Makwana's user avatar
0 votes
1 answer
997 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 ...
Wajahat Bashir's user avatar
0 votes
2 answers
119 views

Magento2 Customer Forget Password API

I am using the magento2 core password reset api in postman but it returns false I don't know what's the reason the customer with provided email is registered. I have also installed the SMTP extension
Syed Hassan Zamir's user avatar
0 votes
0 answers
128 views

Magento 2: Admin user getting 403 forbidden error from API requests

In my Magento 2 application I am simply trying to make a POST request to the /rest/V1/integration/admin/token enpoint to get an admin token for subsequent requests. My user is an admin user in the ...
Slippy's user avatar
  • 1
0 votes
0 answers
31 views

Unrecognized REST API order created

We have noticed a new order created in the admin which has come from the REST API. (Order was automatically cancelled) We have nothing running that creates orders in this way and the IP country and ...
sulman's user avatar
  • 529
1 vote
1 answer
468 views

Pass Bearer Token from Postman and fetch customer data in Magento 2 model

I need to find the customer data in custom rest api model I think magento very the customer token from the header as bearer token so i need to get from the customer token.
Prince Kumar's user avatar
0 votes
1 answer
59 views

Magento 2.3 Disallow Post to /V1/Customers

I am battling spam accounts being generated via Magento's REST API for customers. Someone keeps hitting my site with Postman and dumping in hundreds of fake accounts. I have set Allow Anonymous Guest ...
user86226's user avatar
0 votes
1 answer
100 views

URL Path incorrect with Magento Rest API

I am using Python to access Magento 2 Rest API categories. The url that I am using is this: https:///rest/<store_code>/V1/categories/15647 The URL Path that is being returned is this: footwear/...
Denis Dondo's user avatar
1 vote
0 answers
78 views

How to make a REST call to Magento 2?

I am trying to get going with Magento 2's REST API interface, and I did the following: I made a new "Integration", which gave me the Consumer Key and Secret and the Access Token and Secret. ...
Bart Friederichs's user avatar
0 votes
1 answer
79 views

After POSTing a product those go out of stock, but never back in stock

Can anyone explain why exactly a configurable product for which every virtual product's quantity goes down to zero, and said product subsequently disappears from the store, won't come back even if the ...
Захар Joe's user avatar
0 votes
0 answers
91 views

Magento 2: Product's Layered Navigation Filter DIsplay Type API

I am working on Rest API. I want a product filter type (checkbox, multiple selections,yes/no) so that mobile filters can be shown based on that. For example on website filters showing like this : How ...
Krupali's user avatar
  • 1,130
0 votes
1 answer
123 views

Mageno2.4 How to customize an HTTP POST request interface

I have an order management system. I want to notify Magento2 of the status of my order management system. I want to call Magento2 custom interface, but I do not know how to create Magento2.4 interface ...
sq y's user avatar
  • 95
1 vote
0 answers
66 views

Magento 2 : Coupon code couldn't be applied. Too many coupon code requests

Magento 2: coupon code couldn't be applied. Too many coupon code requests, please try again later Sales rule API : Request: http://localhost/demonew/rest/V1/salesRules/1 Body: > { "rule": { > "...
Gagan's user avatar
  • 549
1 vote
1 answer
2k views

How i can pass js variable to php file?

i need to pass a variable from file.js to my model.php with rest API in particular get method
Max's user avatar
  • 11
0 votes
0 answers
293 views

Add custom data to SalesRule API

I tried to add custom data to SalesRule through the endpoint V1/salesRules but ended up with getting error My code is below 1- etc/extension_attributes.xml <?xml version="1.0"?> <...
ishaq's user avatar
  • 141
0 votes
1 answer
120 views

Get list of orders with increment_id

I can use the Magento API (https://magento.redoc.ly/2.4.4-admin/tag/ordersid) to get a list of orders using the following endpoint: "rest/V1/orders/items". However, this endpoint does not ...
user2348684's user avatar
2 votes
2 answers
385 views

How To Get Magento 2 Rest Api List

I Want to a list off all magento 2 default rest api list. it would be batter if i got all the custome rest api list as well. thanks.
Juber Sherasiya's user avatar
0 votes
1 answer
304 views

Magento2 : How to set JSON response from custom rest API

I'm building a custom rest API endpoint. This is code which I have written in my custom model class. return [ ['success' => false, 'status-title' => 'Refund Failed',] ]; Following ...
Suresh Chikani's user avatar
0 votes
1 answer
122 views

Magento 2 - Where is the Rest API code located?

We call the Rest API with "/rest/V1/carts/mine". Where is the code located in magento?
Black's user avatar
  • 2,993
6 votes
4 answers
7k views

The consumer isn't authorized to access %resources

I have installed magento2.4.4 and php8.1 and when trying to access rest api using bearer token it is giving error for all the routes. { "message": "The consumer isn't authorized to ...
M2 Dev's user avatar
  • 430
0 votes
0 answers
122 views

Set payment method with admin access token with rest api

I want to set the payment method on behalf of the customer, with the admin access token. I don't have the customer access token but I have the customerId I used this API call: carts/{cartId}/payment-...
rahma sayadi's user avatar
0 votes
1 answer
272 views

Consumer not authorized to access self

I am following a Magento tutorial and I get stuck at this step https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-quote.html So I managed to create user, but I cannot make a ...
OCP30pt1c1l1l43-X1z17's user avatar
0 votes
1 answer
203 views

Get Customers using Postman Magento ver. 1.9.4.2

I have Magento ver. 1.9.4.2, When I try to retrieve customers using Postman, it does not show anything. I am using this end point https://myhost/rest/V1/customers What could be the problem? I tried ...
Shan Abeywicrema's user avatar
0 votes
1 answer
30 views

How to connect two magento2 application

I have two magento2 application running which are M2(a) and M2(b), I want all product on M2(a) to be displaying on M2(b) automatically, I have created an Integration on M2(a) by going to admin->...
Adex's user avatar
  • 15
0 votes
1 answer
101 views

Why Magento2 Rest API Deletes Empty/Empty Records in EAV Table for Product. Via MultiStore / Custom Attribute

I update some features of my products from time to time via the REST API. All property values change periodically for each of my stores and sometimes we turn it into a completely blank record. For ...
İsmail Çakır's user avatar
2 votes
0 answers
266 views

Magento 2, How to get and set of custom_attributes value for Rest API

API: /rest/V1/products?fields=items,total_count,search_criteria[page_size,current_page]&searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][...
sky's user avatar
  • 1,366
0 votes
1 answer
713 views

how to create custom rest api for getting the list of all products with specific columns in magneto 2

Create a custom Rest API product based which just includes the following. • Product Name • Product URL • Product image (media URL) • Product Price • Product SKU • Product Qty • Product Stock Status ...
Syeda's user avatar
  • 3
0 votes
1 answer
901 views

Get order by date and status filters in magento 2 with rest api

Get Orders details using rest API with filters status and date range in magneto 2.4
Rahul Katoch's user avatar
  • 1,099
0 votes
0 answers
270 views

Magento 2: How To Create Product Progamatically Using Custom Rest API

I need to create a product using a custom Rest API. (this is my first time working on API). So to check API whether it's working or not I wrote the code below, API is working, now I need to give ...
Partab Saifuddin Zakir's user avatar
1 vote
2 answers
134 views

rest api get / add products to wishlist

REST API for wishlist is it implemented into magento core or do I have to use extensions to see and add items? Can't find nothing about this in their documentation and no tutorials I was trying with ...
Adrian's user avatar
  • 153
0 votes
1 answer
249 views

Magento Custom API Product Attribute Not Saving

I have created a custom API to update 4 attributes of the product out of which only 2 are updating not others. I have already created attributes and assigned them to a product and working properly ...
ishaq's user avatar
  • 141
1 vote
0 answers
375 views

Magento 2 REST API Add validation for data interface payload

I have created a custom REST API to save data into my table. My table contains many fields so I am using the DataInterface structure for payload. Now I need to add a validation like as below { "...
Jancy Abraham's user avatar
0 votes
2 answers
501 views

How do I get orders using store code/store id using Magento rest api

I am trying fetch orders using store_id but I am not getting response from Magento rest API which I am using. So far, I have tried follwowing URL patterns to check the response but none of them worked....
Shriniwas's user avatar
  • 101
1 vote
0 answers
53 views

Internal Server Error while create a customer via API magento 2

Аfter research I found error line. Its module \Magento\Customer\Model\AccountManagement, funciton createAccountWithPasswordHash(), line 883: $storeId = $this->storeManager->getStore()->getId()...
camradeq's user avatar
0 votes
1 answer
658 views

Magento 2 REST API Shipping "Can't create a shipment without products."

a bit lost, I'm attempting to use {SiteUrl}/rest/V1/order/{id}/ship using litterally the request found here: { "tracks": [ { "track_number": "1Y-9876543210", ...
R.Dukane's user avatar
0 votes
0 answers
117 views

rest api url is wrong - undefinedrest/eu/V1/carts/

I have a M2.2 shop and I just upgrade it to M2.4 I have MagePlaza OneStepCheckout installed. When I go to checkout, I get errors on my console regarding the requests to the api. Somehow the Url is ...
mvistas's user avatar
  • 481
0 votes
0 answers
31 views

Get and post new attribute values

I want to add new attribute values in attributes like Color,size dynamically through API. like if any new color comes in data then we can add through api. please help me to provide get attribute value ...
search123's user avatar
0 votes
1 answer
108 views

Create Shipment By Order Increment Id

To create shipment by Rest API, I am using it and it is working fine. {base_url}/rest/V1/order/15/ship Parameter 15 is order_id. I want to create shipment by order increment id. Is there any way to do ...
Jigar Dhaduk's user avatar
0 votes
0 answers
111 views

404 on API request to admin token

I'm making a request to integration/admin/token using the below code : $response = $this->_client->request('POST', 'integration/admin/token', [ 'json' => [ ...
gazZz's user avatar
  • 97
0 votes
0 answers
134 views

Extend API V1/products to put the not available products at the end

I want to display out of stock products at the end of the V1/products response. So far I tried to create a plugin on Magento\Catalog\Api\ProductRepositoryInterface to override the getList method but ...
darkmatterantearth's user avatar
0 votes
1 answer
198 views

Magento 2: How to get cart items and its stocks using custom API?

I'm learning Magento 2 API. I need to create a custom API to get cart items and its stocks. I can see there is an API available to get cart items in Magento by default which is the below GET V1/carts/...
MagentoDev's user avatar
0 votes
1 answer
447 views

Magento 2 No quote data for Checkout Session in custom api

\Magento\Checkout\Model\Session\Proxy $checkoutSession $quoteId = $this->checkoutSession->getQuote()->getId(); When accessing this code from rest api $quoteId is null, but when accessed from ...
Vishwanath Kharabe's user avatar
0 votes
0 answers
1k views

Magento 2 checkout: Get payment method form from API?

I am looking to implement the checkout using the API as documented here: https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-intro.html I can do the whole checkout using the API if I ...
Louis B.'s user avatar
  • 1,082
0 votes
1 answer
173 views

Magento2 Integration Token for Mobile Applications

We want to develop mobile applications for Android and iOS which will communicate through Magento2's REST APIs. What will be the proper way to pass the authorization token to access Magento2's ...
Reshad Zazai's user avatar
0 votes
0 answers
409 views

Searching for customers by their company_id / Magento 2 B2B REST API

We are trying to search for all customers which belong to a specific Company via the REST API. When we get the customer JSON data, there is a field for the Company ID - company_id - so apparently the ...
Andy W's user avatar
  • 101
1 vote
1 answer
1k views

How to get an admin token from REST API when 2FA is enabled and using U2F?

Magento 2.4.2-p2 Greetings, I'm interested in to get an admin token from the REST API when 2FA is enabled and as authentication provider U2F is used. I have a small application running on another ...
Densen's user avatar
  • 146
0 votes
3 answers
1k views

Magento 2 REST API on add to cart "quoteId" is required. Enter and try again

When I try to add to card any item via REST API I get this error: "{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{"...
Adrian's user avatar
  • 153
0 votes
1 answer
152 views

Not getting a Valid JSON Respon from magento2 custom API

I am trying to return the collection factory from database , it is giving an array now i convert it to json using JSON Encode function but it is returnig a string with backslashes !! Code for Api ...
Syed Hassan Zamir's user avatar

1 2
3
4 5
37