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
3 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 ...
  • 738
0 votes
0 answers
9 views

Magento 2 : Update tables on custom rest API calls

API URL : http://website.local.com/rest/V1/rma/rma/:100000008 Method : PUT Request : { "rma": { "status":"approved", "reply": "Your Package will ...
  • 1
0 votes
1 answer
28 views

Error in Postman and show that Invalid type for value: \"%productId%\

I have developed a module in my magento 2.2.6 for to create an API that can update the product price and quantity via product id . Please see my code below /var/www/html/app/code/AdmNetsuitePQ/...
0 votes
1 answer
21 views

Magento 2: How to export tables by name using REST API

How can i export tables using the REST API. I've looked through the devdocs and dont see any endpoints to do this? The tables i want are standard ones like customer_entity and sales_order.
0 votes
1 answer
16 views

apply coupon only from REST API request

I'm working on custom API collections for Magento 2. i'm trying to add new feature that allow customer to use some coupons from Mobile Apps Only. So i need to add new condition for Cart Price Rules, ...
0 votes
0 answers
18 views

How to fix a database timeout when deleting a source item through the REST API?

I have Magento 2.4.1 with MariaDB and a catalogue of 370,000 products. I’m trying to delete source items through the REST API. It used to work well in the past, but today I can’t get it to work. Even ...
  • 123
0 votes
1 answer
27 views

Magento 2 - Request sample for carts/mine (GET)

I try to call the carts/mine GET route of the Magento 2 REST API, but it does not show a request sample in the documentation. It says "Returns information for the cart for a specified customer.&...
  • 2,903
0 votes
1 answer
34 views

How to work with Magento REST API using Integration tokens?

I have tried these steps Use the following steps to generate an access token: Log in to Admin and click System > Extensions > Integrations to display the Integrations page. Click Add New ...
0 votes
1 answer
10 views

REST on barebones Magento Server - Creating a product doesn't show ANY Price--even the base one

I have a docker instance of magento running. I'm using the latest image. Here's the post request to create a product: curl --request POST \ --url http://localhost/rest/V1/products \ --header '...
3 votes
3 answers
145 views

Extension Integration Access Token for Rest API is not working in local

I am using Magento 2.4.4 with xampp in my local.Have created extension integration token and added acl for newly created custom rest api resource. when i was provide access Token in my rest api as ...
0 votes
0 answers
10 views

How to uniquely store guest information to a custom table on API call?

I want store each guest information with unique id, so that when the specific customer from that device get login/signup i update that information from guest and attach a customer id with data. ...
0 votes
1 answer
38 views

Magento 2 how to upload file using Rest Api

I want to upload file using REST Api. As per my reserch there are two ways for this. with passing base64 encoded string into form-data with passing file upload parameter into form-data but I am ...
0 votes
3 answers
49 views

rest/V1/products?searchCriteria[page Size]=10 giving signature error magento 2.4.5

I am calling Magento rest API to load all products of a site. https://store_url/rest/V1/products?searchCriteria[pageSize]=10 It gives the following error - "message": "The signature ...
0 votes
1 answer
37 views

Rest API service

http://dev.eternal/rest/all/schema?services=all, gives all services, but what if I want to grab only customer service? how can I do it? Plus, how to create a service and call just the desired API's? ...
0 votes
0 answers
20 views

Magento 2 : Assign products to a source Api doesn't works properly

