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
196 views

REST API > Create Product = 400 error "Please select a product type"

I'm trying to create a Product with a call to the REST API POST https://mymagentodomain.com/V1/products { "product":{ "price":8, "sku":"123456789", ...
HarryDev's user avatar
0 votes
1 answer
262 views

Magento 2 - how to update attribute values with rest api (curl)

$ch = curl_init("92.19.109.89/index.php/rest/V1/products/".$productId); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($...
Rob D. A.'s user avatar
  • 867
0 votes
2 answers
984 views

Magento 2 - How to get product attribute in order API

I added two new product attributes to a product called netsuite_internal_id & ava_tax_code if I do a GET to /rest/V1/products/{sku}, I can see them in custom_attributes.attribute_code. When a ...
Koua Thao's user avatar
0 votes
1 answer
462 views

Magento2: Customer login in magento by Rest API token

I would like to use the Rest API to get a client token first. And then use this token to login as Magento2 client. E.g. domain.com? customerToken = xyz Are there any ready-made methods / modules for ...
iknownothing's user avatar
0 votes
1 answer
72 views

Magento 2 REST APIs fetch results by store code

When i am trying to fetch the orders, & customers & products collection by using store code I am getting another store results aswell. Did any one facing the issue in the magento 2.4 version? ...
Nagaraju Kasa's user avatar
0 votes
1 answer
738 views

Magento2.4 rest api for get all products inventory

I need to get all products detail such as inventory, max, min, qty and more. how can I get them with rest api for magento 2.4? I can get it for 1 sku but I need all skus
MGPM's user avatar
  • 741
0 votes
1 answer
72 views

Magento2 - extend Category API save functionality

I am trying to extend the save() functionality on magento2, when it handles an Catalog / Category API call. I do not want to extend any events, as I figure they're being handled globally which is not ...
Max's user avatar
  • 309
2 votes
2 answers
256 views

REST API /products endpoint does not return all products

I'm trying to list all products via the REST API. I have 1195 products in my store, but the API is consistently only returning 849 of them, and it's the same ones that are left out every time. My ...
Joseph Montanaro's user avatar
3 votes
1 answer
338 views

Magento Rest API - white space sku issue

Issue Unable to get update price via REST API due to white space in the sku Steps to reproduce the issue Create a product with SKU containing white space, eg. 'BAH SB' Query Magento instance via REST ...
User-15895's user avatar
2 votes
0 answers
126 views

What is Cleanup Probability Settings For OAuth

I am not getting the implementation of Cleanup Probability settings which you can find at Stores > Configuration > Services > OAuth > Cleanup Settings > Cleanup Probability. From the ...
Rajeev K Tomy's user avatar
0 votes
1 answer
148 views

Magento 2 REST API - How to add product custom attribute type file upload to a product when adding a product

I'm working on a project where my product has some datasheets that has to be uploaded to the website. Right now I've created one product attribute named datasheet with attribute type file upload. I'm ...
Shiyas Pathiyassery's user avatar
0 votes
1 answer
666 views

Magento 2 REST API - Creating cart price rule is not working

I'm trying to create a cart price rule via REST API but always get error 400 Bad request with message: Specified request cannot be processed. I even try to use minimum request body (only required ...
Nguyen Viet Cuong's user avatar
0 votes
1 answer
50 views

Product special_price only changes with reindex

I'm trying to set a product special_price using rest api, But the special_price only changes in store front with reindex command. PS: When i use a numeric value, like: 15, 100, etc... it changes ...
Rafael Fagundes's user avatar
0 votes
1 answer
130 views

gift-message attribute not appearing in REST API Orders response after setting it on Cart

I am developing a headless Magento backend using REST/Graphql on the frontend. After enabling the Gift Message module in admin, I set correctly set the Cart gift-message like so: http://localhost/...
Adam Wright's user avatar
0 votes
1 answer
402 views

Magento 2 - How to add custom customer attributes to sales order API?

I have created custom attributes in the customer table. I want to add those attributes in order API. How can I do this? Thanks.
Student04's user avatar
1 vote
1 answer
105 views

Security issue ? User with restricted scope can access ALL orders on a multiwebsite setup

Using Magento Cloud EE here but this issue might be the same on CE I'm not sure. Create user foo Create role test Assign foo to test Restrict website scope for test to www.website1.com only Login ...
Sorcy's user avatar
  • 128
0 votes
0 answers
460 views

Cant get Admin Token using cUrl 403 error

I've managed to get the API Token using Postman however, when I try to get the admin token through a cUrl request it returns a 403 error. Postman Post Request: https://localhost/index.php/rest/V1/...
A. Fletcher's user avatar
0 votes
2 answers
365 views

Magento 2 integration with External System via API

I'm currently in process of creating a Magento 2 module that will handle and pull product data from external system into Magneto database using API requests (SOAP and REST) Any guide or module ...
K Kazadi's user avatar
0 votes
2 answers
300 views

Magento2: How to get custom comment for order in REST API?

I ve installed Infobeans OSComments. Module adds additional field on checkout page and save value to Order Page. Is it possible to have access to this comment via REST API ? Can this value cand be add ...
maya5510's user avatar
1 vote
2 answers
787 views

Web api testing could not use ApiSuiteLoader

I am new to testing in Magento. To add a new functional api test, I followed https://www.youtube.com/watch?v=JAA7BkH82gY&ab_channel=MaxPronko but he doesn't show how he runs the test. I followed ...
amjada's user avatar
  • 11
0 votes
2 answers
719 views

How to set notify me when back in stock for Magento 2 through REST API?

In Magento2 customers can subscribe to the out-of-stock products and get notifications when back in stock. I would like to know how can a customer subscribe to out-of-stock products through REST API.
Reshad Zazai's user avatar
0 votes
1 answer
460 views

Magento 2 - Rest API - How to get the text of a custom attribute that is a drop-down menu

I have a custom attribute that is a drop-down with the brands of my products. If I query $query = 'https://example.com/rest/V1/products?'. "fields=items[id,sku,name,custom_attributes[Brand]]"...
FedeKrum's user avatar
  • 101
1 vote
1 answer
606 views

REST API and custom attributes

My magento installation has 3 stores (domain+language). I would like to update custom attributes for products. When I call GET products/my_test_sku?storeId=1 i get something like the following json: {...
Mikkel Mortensen's user avatar
0 votes
0 answers
53 views

Customer Login, Products and Place Order REST APIs for React Native from an existing Magento 2 website

I've figured out how to login using customer credentials and get the token. I'm not able to fetch the products, categories with this token. Do I really need an admin token? Is it not safe to expose ...
Anandhu's user avatar
0 votes
1 answer
374 views

Magento search Rest API how to get products all the detail in the response?

I want to get product all the detail in Search Rest Api response but Magento default is returning only id and custom_attributes attributes. Api :- `http://127.0.0.1/magento/rest/V1/search?...
Manish Goswami's user avatar
0 votes
1 answer
412 views

Magento 2.4 Rest API need to show filters related search result

Following code fetch the products based on search keyword but the issue is filtering showing all instead of the search result page. I want filters should be shown only related to the search result ...
Jitendra Patel's user avatar
0 votes
1 answer
173 views

Magento 2 REST-API

I'm new to Magento (Version 2) and am a bit confused by the variables for the calls in the API-Documentation (https://magento.redoc.ly/). As you might know there's not much explanation about what they ...
Bardia Hahn's user avatar
0 votes
1 answer
149 views

Create a ResourceModel based on 3rd Party API Call from Magento

I am working on integrating a 3rd Party API into Magento. I'd like to use an Admin Grid with a Data Source that comes from a 3rd party API. So Essentially the Flow work like this... User Loads into ...
jtaylo13's user avatar
0 votes
1 answer
522 views

Got error when trying to submit order via rest api and stripe

I have magento 2 setup, with Stripe plugin, and I'm trying to create order using PUT http://ec2-3-236-104-131.compute-1.amazonaws.com/rest/V1/carts/mine/order BODY { "paymentMethod": { ...
Nikita Shevtsou's user avatar
0 votes
0 answers
86 views

Assigning Thumbnails via Magento REST API

I am trying to add thumbnail images to SKUs via REST API. However, the image is added but does not show as a thumbnail. Please see my POST request below https://url.co.uk/rest/V1/products/231877/media ...
Catherine Brugge's user avatar
0 votes
1 answer
191 views

Add product with text customisable option to cart using REST

When using the REST API to add products to the cart, you need to add a product_option.extension_attributes.configurable_item_options object to the cartItem payload (POST-ing to /V1/carts/mine/items). ...
vandijkstef's user avatar
1 vote
0 answers
34 views

how i can retrieve Minimum Amount in magento 2 using REST API?

Dears I am using Magento ver. 2.2.7 as backend for my app, i want to get "Minimum Amount" for orders when my users review them bascket. So i am looking for API to retrieve value of "...
fadl shareef's user avatar
1 vote
1 answer
82 views

Create product with custom option (Field type ) using rest api not saving

I am trying to create simple product with custom option(Field type) using rest api but custom option is not saving with product endpoint rest/V1/products. request body { "product": { ...
magento stacker's user avatar
0 votes
1 answer
940 views

Create product with custom option using rest api

I am trying to create simple product with custom option using rest api but custom option is not saving with product endpoint rest/V1/products. anything missing here Here is my request body { &...
magento stacker's user avatar
0 votes
1 answer
1k views

Product attribute create/update using rest api and assign it to attribute set

I am creating product attributes using rest API with the below request body. End point rest/V1/products/attributes/ { "attribute": { "is_wysiwyg_enabled": false, &...
Zaheerabbas's user avatar
  • 2,058
1 vote
1 answer
750 views

Fetching SKUs containing a "/" (forward slash character) from the /rest/v1/products/ REST API endpoint?

A lot of our SKUs have spaces and forward slashes in them (eg: "PRODUCT1-DARK BLUE" and "PRODUCT2-DARK/RED". I'm able to curl to the products with spaces via url encoding:     # ...
Beauregard D's user avatar
0 votes
1 answer
207 views

Magento2: How to add extension attribute to rest/V1/products/attribute-sets/4/attributes

I want to add extension attribute to the default API to identify the visual and text swatches http://localhost/m2.4/rest/V1/products/attribute-sets/4/attributes API.
adi maheshwary's user avatar
0 votes
1 answer
228 views

Magento 2 how to get info_buyRequest in rest result rest/V1/orders/105"

Hi can any one tell me how to get addition information (info_buyrequest) in rest api result https://mainwebsite.com/index.php/rest/V1/orders/$order_id. but here not getting product options getting ...
Pawankumar's user avatar
3 votes
1 answer
3k views

Magento2.4 API - Update product inventory for multiple sources (MSI)

I have created a product, which has two different sources assigned to it with different quantity allocated to both sources. I want to update product's quantity for both sources separately. I am using ...
Mukul Garg's user avatar
0 votes
3 answers
294 views

How To Change Currency Code Using Quote ID

I need to change the quote currency to order from the mobile app. For this, I send the quote id from the mobile app, I did the following code on Magento, but it did not work. Suggest me the correct ...
Sakthimurugan Saravanan's user avatar
0 votes
1 answer
535 views

Magento 2 Rest API response "There is no mediagalleryentryconverter for given type". How fix it?

I need to get All Products using Magento 2 Rest API, but on some products I get response: "There is no mediagalleryentryconverter for given type". How can I fix it? I use POSTMAN for testing....
Ihor Radzyil's user avatar
0 votes
1 answer
343 views

Is it good to use Access Token in Magento 2 for REST API?

I am using REST API for some product insertion process in my Controller File and i will used that Access Token to generate the token. Is it good to use that on my Live Website Code If not then what ...
Prits's user avatar
  • 626
0 votes
1 answer
431 views

How can I load image through api by using external image url?

I have my product images in my cloud store and those are public. I want to map those images to product through API. I have gone through the solution given in the below link. But I want to check if ...
Amey Mhatre's user avatar
0 votes
2 answers
1k views

On saving Products in REST API in Magento 2 getting error The product was unable to be saved. Please try again

On Saving the products in Magento 2 using REST API it will it will generate the error my payload is: { "product": { "sku": "test1", "name":...
Prits's user avatar
  • 626
1 vote
2 answers
2k views

Magento 2: How get All products (2000 products) using Rest API?

I use Magento2. I have 2000 products. I try to get all products, using Rest API. My request str.: GET https:///rest/default/V1/products?searchCriteria[pageSize]=1000. But this is not enough because ...
Ihor Radzyil's user avatar
0 votes
1 answer
247 views

Product always goes OUT OF STOCK in magento 2 after inserting through REST API

I have added product in my Magento 2 Store using REST API but it always goes out of stock like this. But when i run php bin/magento indexer:reindex the product will come in stock. Any idea why is ...
Prits's user avatar
  • 626
0 votes
1 answer
1k views

Using REST API with admin username and password is good or safe in Magento 2

I am using REST API in Magento 2. For using in Guest user i want to create admin token so i have used CURL Request like this. $ch = curl_init(); $userData = array("username" => "...
Prits's user avatar
  • 626
1 vote
2 answers
317 views

Cart items not shows in cart on using Magento 2 REST API

I am using Magento 2 REST API for add to cart item in guest but after checking on cart page it's just empty. Why it is empty. http://127.0.0.1/mag/rest/V1/guest-carts/Hkt4RC38lJX1rAalFoPlsk2suRwb8Fnp/...
Prits's user avatar
  • 626
0 votes
2 answers
375 views

How to add products in Magento 2 using Magento 2 REST API?

How to add products in Magento 2 using Magento 2 REST API. I am using http://127.0.0.1/mag/rest/default/V1/products this url in postman but it gives me this error: { "message": "...
Prits's user avatar
  • 626
0 votes
1 answer
481 views

On Adding items in cart for guest user using Postman getting error

I have successfully run two REST API's but on running the third one http://127.0.0.1/mag/rest/V1/guest-carts/81/items { "cart_item": { "quoteId": 81, "sku": "...
Prits's user avatar
  • 626

1
3 4
5
6 7
37