Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 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?
user avatar
  • 2,380
0 votes
1 answer
22 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->...
user avatar
  • 1
0 votes
0 answers
44 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 ...
user avatar
0 votes
0 answers
17 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 ...
user avatar
0 votes
2 answers
170 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":{"...
user avatar
  • 143
0 votes
1 answer
30 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&...
user avatar
  • 828
0 votes
2 answers
112 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 ...
user avatar
0 votes
1 answer
130 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 ...
user avatar
0 votes
1 answer
25 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:...
user avatar
1 vote
1 answer
32 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 --...
user avatar
0 votes
0 answers
21 views

Extension attribute not working in updateStockItemBySku API

I want to update the product custom attribute in this stock update API so, I have passed Payload like this: { "stockItem": { "qty": 7.00, "is_in_stock&...
user avatar
  • 7,336
0 votes
0 answers
64 views

Magento 2 REST API doesn't update salable quantity

I use rest api to create a simple product on my magento. All works correctly except quantity column that is correctly update on "Quantity" column but not on the salable quantity. Rest call: &...
user avatar
0 votes
0 answers
48 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 ...
user avatar
  • 19
0 votes
1 answer
66 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", ...
user avatar
2 votes
0 answers
82 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 ...
user avatar
0 votes
1 answer
45 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/...
user avatar
0 votes
0 answers
191 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/...
user avatar
0 votes
0 answers
40 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 ...
user avatar
0 votes
1 answer
306 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": { ...
user avatar
1 vote
0 answers
19 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 "...
user avatar
0 votes
1 answer
65 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 ...
user avatar
0 votes
1 answer
81 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 ...
user avatar
0 votes
2 answers
149 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....
user avatar
0 votes
1 answer
584 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 &...
user avatar
  • 1
0 votes
1 answer
59 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 ...
user avatar
0 votes
1 answer
288 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 ...
user avatar
  • 140
0 votes
0 answers
59 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.
user avatar
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/...
user avatar
0 votes
0 answers
99 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 ...
user avatar
0 votes
0 answers
207 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' ...
user avatar
  • 71
0 votes
1 answer
43 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 /...
user avatar
  • 138
3 votes
1 answer
897 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: ...
user avatar
3 votes
0 answers
654 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, ...
user avatar
  • 31
0 votes
1 answer
242 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: ...
user avatar
  • 111
3 votes
1 answer
545 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 ...
user avatar
1 vote
0 answers
146 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 ...
user avatar
1 vote
1 answer
56 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
user avatar
  • 161
2 votes
4 answers
666 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 ...
user avatar
0 votes
0 answers
69 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", ...
user avatar
1 vote
1 answer
279 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 !
user avatar
  • 1,097
0 votes
1 answer
117 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. * * @...
user avatar
3 votes
1 answer
169 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.
user avatar
  • 121
0 votes
1 answer
827 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
user avatar
  • 121
0 votes
1 answer
178 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/...
user avatar
0 votes
1 answer
378 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 ...
user avatar
  • 1,506
0 votes
1 answer
663 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&...
user avatar
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-...
user avatar
1 vote
1 answer
735 views

Magento 2 Access REST API

I tried looking for answers before posting but couldn't find any. I hosted my magento site in siteground and added integration. Then I tried accessing the API using Postman but I get either 401 ...
user avatar
1 vote
2 answers
416 views

Magento 1: Where is oauth_admin.php

The rest documentation for Magento 1 make mention of an oauth_admin.php file $callbackUrl = "http://yourhost/oauth_admin.php"; $temporaryCredentialsRequestUrl = "http://yourhost/oauth/initiate?...
user avatar
  • 43.5k
0 votes
2 answers
3k views

Magento 2 Get Value of Custom Attribute on Magento 2 Rest API V1/orders/items

I am trying to get the Custom Attribute I have in the sales_order_item to display on the rest/V1/orders/items API call. I was able to get the Attribute to display on the rest/V1/orders API call. Using ...
user avatar

1
2 3 4 5
17