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

Customer Search by email does not work in REST API

I have a list of customers that I am trying to pull data for all at once. I build a search filter with the contion_type="like", field="email", and value="gmail.com". i ...
0
votes
0answers
7 views

Using Magento 2 Rest API To Filter On Enabled Products in a Certain Category

I'm having some issues using Magento 2 Rest API to filter on products in a certain category that are enabled. Right now I just get products in a category but the ones that are disabled or not visible ...
0
votes
1answer
11 views

how to add custom fee/extra fee in total by api?

I want to add an additional charge in the order total by Api. when a customer needs that. I added an additional amount by following this link https://webkul.com/blog/add-custom-pricefee-order-total-...
0
votes
1answer
24 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
1answer
12 views

Getting Error while trying to Retrieve Magento 2 orders using Rest API

I am trying to retrieve the Orders using REST API. I want to retrieve all the processing orders for that i am using search criteria. Below is what i have tried , but it is not working https://auto1....
0
votes
1answer
42 views

how to get custom attributes in rest search api?

In order rest api http://127.0.0.1/mag/index.php/rest/V1/orders/1 it shows custom attributes "payment_additional_info": [ { "key": "method_title", ...
0
votes
1answer
19 views

Creating Bundle Product with REST API issue

This is my request to rest/V1/products: { "product":{ "sku":"test4", "name":"test json", "attribute_set_id":4, &...
0
votes
0answers
7 views

Magento 2: Get pending order according date

I am trying to get the pending orders for a specific date http://127.0.0.1/jprbkp/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][...
0
votes
0answers
7 views

Product custom attribute in Rest api for orders on Magento 2

I need product custom attribute like size and color which are being save but when i call rest api it shows only attribute id and not attribute label. API call is http://localhost/aaa/rest/V1/orders/...
0
votes
2answers
141 views

Magento 2.4 REST API for Create Cart Not Working

I am trying to create the magento default REST API for add simple product to cart like this way. First I generate the customer token with the use of this API Call. https://www.domain.com/rest/default/...
0
votes
0answers
17 views

How to add new field to invoice and save its value from Rest API call and get its value in API Call

I want to add new field to invoice table, I have created custom module for that and added new field to invoice table. Now I want to save the value in this field using Rest API, when I create invoice ...
0
votes
0answers
10 views

Unable To Add Extension_Attributes To Order Search/Details REST API Responses

Problem Statement: FWIW - I've followed all the steps outlined in the DEV guide - https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html - yet somehow, ...
0
votes
0answers
34 views

Magento2 - How to update the value of an option of a product attribute programmatically?

I'm using the REST api and believe that we can't update the value of an option of a product attribute: we only have the POST method and no PUT. So, what would be the best way to do it in code? In fact,...
0
votes
1answer
58 views

API: Accessing All attributes associated to a Attribute-Group

So I'm in need to check to see if an attribute group contains a specific attribute_id. However using the API, there doesn't appear to be a specific endpoint which lists all attributes associated to a ...
0
votes
0answers
156 views

Magento2 : REST API call always return unauthorized

I use Magento 2.4.0 community edition. I try to call diffrent type of REST API like https://www.domain.com/rest/default/V1/modules https://www.domain.com/rest/V1/orders/1850 https://www.domain.com/...
0
votes
0answers
20 views

How to send customer a reset password link using REST API?

EDIT: I made changes to my discussion of IsEmailAvailable to correct an error in my assumption as to how that works. I am unsuccessfully trying to get Magento Commerce 2.3.6 (on Adobe Commerce Cloud) ...
2
votes
1answer
14 views

Trying to create product using rest API: getting error

Payload { "product": { "sku": "samsung-a50", "name": "Samsung A50 ", "attribute_set_id": 4, "price": 150000, ...
0
votes
0answers
10 views

Wrong Search Result for the API rest/default/V1/products in Magento 2.3.6

I have 3 websites and each has a store and store-view, the website one has the store_code: default, when I search for products while passing the store_code: default, the search result shows products ...
0
votes
0answers
7 views

Want to create REST API Admin access authentication in module ? And get last order json data magento 2

I have found below code in magento stack exchange. but i dont know where to put this code in custom modules. $userData = array("username" => "admin", "password" => &...
0
votes
1answer
20 views

magento2 call api test with postman : nonce validation error

After my integration is created and authorized, i'm trying to test the Magento REST API with Postman using the access token but an error related to nonce validation occurred. Any help please??
0
votes
1answer
24 views

Magento 2 - Use search criteria to find configurable using attribute of their children

I have product X which is configurable. To product X I have assigned product Y and Z as simple ones. Both simple has attribute "Color". Now product Y has color: 123, product Z has color: 456....
0
votes
0answers
11 views

is there any way to create custom search criteria field (SearchCriteria[filter_groups][0][filters][0][field] )?

Is there any way to add a custom field in search criteria in Magento 2 REST API. Custom Field means I want to filter products by using Final Price in V1/products endpoint Thanks.
0
votes
0answers
6 views

how to filter configurab;e product by using child product attribute for REST API in searchcriteria

How to filter parent product by its child product attribute in REST API v1/products/- endpoint How can I add a custom search endpoint in this endpoint (v1/products) Please guide me. Thanks
0
votes
0answers
8 views

MAGENTO 2.3 API: Consumer is not authorized to access %resources Magento_Sales::actions_view

I have moved a website to another server with the same features and the same version of php but the api calls no longer work. The calls do not work for me neither in Postman nor in curl. And postman ...
0
votes
0answers
54 views

Curl request doesn't login to my API, why?

I've been working on this code to log in to my API. But every time I try to login using CURL I get the following error {"message":"The request entity's media type 'multipart/form-data' ...
0
votes
0answers
6 views

Redirect header from API endpoint

I am trying to setup an API endpoint my mobile app can use to redirect to Google Play or Apple App Store depending on the device making the request. I have php code that was working stand alone and ...
0
votes
1answer
25 views

How to pass the card details for the Magento API [POST]: V1/carts/mine/payment-information for the payment method stripe_payments_checkout_card

I have an iOS native app which communicates through Magento Rest APIs with my Magento Store, I would like to know how to pass the card details (Token, CVV, Exp Year, Exp Month, Last 4) in JSON format ...
0
votes
0answers
13 views

Get Submitted Data from Amasty Custom Form through REST

Our company uses Amasty custom forms for front end forms. I've been tasked to get the form data into our ticketing system and then close the form in Magento 2. I'm finding no information on how to use ...
0
votes
0answers
11 views

How to get all filters even after filtered applied magento 2?

How to get all filters even after filtered applied in Magento 2 Layered Navigation.I need this for Rest API Magento 2. If I filter by color. All other Options of color did not get in response. Please ...
1
vote
0answers
22 views

How to get lifetime best seller products

I am creating an API for getting best seller products. There are a lot answer on community which answering for get best seller on monthly/yearly basis. I want to get lifetime bestselling product just ...
0
votes
1answer
27 views

Magento 2 REST API For Place Order gives “transaction declined” error after successful Payment For Payfort Payment Gateway

I am using Payfort extension to process credit Card Payments online for Payfort Payment Gateway. For Website it's working Fine and Placing an order after successful payment. But when I am trying to ...
0
votes
2answers
19 views

Unable to save product attribute issue

I have an observer, using this event: catalog_product_save_after , where I would like to assign some website ids to my product. This is my code: public function execute(Observer $observer) { $...
0
votes
0answers
12 views

How do I add a custom customer attribute to Order REST API?

I have a custom customer attribute which needs to be shown upon requesting the order via the REST API. How do I do this?
0
votes
0answers
9 views

Magento 2.4.0 : Create account without an email Address

I have created a custom REST API to create a customer account programmatically. Now while creating a customer account user may or may not have an email ID. But user will update while placing order in ...
0
votes
0answers
12 views

How filtered attribute hides in layered navigation?

If I select the color as a filter in layered navigation, then it hides that color attribute and displays the remaining attributes regarding that color. I want to make this function for layered ...
0
votes
1answer
25 views

API -> add image with external url instead of base64

Is there any extension that give us the possibility to add external url instead of a base64 string when I adding/update product via magento 2 api?
0
votes
1answer
56 views

How to reduce Magento 2 rest api performance time?

I have created some custom rest api's and using Magento's default rest api's. I want to reduce the loading time of the api, as I have custom api's too so the request time and response time is quite ...
0
votes
0answers
8 views

Magento 2: I want set a custom param to checkout session via API Rest

Eu criei um atributo de extensão chamado "device" para o order, agora quero setar esse atributo na sessão do checkout atraves de uma requisão API. Assim setar esse parametro no fechamento o ...
0
votes
0answers
10 views

REST API is not updating the product stock quantity in Magento 2.3

REST API is not updating the product stock quantity. Request: https://domain.com/rest/V1/products/1004052/stockItems/361 BODY: { "stockItem": { "item_id": 361, "qty&...
0
votes
0answers
8 views

Magento API call doesn't return categories images

I'm currently working on an application that requires the display of categories images and was able to get the category image via this endpoint: http://example.com/rest/V1/categories/12 where 12 is ...
0
votes
0answers
16 views

Magento2 How can I create an order on behalf of customer with admin Token

I need to implement salesman logic where he can place orders on behalf of customers. With the available Order processing Rest API I can only place an order with Customer Token. Is there any way that I ...
0
votes
1answer
34 views

Extension_attribute value save in DB in magento 2

I am using Magento 2.3.4, and i created custom attibute in quote_item 'up_flag'. and throgh rest api i am passing the value of "up_flag": Post request Body for V1/carts/mine/items: {"...
0
votes
0answers
55 views

Magento 2: How to pass “form data” Rest API in create product postman

I have created product api and passed form-data in postman but i have faced issue in pass category_ids and image. Any have idea how to pass category_ids and image in postman while creating product API....
0
votes
0answers
20 views

Stop propagation of attribute values between store views if value empty

I have following problem with magento 2.2.4. Let's say i have 2 store views and 1 product with text properties document_name (scope: store view). When I remove value of the property from secondary ...
0
votes
0answers
9 views

Create products through API with xml payload

We are trying to create products by API, if we use json as payload, no problem Endpoint: POST /rest/default/V1/products Payload: { "product": { "sku": "MS-Champ-S", ...
0
votes
0answers
14 views

How to get custom attributes in the search query of rest API

I try to get custom attributes of the customer in orders API. All attributes show in orders but the customer attribute not displayed in the search query API: http://127.0.0.1/test/rest/V1/orders?...
0
votes
0answers
31 views

Modify existing custom attribute value of category in magento 2.4 using rest API

As the title says, I want to modify the value of a custom attribute of each of my categories in magento 2.4 and I want to do this using REST APIs. I am using this endpoint https://magento.redoc.ly/2.4....
0
votes
1answer
30 views

Shipment Extension Attributes

I'm trying to set shipment extension attributes with the following XML; <extension_attributes for="Magento\Sales\Api\Data\ShipmentInterface"> <attribute code="...
0
votes
0answers
14 views

401 The consumer isn't authorized to access %resources on HTTPS

New to magento. Everything worked properly until we deployed the same code to GoDADDY, added SSL. Note that all get API's are having similar errors. The REST API gives this error: THE URL: /rest/V1/...
0
votes
0answers
11 views

Guest Cart Items API returns 0 for the price of item added last to the cart - M 2.2.6

The API rest/V1/guest-carts/cart_id/items returns the value 0 for the item which was added last to the cart, in case the guest cart has more than one item and in the case of one item the value is ...

1
2 3 4 5
20