Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
166 views

Can we configure webhooks in Magento using its REST API

I'm currently exploring the capabilities of Magento's REST API for integrating with external systems, and I'm interested in setting up webhooks to receive real-time notifications for specific events ...
Ibrar Akhtar's user avatar
0 votes
1 answer
40 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
2 answers
167 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
1 vote
0 answers
176 views

Why creating an empty cart via REST API requires parameters for quote address for this customer account?

I'm using Magento 2.3.3. Normally, calling this endpoint will return customer's quote ID. But for this specific user, I got this error as a response: { "message": "One or more input ...
nawawishkid's user avatar
2 votes
0 answers
215 views

Magento 2 REST API `POST /carts/mine` takes forever to respond

It's an endpoint that: Creates an empty cart and quote for a specified customer if customer does not have a cart yet. Doc: https://magento.redoc.ly/2.3.7-admin/tag/cartsmine#operation/...
nawawishkid's user avatar
0 votes
1 answer
112 views

Magento 2.3 Disallow Post to /V1/Customers

I am battling spam accounts being generated via Magento's REST API for customers. Someone keeps hitting my site with Postman and dumping in hundreds of fake accounts. I have set Allow Anonymous Guest ...
user86226's user avatar
0 votes
0 answers
218 views

404 on API request to admin token

I'm making a request to integration/admin/token using the below code : $response = $this->_client->request('POST', 'integration/admin/token', [ 'json' => [ ...
gazZz's user avatar
  • 97
0 votes
1 answer
623 views

Magento 2 how to modify SKU in order rest api response

I have to edit the SKU with some other data. When I use this rest API below http://localhost.com/rest/V1/orders/1 I get SKU in two places like below. Place one at the first like below "items&...
Ramesh KR's user avatar
  • 886
1 vote
1 answer
689 views

Unable to Save Configurable Product Options using API

I am using Magento's API to add the Configurable Product Options but I don't see them in Configurable product data. EndPoint Used to add the Configurable Product Options https://example.com/rest/...
PRABHAT MISHRA's user avatar
0 votes
2 answers
57 views

Do a action before insert products by endpoint magento 2

I wanna make a verification before inserting products on my Magento 2.3 in the default endpoint. Here is a sample: I post a product on rest/default/V1/products endpoint, but I want to check if this ...
Raphael Cordeiro's user avatar
0 votes
3 answers
117 views

How to get GuestCartId using rest API?

I'm trying to fetch the estimated shipping method, but I can't find it. How can I get this element for the API code? Api Url {{Base API URL}}/guest-carts/{{GuestCartId}}/estimate-shipping-methods
lucas's user avatar
  • 309
0 votes
0 answers
145 views

Magento 2 - How to upload image and some post data to REST API (POST)

I'm working with a Magento 2 project that need to upload image and post data using a POST endpoint How can I send image with post array data.If post request sample available then share. Thank you very ...
Vikas kalal's user avatar
  • 1,341
0 votes
1 answer
144 views

Magento 2 RestAPI shows wrong stockid

I ran the Magento Rest API to get the stock id for a particular product but it's showing me the wrong stock id. We have three websites and each website has a separate stock, but when we call Magento ...
Ashish Nair's user avatar
3 votes
1 answer
441 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
0 votes
1 answer
281 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
2 answers
726 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
1 answer
867 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
197 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
442 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
0 votes
1 answer
666 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
1 answer
276 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 ?
shankar boss's user avatar
  • 1,473
0 votes
1 answer
2k 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 ...
Rajni Jain's user avatar
1 vote
3 answers
1k 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][...
NileshPlus91's user avatar
0 votes
1 answer
2k 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 ...
Nayem323's user avatar
  • 771
1 vote
1 answer
583 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??
niraz's user avatar
  • 23
0 votes
0 answers
331 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' ...
Zyzzx's user avatar
  • 81
0 votes
1 answer
605 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 ...
Shahzad Hasan's user avatar
1 vote
1 answer
2k 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 ...
paras surya's user avatar
3 votes
1 answer
223 views

invalid date when adding product with custom options(datetime) using REST API

I have a product with a custom option DateTime filed in product options When I try to place an order using rest API. My order array is given below $order = array ( 'cartItem' => array ( ...
Adarsh Ediyottil's user avatar
0 votes
1 answer
253 views

Magento2 : Add simple product with custom options To cart Rest API

hello I need to Add simple product with custom options To cart throw Rest API I succeeded t add the simple product , price is correct and every thing is ok but unfortunately I didn't succeed to add ...
Anis Agrebi's user avatar
0 votes
2 answers
3k views

Magento 2.3.5 - API error The "array" class doesn't exist and the namespace must be specified

We get the following API error on our Magento 2.3.5 store; The "array" class doesn't exist and the namespace must be specified. Verify and try again. More info; <![CDATA[#0 /vendor/...
JGeer's user avatar
  • 1,422
0 votes
1 answer
2k views

How to override order api in magento 2

I want to get order detail with customized some information using order API. I want to override API: https://example.com/index.phprest/V1/orders How can I override in Magento 2.3
Vinod Kumar's user avatar
  • 2,065
1 vote
2 answers
3k views

How to get CUSTOM REST API Response in JSON FORMAT in MAGENTO2

Hello I have created one custom API Extension i got response in JSON but with some "Backslash" Below is my code: <?php namespace Vendor\NameSpace\Model; use Vendor\NameSpace\Api\...
Vardhman Kamani's user avatar
1 vote
1 answer
668 views

Magento 2 How to identify order is placed from frontend or rest API?

How to identify order is placed from frontend or rest API ? when we are trying to area code from any event after order placed $this->_checkState->getAreaCode() then we are getting always area ...
sumeet bajaj's user avatar
  • 1,326
0 votes
0 answers
91 views

Magento 2 why area code is showing wrong?

we placed order from magento frontend checkout when we check area code from this - $this->_checkState->getAreaCode() then we are getting area code is "webapi_rest" it must be frontend....
sumeet bajaj's user avatar
  • 1,326
2 votes
1 answer
1k views

Magento 2 how to stop decreasing stock qty while placing an order in magento 2 via REST API

how to stop decreasing stock qty while placing an order in Magento 2 via REST API Which plugin or which observer we have to use to stop decreasing stock qty? I am using event "...
sumeet bajaj's user avatar
  • 1,326
1 vote
0 answers
73 views

Using API to get child skus from configured composite sku

I'm using the Magento API to get SKUs from an order. We have a set of "configured" items that allow selecting optional add-on products but the order API returns these items as what seems to ...
S Adamson's user avatar
  • 729
0 votes
0 answers
448 views

Magento 2 override pricing / apply custom price on api order

When building an order in the Magento 2.3 admin you can apply custom pricing to line items, is there a way to do this when building an order via the standard Magento 2 API's? If not via the standard ...
Matthew's user avatar
  • 183
0 votes
2 answers
408 views

how to write a custom REST API call to get all order related data

how to write a custom REST API call to get all order related data in magento 2.3.2
user12992122's user avatar
0 votes
2 answers
499 views

Magento 2.3 - Login Authentication not working for validating customer email and password

Hi I have created Rest API for customer login with custom module for my Magento 2.3 store. I am entering parameters email and password for customer login. But it throws ...
IntraPersonalLearner's user avatar
0 votes
2 answers
2k views

Sales order address custom attribute value in Order Rest Api

I have added door number custom attribute to sales order address table. But I'm not able to get the vale in Order REST API. Please help me on this
user12992122's user avatar
0 votes
1 answer
1k views

How do I get the Area/City Name from Region ID for add address programmatically in Magento 2?

I got the state list from country code by following this blog for my Magento 2 store. I want to get the Area/City name from the state/region id, is there a way or method to get it in Magento 2.3.x?
IntraPersonalLearner's user avatar
0 votes
1 answer
754 views

How to translate API response

I'm adding product to cart using {baseUrl}/rest/{store_code}//V1/carts/mine/items If requested qty not available in stock then in response you'll get The requested qty is not available I want to ...
anonymous's user avatar
  • 3,752
0 votes
1 answer
983 views

Magento 2.3.4 Add custom product attribute value (text-swatch) via REST API

Using Postman, with the following GET request I receive data from my custom product attribute: rest/V1/products/attributes?&searchCriteria[filterGroups][0][filters][0][field]=attribute_id&...
Th. Schott's user avatar
1 vote
1 answer
3k views

How to set data for my extension attribute Magento 2.3

I can't set the value for my extension attribute , how to set the value for extension attribute using json array swagger. And i can't show the data in the order grid. The below attribute and value ...
Sabareesh's user avatar
  • 358
0 votes
1 answer
522 views

Magento 2.3 How to convert JSON response array to array of same type object REST API

I have created a custom api to get review and rating summary: public function getRatingSummary($productId) { $result =[]; $product = $this->_productRepository->getById($productId)...
Adrian Joseph's user avatar
0 votes
0 answers
42 views

Customize request and response of order REST API

Guest order placement request - URL - V1/guest-carts/:cartId/order Body - { "paymentMethod": { "method":"testpayment_gateway", "customField":"CustomFieldValue" // **This is not product ...
Aniruddha A Deshpande's user avatar
0 votes
2 answers
2k views

Magento 2 Get all Orders sort by latest orders

I am using the below Rest api to fetch all orders in desc i.e the latest on top but its not working index.php/rest/V1/orders?searchCriteria=all&searchCriteria[sortOrders][0][field]=order_id&...
Sairaj Gadekar's user avatar
0 votes
1 answer
308 views

Magento 2 How to apply filters for layered navigation Using REST API

I want to apply filters for layered navigation using REST API. If I send color=5 then in category page it is displaying 2 products so how to get that data in API response?
gajjala sandeep's user avatar
1 vote
4 answers
10k views

Magento 2: Type Error occurred when creating object

I had created a custom API for adding new customer in Magento 2.3. I had injected dependency injection and passed the method to create the customer account. But it gives me below error: main....
IntraPersonalLearner's user avatar