when we use assign products to a source using api then it creating only Qty instead of qty & salable qty. Endpoint :- {{base_url}}/rest/default/V1/inventory/source-items Method :- POST Payload :- {...
0 votes
2 answers
26 views

How to include a custom attribute in the Customer object when calling through API

I made a custom attribute using this code in the Setup/Patch/Data, everything works just fine except when calling the API to get the customer object, it comes without the new custom attribute included,...
0 votes
0 answers
12 views

Is there any way to view the store name and store address using the rest api?

I've tried all the store related endpoints such as storeConfigs, storeViews, and etc but I've yet to find any that give the store information located in the configuration tab on magento.
  • 1
0 votes
0 answers
191 views

Magento 2 Bulk Product Update via API

I'm trying to achieve a bulk update of products via the Magento (2.4.4) API. I've been following a guide here Magento 2 : How to update qty and stock status using API for multiple products? However, ...
1 vote
0 answers
25 views

Decrypt Apple Pay PKPaymentToken using Braintree

I have a mobile app connected to magento via rest api. As payment processor I am using Braintree, default payment extension by Gene Commerce. Credit card, google pay works, problem is with Apple pay, ...
  • 153
0 votes
1 answer
31 views

Programmatically created integration is not working properly

I read the documentation of creating integration. I get my integration and I have the below permissions in my etc/integration/api.xml <integrations> <integration name="...
0 votes
0 answers
29 views

Resource access issue for an Integration of custom module

I am using Magento 2.4.5  I created an Integration for my custom module. I am successful in generating the oauth_token & oauth_token_secret. But when I want to see an order using API, I get a 401 ...
1 vote
2 answers
47 views

REST API return JSON object using factory and interface

I am trying to create a simple module to return JSON data, if i returned string or array it will return the targeted data, but i can't return JSON object with key value when i return the interface it ...
0 votes
2 answers
155 views

Get product using SKU with respect to the store data using Magento 2 REST API

I use the core API /V1/products/:sku to get the product using the SKU. for example, I have 2 stores, one in English and another in Japanese. My API Endpoint is like http://local.mystore.com/storefront/...
  • 498
0 votes
2 answers
94 views

Reset Password Api Magento2

How can I reset my password using Magento2 Rest API I used the below API to get password link but it doesnot send reset token to used in password reset api URL: store_url/rest/V1/customers/password ...
0 votes
1 answer
52 views

How to use Grahql API with ACL resouce as Rest API?

We have a issue and want to limit permission each roles. Do we have any way to make Graphql can set permission roles as Rest API? EX: Admin token with roles "sales", they only access Graphql ...
  • 678
0 votes
1 answer
40 views

REST API data disaply in admin grid Magento 2.4.4

How to show REST API data in Admin Grid ???? Thank You
  • 5,961
0 votes
0 answers
28 views

Magento2 - Netsuite intergration - CURL request - throws Invalid login attempt

I try to connect to Netsuite API from Magento2. throws Invalid login attempt from Netsuite. my code is below please help me . public function createPostRequest($type, $params, $page_constant){ try{...
0 votes
0 answers
47 views

How to create a link to the Magento 2 checkout page for a cart created programmatically through REST API calls

I'm able to create a cart in Magento 2 programmatically calling rest APIs, being an administrator. I used this feature to allow users of another application to place orders on Magento, using a totally ...
1 vote
1 answer
28 views

Magento 2 Overriding or Extending Core Interfaces in custom module without use of extension attribute

I am trying to add a new getter and setter to \Magento\Catalog\Api\DataCategoryTreeInterface
0 votes
1 answer
22 views

How to get get entity_id from order increment_id using REST?

I want to have my entity_id of my order, so I can make a deeplink directly to it, from another application. According to this question: REST API: get order entity_id from order increment_id that ...
0 votes
1 answer
134 views

Content-Type HTTP application/x-www-form-urlencoded is return error

When i am using Content-Type: "application/x-www-form-urlencoded" in API i getting the error: { "message": "Server cannot understand Content-Type HTTP header media type ...
0 votes
0 answers
65 views

Magento 2 REST API - default to `all`?

We have a 3rd party integration using the /rest/V1/product/[sku] Magento endpoint, but some updates have not been coming through to the admin (single store) - we tracked down that changing the ...
0 votes
0 answers
27 views

How to check if a module needs an update using comands/code?

Is there a way to check if a module needs an update using commands or code ? Maybe i can compare the current version to the latest version, but how do i check what the latest version for a module is ? ...
0 votes
0 answers
136 views

How to create REST API using multipart/form-data for file upload in Magento2

Can you please provide some guidance (or) Steps on how to create REST API in Magento 2.4 using multipart/form-data for the upload. Please share me the example (or) reference links it would be ...
0 votes
0 answers
21 views

Default attribute values for products imported via API

When importing products, sometimes some attributes are not set, or have no value (for example, weight sometimes is not sent through the API). Especially weight sometimes gives us issues, since it's ...
0 votes
0 answers
11 views

Magento 2.4.4 REST API Post rtf text to description

I was wondering if it is possible to post rtf text to description via rest api. The formatting of the text should stay the same. Sample rtf: {\rtf1\deff0 \stshfdbch2\stshfloch1\stshfhich1\stshfbi1{\...
  • 1
0 votes
1 answer
37 views

Magento 2.4.4 REST API short description post

I'm trying to import the short description with Postman. No matter how i try I always get an error. I'm using following URL /rest/english/V1/products/ The shop has to different view_codes english and ...
  • 1
1 vote
0 answers
47 views

How to generate Product swagger data in Magento 2.4?

I have managed to generate Swagger data from my site no problem using the docs found HERE I go to https://example.com/swagger?store=all ( obviously with my site instead ) and even authorise it. The ...
1 vote
0 answers
76 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 ...
1 vote
0 answers
145 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/...
1 vote
3 answers
179 views

Unable to set customer group when create customer with REST API

In Magento 2.4.5 I'm trying to create customer with REST API. In the payload I specify the group ID, but the new customer always get the default group ID. Example payload: $customerData = [ 'customer' ...
2 votes
0 answers
56 views

Category Permission Validation with REST API on Magento 2.4.4-p1 (EE)

We are facing an issue with the "Category Permission" feature. Category Permission validation is not working with REST API. Below are the details: We are facing this issue at the Adobe ...
1 vote
2 answers
171 views

How to save customer information using external Api

Can anyone help me on how to save customer information on magento2. Explanation: I have an external endpoint which comprises customer information(e.g name, address e.t.c) that i need to save on ...
  • 15
1 vote
0 answers
64 views

Magento 2 API: How to set custom shipping rate for order?

I'm creating the order via API requests to Magento's REST endpoints. I would like to set a custom shipping rate for the order. I want to preserve the shipping carrier name and method but have a custom ...
0 votes
0 answers
68 views

Magento 2 Product Image Upload on Rest API

The following is my My API PAyload so images are not uploading if I use any other website image URL,i.e https://i.stack.imgur.com/uGw5A.png So I need to upload the image using URL, Please guide me in ...
0 votes
2 answers
76 views

Magento2.4.4 Place order using stripe payment method through REST API

From stripe sdk I am able to create payment id successfully but when call api to create order in magento2 then getting authentication error. I am calling below API http://localhost/xxx/rest/default/...
0 votes
0 answers
18 views

Add custom method in ProductCustomOptionValuesInterface

Is any way to add custom methods in \Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface.php and \Magento\Catalog\Model\Product\Option\Value.php in default setExtensionAttributes does not ...
0 votes
1 answer
331 views

Magento 2 How to get the Order Extension_Attribute Value in AfterPlugin

How to get an order's extension attribute value when creating the order via the API? For example to create an order I'm calling /rest/V1/carts/mine/payment-information with the following payload: { ...
0 votes
2 answers
169 views

Url rewrite error

Can anyone please help me on this? i'm calling all my product name and sku from an external api and save to database but unfortunately when i run cron i'm getting following error on log and the api ...
  • 15
0 votes
1 answer
57 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

1
2 3 4 5
37