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
0answers
18 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 ...
0
votes
0answers
9 views

Magento 2 : The consumer isn't authorized to access %resources

In postman while i check to http://local.vendor.com/rest/us/V1/carts/mine/payment-information It shows { "message": "The consumer isn't authorized to access %resources.", &...
0
votes
1answer
9 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). ...
0
votes
1answer
25 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": { ...
0
votes
1answer
23 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 { &...
0
votes
1answer
21 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, &...
0
votes
1answer
26 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:     # ...
0
votes
1answer
27 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.
0
votes
0answers
20 views

Magento Rest API - multiple product list in one call

I want to access specified multiple product list in one call. for example access all the products in category id 14 and 15. This provide the product list id 14: /V1/products?searchCriteria[...
-1
votes
0answers
18 views

i want to get product details (sku,name,id) using rest api this is my code in model(is collection code is correct )

<?php namespace Ameex\Restapi\Model; use Ameex\Restapi\Api\PostManagementInterface; use Magento\Store\Model\StoreManagerInterface; class PostManagement implements PostManagementInterface { ...
0
votes
0answers
11 views

M2.2 - Raising maximum failures_count in oauth_token_request_log

We recently experienced an issue that seems to have been lingering around for a while now with no real concrete solution but moreso bandaid fixes; https://github.com/magento/magento2/issues/4432 In ...
0
votes
1answer
11 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 ...
1
vote
1answer
25 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 ...
0
votes
3answers
29 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 ...
0
votes
1answer
21 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....
0
votes
0answers
13 views

How to change currency code before place order using API

I need to change the quote currency to order from the mobile app. I tried to convert quote currency from GBP to USD through the following API, but it did not work. It only adds product to the cart, ...
0
votes
1answer
21 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 ...
0
votes
1answer
23 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 ...
0
votes
2answers
45 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":...
0
votes
2answers
20 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 ...
0
votes
1answer
22 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 ...
0
votes
1answer
30 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" => "...
0
votes
2answers
36 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/...
0
votes
2answers
36 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": "...
0
votes
1answer
34 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": "...
0
votes
0answers
14 views

Magento 2 Rest Api Based Layered Navigation WIth Selected FIlter

I am looking to write rest API for layered navigation with selected filter . I have checked below link https://magento.stackexchange.com/questions/262052/magento-2-api-how-to-get-layer-navigation-...
0
votes
1answer
24 views

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

I want to add products in cart in Magento 2 using Rest API I have created a controller and using this code. <?php $userData = array("username" => "admin", "password&...
0
votes
1answer
11 views

How to fetch data from custom table using REST API in Magento2?

How can we fetch Custom table data by using Magento 2 REST API ?
0
votes
1answer
22 views

Get cart item details for logged in customer Magento REST API

I want to get the list of items in a customer's shopping cart through REST API. I am using GET /V1/carts/mine but not getting the shopping cart item list. What will be the best way to get it with ...
0
votes
1answer
21 views

How to trigger 3rd party api when button onclick?

I want to trigger a 3rd party api when admin clicking on the 'Send Contract'button in Sales Order View. This is the code for my button plugin: <?php namespace MarsMage\Eversign\Plugin\Sales\...
0
votes
2answers
37 views

/index.php/rest/V1/modules File not found after upgrading to magento 2.4.2

after upgrading to 2.4.2 there is a problem with rest api the url /index.php/rest/V1/modules responds with "File not found" the url /rest/V1/modules works well https://magento-560832-1812590....
0
votes
1answer
21 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
2answers
34 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
2answers
51 views

Magento 2 API filter products by Qty

I am trying to get products data having qty >=5 and I tried following options in Search Criteria /rest/default/V1/products?searchCriteria[page_size]=20&searchCriteria[filter_groups][0][filters][...
0
votes
1answer
20 views

Get extension_attributes in Plugin

In my API response (all orders) I get this extension_attributes "extension_attributes": { "my_attributes": { "order_id": null, "company_id": ...
0
votes
0answers
18 views

How to create endpoint for third party responses?

I would like to create a endpoint for third party where I gonna receive their response in XML format. Example - <?xml version="1.0" encoding="UTF-8"?> <s:Envelope xmlns:s=&...
0
votes
1answer
25 views

Additional Options to quote item REST API

I'm trying to add additional options to the product, it is working fine to add attributes programmatically on the website but how to add these additional attributes to the REST API. public function ...
0
votes
0answers
26 views

How to override getList in orders API endpoint?

I need to implement my own logic in the API endpoint which is responsible for getting all pending orders (/rest/V1/orders?searchCriteria[filter_groups][0]...). I'm trying to do something like if(...) {...
3
votes
1answer
100 views

Call to the “Get_Item_Quantity” function in the web service (trying to call soap api using magento restful services)

I have a function in an XML document and I want to return its parameters. My knowledge of connecting the two services is very limited. Do I need to create some middleware or is it possible just to ...
0
votes
0answers
15 views

Is there any way to log in to the frontend without going through the log in page?

I am trying to implement some UI tests written in selenium. There are a number of test cases which rely on the user being logged in. If I use the frontend login form to log in, and one day I find the ...
0
votes
0answers
26 views

Magento2: How I can change cart item price in API /V1/guest-carts/:cartId/items?

I add item to cart via API /V1/guest-carts/:cartId/items and I have to change price for someone items (if they has specific sizes for example). Class handles this request: \vendor\magento\module-quote\...
0
votes
0answers
10 views

How to extend customer rest api request and response

Here i want to modify the current request body and response body for customer rest api. How current rest api working is like here. Request Json. { "customer": { "email":&...
0
votes
0answers
10 views

How to remove Option Value from XML during call API in Magento 2?

How to remove the highlighted section from our order XML file during call API in Magento 2?
2
votes
1answer
62 views

Magento 2: why we should pass all required fields to update one field of customer by REST API?

I have created rest api for customers who update the one customer field. This is below code to updaye customer by REST API Any other way to update the customer by REST API without the pass mandatory ...
0
votes
1answer
44 views

Magento 2 API, searchCriteria usage on orders

I'm trying to retrieve recent orders from Magento 2.3.5, via REST API. I use this command: curl -X GET "https://my_magento_site/index.php/rest/V1/orders/search?searchCriteria[filter_groups][0][...
0
votes
1answer
17 views

Magento2.3 - How to add grouped product in cart using REST API?

Currently i am using Magento2.3.5. I checked documentation 2.3, there is no statement like grouped product in it.. So any one tell me how can we add grouped product in cart using magento rest api?
0
votes
0answers
11 views

Add Grouped product to cart using rest api Magento 2.3.6

I am trying to achieve the same as in the below question Adding a grouped product to cart via the rest api But I dont have reputation to add a comment there. So kindly help me out.
0
votes
0answers
10 views

Get Stock Data for Individual Products - No Admin

Is it possible to check if an individual product is in_stock OR even the actual stock quantity without being the admin? The GET Request http://magentohost/api/rest/products/:id obviously returns ...
0
votes
0answers
13 views

“extension_attribute” is omitted in order item REST API Response

I am trying to add a new extension attribute to order items to be accessible in the REST API Response in OrderRespository and OrderItemRepository. Y create the etc/extension_attribute.xml and the two ...
0
votes
0answers
30 views

Magento 2 Rest API Bad Request (400) - Fieldname (product) is required but JSON request is properly formed

Below code works as it should once I remove the media_gallery_entries parameter but gives error code 400 (Bad Request) with the image set within it. Tried on a fresh installation of Magento 2.4.1 and ...

1
2 3 4 5
20