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
1 vote
1 answer
21 views

Issue with ERP API PUT Request: Unintended Update of `warranty_type`

On Magento 2.4.6: When our ERP executes an API request on the PUT method /all/V1/product/:sku with the following JSON content: { "product": { "custom_attributes": [ { ...
Kallard's user avatar
  • 11
1 vote
0 answers
14 views

ProductRepositoryInterface plugin how to join another table with sort option?

I need to add the most-viewed and best-seller sort options into the rest/v1/products API. I created a plugin to add sort condition for following of below link How to add custom sort like Most View ...
Devidas's user avatar
  • 3,328
1 vote
2 answers
105 views

How to add custom sort like Most View and Best Selling products in API of Product List in Magento 2?

How do we add custom sorts like Most View and Best Selling products in the API of Product List in Magento 2? I need to add the most views and best-selling products in /V1/products to this API using ...
Devidas's user avatar
  • 3,328
1 vote
0 answers
42 views

How to use Magento2 Recaptcha in GraphQl APIs

I want to Use Captcha / Recaptcha in my Graphql APIs I got this link for protected mutations It only shows to insert it in headers but it won't do anything in Graphql apis and for rest apis it gives ...
Syed Hassan Zamir's user avatar
1 vote
1 answer
75 views

Magento 2.4.6. Multiple data output problem

Here's my situation: When calling the endpoint, I receive the following data: { "ean": "0744963634260", "price": "400.000000", "update_at":...
User's user avatar
  • 27
0 votes
0 answers
11 views

Magento AddToCart after place order due to delay in response

We have recently faced strange issue related to an specific order placed from iOS. We are using flutter and utilizing Magento restAPI. There is an order having grand total of 379 but the amount sent ...
Abdul Rafay's user avatar
0 votes
0 answers
22 views

Edit product via POST /products API

I’ve enabled single-store mode and created a new product using the async/bulk/V1/products functionality (\Magento\AsynchronousOperations\Model\MassSchedule). Initially, all attributes of this product ...
Adrian Pop's user avatar
0 votes
0 answers
15 views

Tracking User Interactions, Saving them to Database Table and then send it to GA4 . Events and data events are saved as null in my table

This is the function that captures some data protected function captureRequestData(RequestInterface $oRequest, $aPostParams) { return [ 'request' => [ '...
Enisa Abazi's user avatar
0 votes
1 answer
30 views

Magento 2 api for layer navigation filters available?

<?php namespace handymust\Filter\Model; use handymust\Filter\Api\FilterInterface; use Magento\Catalog\Model\Layer\Resolver; use Magento\Catalog\Model\Layer\Category\FilterableAttributeList; use ...
Faisal Khan's user avatar
0 votes
0 answers
26 views

Rest api carts/mine/set-payment-information and additional_data

When I follow the rest API docs and post some data to the carts/mine/set-payment-information endpoint e.g. { "paymentMethod": { "method": "purchaseorder", ...
AP87's user avatar
  • 145
0 votes
2 answers
59 views

API searchCriteria not working with "FROM and TO" for "created_at" field, fetching the wrong results

Im trying to get data for orders that created between 2 dates(2023-10-05 - 2023-10-01). Im using the search condition type FROM and TO but its not fetching the right details. This is what im trying: ...
Almog Lahav's user avatar
0 votes
0 answers
34 views

Sync products between 2 stores with REST API Magento 2

I am a trying to integrate products with REST API. We have 1 master Magento store where we have all the products, and have plan for other Magento stores which will integrate with Master store and ...
Preet's user avatar
  • 1
0 votes
2 answers
38 views

REST API PUT /V1/carts/mine

Trough the rest API I'm trying to achieve that customers can save their cart/quote and have another new active one. For that I'm trying to figure what PUT /V1/carts/mine does, as the docs states that ...
AP87's user avatar
  • 145
0 votes
1 answer
31 views

REST API - probe error

how to get orders that are older than 1 hour from the current time. When I type NOW() -60, I get an internal error, log file never existed.
David Novák's user avatar
1 vote
2 answers
72 views

how to call GraphQl API of Specific Store in Magento 2?

I want to get the data of specific store using API in REST APIs we can do this by giving store code before APIs endpoint but how can we do that in GraphQl APIs In Rest APIs : /rest/StoreCode/V1/...
Syed Hassan Zamir's user avatar
0 votes
0 answers
11 views

how can i do to make a break in a "place order" process , and show a box to take the password sent to the user , during the checkout

I am adding custom online payment, but the workflow uses a time password in the last step of the process. How can I do to make a break in a "place order" process, and show a box to take the ...
CHAOS's user avatar
  • 3
0 votes
1 answer
20 views

Magento 2 - Where can I find the parameters from my external application sent to magento via rest api?

I'm making a request to magento 2 via REST API to "/rest/V1/carts/mine" from a external application. I have set a breakpoint at the first line in index.php of magento 2 and inspect the ...
Black's user avatar
  • 3,150
0 votes
1 answer
33 views

Magento 2: REST API Endpoint uses wrong locale

I'm implementing an endpoint where the users can create products from a CSV, using the same logic that Magento implements in the backend to import CSV seems to work great but I have a problem, the ...
Jesus's user avatar
  • 1
0 votes
0 answers
85 views

Magento 1.9.4.2 Get orders with REST API

My goal is to be able to establish a connection to our Magento 1.9.4.2 REST API, so that I can retrieve orders data from the REST API. I need help for all stages of making this connection - I have ...
Daniel Wright's user avatar
1 vote
1 answer
39 views

OAuth-based authentication getting issue

hi i am trying to create OAuth-based authentication by following official doc https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-oauth.html but when i click on login ...
Pramod's user avatar
  • 1,939
0 votes
0 answers
48 views

OAuth 1.0 Authentication in UNIX Shell Script

I am new to Magento REST API. I have requirement of UNIX shell script Authentication : To generate token for OAuth 1.0 Authentication. Please let me know how do I generate Access Token and Token ...
Amit's user avatar
  • 1
0 votes
0 answers
27 views

How to get Bundle Product Selected Options From Quote

I am creating a Custom APi to retrieve products in cart how can i get the bundle product details as displayed in web currently how i do this $childrens = $item->getChildren(); public function ...
Syed Hassan Zamir's user avatar
1 vote
1 answer
38 views

Event observer hangs on order creation

Situation: I'm creating a Magento 2 module that listens to specific event observers, gets the ID's associated with those events, and sends them to a third-party Node app. This Node app will receive ...
cereallarceny's user avatar
1 vote
1 answer
34 views

How to add group product to cart using rest Api magento2?

using API /V1/carts/mine/items I got the tutorials / blogs to add configurable, simple and bundle products to cart but how can we add grouped product using this api? What should be the payload ?
Syed Hassan Zamir's user avatar
0 votes
1 answer
88 views

How to update product attribute via Magento 2 API

I'm writing a Magento 2 client library in nodeJS and I've created some product attributes via this POST API /rest/V1/products/attributes which worked fine but I want to add update method as well, for ...
Asad ullah's user avatar
6 votes
1 answer
112 views

Magento 2 REST API Issue: Unable to Handle Product SKU with Slash Value in stockItems Endpoint

Magento 2 REST API Endpoint /V1/stockItems/:productSku is encountering a bug specifically when using OAuth 1.0 authentication. The issue arises when the product SKU contains special characters such as ...
Mohammad Bharmal's user avatar
0 votes
0 answers
48 views

Magento 2 - Share session and customer data between subdomain and domain through access Token

I want to use custom magento checkout on a subdomain eg checkout.example.com. I have developed that one and getting customer data by access tokens. I want to share login information through access ...
Vipin 's user avatar
  • 31
0 votes
1 answer
77 views

How to handle URL encoding? Specifically regarding updating a product using REST API

I have a product with a SKU that looks like this: "0/000.150.2010" So naturally, when I try to update said product: https://URL.com/index.php/rest/da/V1/products/0/000.150.2010 I get a "...
Kenneth Christensen's user avatar
0 votes
0 answers
42 views

How to Switch Currency in Magento2

I am creating mobileApp using APIs i used my custom API to return products and used the the function that return price according to the currencycode given below is the code public function ...
Syed Hassan Zamir's user avatar
0 votes
0 answers
11 views

Add "SortOrder" and "PageSize" Parameters(criteria) in get a category's products REST API

I need to sort the result of the category's products GET REST API by the product's position in the category. The API is like this: /rest/V1/categories/[category-id]/products And here is a sample ...
Armi_Raz's user avatar
0 votes
1 answer
64 views

How Do I Get Layered Navigation Filter using REST API

I used class as picture but it return wrong data (attribute_code is correct but values wrong
Kyle's user avatar
  • 1
0 votes
0 answers
37 views

Address's company line not showing in Orders API

I am using the REST API to sync orders down from Magento into our ERP. When retrieving an order's details, I need the billing address's Company value in order to make sure that the synced order is ...
Geoffrey H.'s user avatar
0 votes
0 answers
48 views

No such entity with customerId when using integration access token with REST API

This is with Adobe Commerce ver. 2.4.5-p1 on their cloud service. We have followed all the instructions for creating an integration token, toggling the setting to allow "OAuth Access Tokens to be ...
Jacob Brown's user avatar
0 votes
1 answer
63 views

How can I create my custom Reset Password Token

I am using plugin <type name="Magento\Customer\Model\AccountManagement"> <plugin name="custom_change_reset_password_link_token" type="Vendor\MobileApp\...
Syed Hassan Zamir's user avatar
0 votes
0 answers
27 views

Orders Rest API Missing Custom Option Label and Text Value

I'm trying to retrieve orders from the REST API in Magento Community 2.4.3 with endpoints like /rest/default/V1/orders and /rest/default/V1/orders/items but while I can see the values for custom ...
Mahmoud M. Abdelmalek's user avatar
1 vote
1 answer
53 views

Is there any API to get Products details in magento2 without Bearer Token

I want to get products By Id but it the way i am doing this doesnot return some product details in case of configurable <?php namespace Vendor\MobileApp\Model\Api; use Vendor\MobileApp\Api\...
Syed Hassan Zamir's user avatar
0 votes
0 answers
8 views

Magento Rest Api in PowerAutomate error

I have 2 poweautomate cloud flows for integrating magento to some other systems. The first one is working correctly and I am getting the items/produts based on the search criteria I am passing. ...
Alexandros Papaspyridis's user avatar
0 votes
1 answer
49 views

Strip index.php from rest urls

I am having this issue with an external platform which trying to get rest urls from my magento 2.4.5. Issue is that the urls they hit contain index.php inside. They are like this: https://example....
G. G.'s user avatar
  • 1,112
0 votes
3 answers
224 views

magento 2.4.3 api "the consumer isn't authorized to access %resources" error"

I'm trying to call magento api from an external chat bot for customer service. For testing purposes, I'm using default magento get call on order (/V1/orders/{id} ). If I create an admin (or customer) ...
Lou Nik's user avatar
  • 373
0 votes
1 answer
350 views

How to save data to database using interface repository api

I'm a newbie magento 2 developer. I'm currently learning how to store data to database using repository-interface-model-api approach. My code is not working. model ItemRepository class ...
jsnewbie21's user avatar
1 vote
1 answer
103 views

how to translate magento2 Core APIs messages

I am creating mobile app using magento2 APIs. The problem is that I want to translate messages according to the store on frontend for example i want to translate the error messages and success ...
Syed Hassan Zamir's user avatar
0 votes
0 answers
13 views

Automatically create Integration

is there a "new" way to create integrations automatically? Since my modul is gonna be tested in different environments/systems, creating integrations automatically is kind of crucial. check ...
y.y's user avatar
  • 103
0 votes
1 answer
152 views

Magento 2 custom API giving "Class string does not exist" error

In Magento 2.4, I am using custom API and it is giving the below error. { "message": "Class string does not exist", "code": -1 } I have tried this and this solution. But ...
Saravanan DS's user avatar
  • 1,116
0 votes
1 answer
239 views

REST API Response Modification to Include Custom Attribute

I'm currently using the following endpoint to retrieve the last 50 orders: /rest/V1/orders/?searchCriteria[sortOrders][0][field]=created_at&searchCriteria[pageSize]=50 However, I've noticed that ...
tess's user avatar
  • 1
0 votes
2 answers
49 views

Error trying to GET all orders

I am getting the error below trying to get all orders using get('rest/V1/orders?searchCriteria'); I am using Access Token and my integration has access to ALL API. { "messages": { ...
tess's user avatar
  • 1
0 votes
4 answers
83 views

REST API - Get an order by order id

what would be the end point for get an order details by order id? I have access to all API requests. Also which key should I use? Thank you!
tess's user avatar
  • 1
1 vote
1 answer
215 views

How to stop create customer via rest API in magento 2?

I do not know how to stop to create customers via REST API in magento 2. I have magento 2 instance in 2.4.0 version I found a below code in vendor/magento/module-customer/etc/webapi.xml path <route ...
Niraj Patel's user avatar
0 votes
0 answers
140 views

Creating an Order with configurable Product via REST API

I have been able to create an Order with simple Products via REST API and then had no issue creating its invoice and shipment. Now I want to create an Order with configurable Products, and although I ...
makeMonday's user avatar
0 votes
1 answer
151 views

How to modify custom attribute of a product with JSON (Postman) Magento 2

thank you for reading me. Is there a way to modify a product´s custom attribute? I´m using postman, i use JSON POST for price and stock but i can´t find the way to update a custom attribute of a ...
Javier's user avatar
  • 1
0 votes
0 answers
41 views

How to update products images roles with rest Api for configurable products?

either unique or configurable product, we send images the same way. The only difference is that configurable product have 3 role, unique have 4, because they can be "swatch", when do update ...
Robinio's user avatar
  • 771

1
2 3 4 5
37