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
0 answers
14 views

Not getting the difference changes on comparing two git branches in same repo using Github API

I am able to get difference between two branches stage and master under same repo on web version via below web URL. https://github.com/:username/:repo/compare/master...staging but not getting the ...
Shashank Kumrawat's user avatar
0 votes
0 answers
14 views

Update REST API Payload using before Plugin

Can I use before plugin in Magento 2 to update Customer Creation Payload? Reason: In Magento, we have one custom customer attribute of dropdown type as you can see below. Now the API is working fine ...
Muhammad Saeed Khan's user avatar
0 votes
1 answer
23 views

Shipment comment

I am trying to update a comment for an existing shipment, but I keep getting err mssg: {"message": "Could not save the shipment comment."} API and example I'm using are : Method:...
Magento_noob's user avatar
0 votes
1 answer
34 views

When creating an order via api, the salable quantity does not decrease

I am using the API /rest/V1/orders/create, but when creating an order, the saleable quantity does not decrease. (Magento ver. 2.4.6-p3 community edition) I am using this payload: { "...
Danilo Duarte's user avatar
0 votes
0 answers
16 views

Api\SearchCriteriaInterface returning products in anchor categories (or not)

Using a module for a mobile app and this code is retrieving search results. However it's completely ignoring anchor categories and I've spend most of the afternoon trying to figure out why not. There'...
DomiGuy's user avatar
  • 11
0 votes
0 answers
18 views

CMS module don't have the getExtensionAttriubtes and setExtensionattributes

I am working on REST API for the cms block and adding some custom fields in the cms_block table. However, I didn't see the methods getExtensionAttriubtes and setExtensionAttriubtes in the CMS Block ...
Arshad Muhammad's user avatar
0 votes
0 answers
16 views

Get salable quantities for all products via REST API

For synchronizing inventory levels with the external ERP, I need to know the quantities and booked quantities of all products. I can easily get quantities of all products with one request (rest/all/V1/...
Alex's user avatar
  • 101
0 votes
0 answers
6 views

Get salable quantities for all products via REST API

For synchronizing inventory levels with the external ERP, I need to know the quantities and booked quantities of all products. I can easily get quantities of all products with one request (rest/all/V1/...
Alex's user avatar
  • 101
1 vote
1 answer
54 views

The consumer isn't authorized to access %resources. Magento 2.4.5-p1 on staging environment

In the testing environment, it gives below errors, { "message": "The consumer isn't authorized to access %resources.", "parameters": { "resources&...
Nilay Kumar's user avatar
0 votes
1 answer
60 views

How to get all orders with a specific SKU using the REST API?

I’m trying to figure out if a product was bought and when, but other than looping over all orders I don’t see how I can do that. I saw this question but I need to do it through the REST API. Any idea?
bfontaine's user avatar
  • 120
0 votes
1 answer
38 views

unable to update custom attributes to product using rest API

I have created the custom attribute through rest API and it is also reflected in magento admin, after which when I tried to update the product with the attribute code.it won't worked. Below is my ...
manikandan.p's user avatar
0 votes
1 answer
32 views

Update custom attributes to product using rest

$data = [ "product" => [ "sku"=> $productsku, // "attribute_set_id"=> 4, //"attribute_set_id" => $mage_attr_set_id, ...
manikandan.p's user avatar
0 votes
0 answers
19 views

Magento 2 Email set as Optional on Create Customer Account API

I have created one module that overrides Magento's default create customer account API. Now, I want to set the email parameter as Optional. Magento uses the Below API to create a Customer Account. {{...
Keval Chauhan's user avatar
2 votes
0 answers
38 views

Professional Couriers Order Tracking REST API Issue

We have used Professional Couriers REST API to get shipping tracking information. But on my end, only three-time correct responses were returned after that given below error. Please check the ...
Sutariya Parth's user avatar
0 votes
0 answers
39 views

Magento 2.4.6 search synonyms doesn't work on REST API

I am trying to make use of search synonyms. I have created a synonym group, and added synonyms comma separated, and afterwards ran full re index. http://website/rest/V1/products?searchCriteria[...
Aniruddha Ray's user avatar
2 votes
1 answer
26 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
  • 21
1 vote
0 answers
17 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,358
1 vote
2 answers
136 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,358
2 votes
0 answers
92 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
99 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
  • 47
0 votes
0 answers
13 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
23 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
18 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
39 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
35 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
  • 197
0 votes
2 answers
75 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
67 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
78 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
  • 197
0 votes
1 answer
37 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
245 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
  • 13
0 votes
1 answer
32 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,330
0 votes
1 answer
46 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
93 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
73 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,464
0 votes
0 answers
63 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
64 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
51 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
39 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
410 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
234 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
63 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
128 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
62 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
16 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
105 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
38 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 ...
Bee H.'s user avatar
  • 101
0 votes
0 answers
59 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
93 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
38 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
2 3 4 5
37