Questions tagged [rest]

Denotes questions related to the REST API on Magento

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

REST api & sourceId

There are many REST endpoints that require passing a sourceId parameter. Where do I get the value for sourceId? https://magento.redoc.ly/2.4.5-admin/tag/inventorysources#operation/...
  • 101
0 votes
2 answers
45 views

Get Customer Name if its logged in otherwise return message in API Magento 2

I am trying to get the customer's name by POST Method API if it's logged in but when I hit the link the postman, returns the Customer's Name even if it's not logged in. Please take a look CODE: <?...
0 votes
1 answer
17 views

REST Api to get cart of anonymous user

As you know you can add products to the cart even if you're not logged in. I need to retrieve what a user has added to the cart in a given browsing session. Then i need to edit it (add/remove to/from ...
  • 101
0 votes
0 answers
24 views

Magento 2 REST api - search products and get SKU

as the Docs state here, since 2019 some of Magento's REST APIs have been restricted for anonymous access. This means that they are accessible only with an admin token. One of those APIs, the first in ...
  • 101
0 votes
0 answers
40 views

How to save data into table that pull from an API in Magento 2.4.4?

i have a problem how can i save the data that I pull form an API on website Here is my website I wanna get data from API: https://blog.api.rakuten.net/api-tutorial-rakuten-marketplace-api/ I really do ...
  • 101
0 votes
1 answer
29 views

Magento 2 - Where is the Rest API code located?

We call the Rest API with "/rest/V1/carts/mine". Where is the code located in magento?
  • 2,551
0 votes
1 answer
28 views

How to connect two magento2 application

I have two magento2 application running which are M2(a) and M2(b), I want all product on M2(a) to be displaying on M2(b) automatically, I have created an Integration on M2(a) by going to admin->...
  • 3
0 votes
0 answers
79 views

Extend API V1/products to put the not available products at the end

I want to display out of stock products at the end of the V1/products response. So far I tried to create a plugin on Magento\Catalog\Api\ProductRepositoryInterface to override the getList method but ...
0 votes
0 answers
20 views

Overriding function or replacing interface (core)

Magento beginner here. Currently, I am trying to send multiple options for a product attribute via REST API. Since Magento isn't capable of doing this I am trying to override the add function in ...
0 votes
2 answers
535 views

Magento 2 REST API on add to cart "quoteId" is required. Enter and try again

When I try to add to card any item via REST API I get this error: "{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{"...
  • 143
0 votes
1 answer
110 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&...
  • 828
0 votes
2 answers
406 views

Magento 2 send data to an API

I would like to have data from Magento 2 dashboard shown in some visualization software and have found documentation from the other site about their API, but I can't find any information from Magento ...
0 votes
1 answer
225 views

Magento2.3.4 different hours in REST API call GET Orders and the real order hour timezone

I have selected Timezone (Configuration->General->Locale Options) Central European Standard Time (Europe/Warsaw) Order 10004 has been created at: Sep 21, 2021, 5:59:34 PM When I send API ...
0 votes
1 answer
29 views

Magento2 Order Number different in REST API orders

I've changed my order number to 2000. INSERT INTO magento.sequence_order_1 (sequence_value) VALUES ('2000'); Then change lenght of order number <?xml version="1.0"?> <config xmlns:...
1 vote
1 answer
75 views

How to do online refund using REST

Accoring to Magento documentation, endpoint for online refund is: POST /V1/invoice/<invoice_ID>/refund So to my understanding, the following call should make an online refund: curl --...
1 vote
0 answers
165 views

Magento 2 Customer API Token refresh

I am developing an APP based on magento 2 ecommerce. As any APP, the user should never logged out. I can get with magento 2 a token for any customer by that token have an expery time. I know that I ...
  • 29
0 votes
1 answer
110 views

REST API > Create Product = 400 error "Please select a product type"

I'm trying to create a Product with a call to the REST API POST https://mymagentodomain.com/V1/products { "product":{ "price":8, "sku":"123456789", ...
2 votes
0 answers
104 views

What is Cleanup Probability Settings For OAuth

I am not getting the implementation of Cleanup Probability settings which you can find at Stores > Configuration > Services > OAuth > Cleanup Settings > Cleanup Probability. From the ...
0 votes
1 answer
76 views

gift-message attribute not appearing in REST API Orders response after setting it on Cart

I am developing a headless Magento backend using REST/Graphql on the frontend. After enabling the Gift Message module in admin, I set correctly set the Cart gift-message like so: http://localhost/...
0 votes
0 answers
277 views

Cant get Admin Token using cUrl 403 error

I've managed to get the API Token using Postman however, when I try to get the admin token through a cUrl request it returns a 403 error. Postman Post Request: https://localhost/index.php/rest/V1/...
0 votes
0 answers
48 views

Customer Login, Products and Place Order REST APIs for React Native from an existing Magento 2 website

I've figured out how to login using customer credentials and get the token. I'm not able to fetch the products, categories with this token. Do I really need an admin token? Is it not safe to expose ...
0 votes
1 answer
422 views

Got error when trying to submit order via rest api and stripe

I have magento 2 setup, with Stripe plugin, and I'm trying to create order using PUT http://ec2-3-236-104-131.compute-1.amazonaws.com/rest/V1/carts/mine/order BODY { "paymentMethod": { ...
1 vote
0 answers
21 views

how i can retrieve Minimum Amount in magento 2 using REST API?

Dears I am using Magento ver. 2.2.7 as backend for my app, i want to get "Minimum Amount" for orders when my users review them bascket. So i am looking for API to retrieve value of "...
0 votes
1 answer
118 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 ...
0 votes
1 answer
239 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
2 answers
159 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
1 answer
951 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 &...
  • 1
0 votes
1 answer
60 views

First product added to new cart returned with no JSON "price"

This is my first time currently working with Magento. I am developing a custom web shop solution for a machine shop with React.js. My issue is the following: After having completed a purchase and ...
0 votes
2 answers
506 views

REST API: Consumer is not authorized to access %resources

I'm in the middle of finishing a Magento 2 store for a client. The last I had on my to-do list, was connect Magento to their accounting software through the REST API. However, apparently there's some ...
  • 160
0 votes
0 answers
86 views

Magento 2 How to get products details with qty calling products endpoint?

Magento 2 How to get products details with qty calling products endpoint? I need to get the qty from the products endpoint.
1 vote
1 answer
1k 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
0 answers
115 views

Magento 2 How to get Custom Attribute Value Of Order Using Rest API

I have created one attribute for order named "custom_fee" and it is showing okay in magento orders frontend as well as backend but when I tries to access order data with rest API , I am not ...
0 votes
0 answers
242 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' ...
  • 71
0 votes
1 answer
62 views

Logs full of /rest/V1/analytics/link 500 errors

Working on a new M2.4 store and we've got the store blocking access to all visiting IPs except ours. Our logs are filled all day, every day with hundreds of this error: Error 52.73.51.61 500 GET /...
  • 137
3 votes
1 answer
1k views

No such entity cartId when send POST on /rest/default/V1/carts/mine/payment-information

According to documentation - https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-order.html I'm trying to make call on /rest/default/V1/carts/mine/payment-information with body: ...
3 votes
0 answers
855 views

2FA REST API using Postman

I have followed the steps at: https://devdocs.magento.com/guides/v2.4/security/two-factor-authentication.html to get a token in order to use Postman to fetch Magento 2 REST endpoints e.g. products, ...
  • 31
0 votes
1 answer
251 views

Rest API response for api inside the extension module appends square bracket

I have a rest api created in php. Sharing a sample here: public function getApiData(){ $returnData = ["a"=>"A","b"=>"B"]; header("Content-Type: ...
  • 111
3 votes
1 answer
640 views

Magento 2 Stripe SCA (3d secure) rest api integration

I'm creating a pwa based on magento 2 rest api. I have installed stripe/stripe-payments official module to integrate stripe payments. Everything works fine without SCA payments. i have tried to ...
1 vote
0 answers
178 views

Magento 2 - Create order using REST API - Third Party Payment Gateway such as Paypal or other 3rd party payment gateway

I need to use the Magento REST API to create an order from an API. In my case, I am trying to implement the payment directly using API to Magento. What I need to do is to create an order by setting ...
1 vote
1 answer
76 views

Facets in Magento 2 Rest API for search. Are they available ? how do i make them available?

How do i make facets available in Magento 2 ? Currently i do not think it's supported in the Search Rest APIs
  • 161
2 votes
4 answers
949 views

get orders by date using REST endpoints

I'm trying to get all orders on a specific date, as an example, I'm trying to get all orders at 28th of June 2020. But my problem is that I get a total count of 0 even though there's orders at that ...
0 votes
0 answers
89 views

Magento 2 Custom REST API Update

If Only part of the data is to be updated then is sent the following way: { "entity": { "entity_id": 1, "is_enable": 1, "name": "Hello", ...
1 vote
1 answer
398 views

Send email to customer on order update via rest API

I'm using /rest/V1/orders POST WebService to update an existing order. Is there any way to send an email to customer when the order is updated this way? Thanks in advance !
  • 1,137
0 votes
1 answer
137 views

magento 2 resource model "save" to implement service contract persistence operations. not saving POST empty

I have a custom rest api for PUT and POST that the post data is an empty array therefore not saving as it's empty can anyone advise why or what could be wrong? /** * Save data. * * @...
3 votes
1 answer
211 views

Is it possible to override vendor/magento/module-sales/Api/Data/OrderAddressInterface.php

Is it possible to override vendor/magento/module-sales/Api/Data/OrderAddressInterface.php as I want to get sales order address custom column value in order REST API.
  • 121
0 votes
1 answer
1k 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
  • 121
0 votes
1 answer
199 views

Error on Update inventory REST API? when SKU has a "#" in it

I'm trying to update the inventory of our products from our ERP using the rest api. I have run into an issue when the SKU has a pound "#" in it. A URL like: https://magento.xyx.com/rest/V1/...
0 votes
1 answer
613 views

Get All orders using rest API with specific feilds

I am using this http://domain.com/index.php/rest/V1/orders/7??fields=billing_address,customer_firstname,customer_lastname it return the billing_address,customer_firstname,customer_lastname of ...
  • 1,535
0 votes
1 answer
701 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&...
0 votes
1 answer
2k views

How to add Review using REST API in magento 2.3

I am trying to find a rest api to add review. But it seems like magento doesn't provide api for that.I created custom api's to get review and rating using: https://www.mageplaza.com/devdocs/get-...

1
2 3 4 5
17