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
2 answers
16 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
13 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
25 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
10 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
46 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
13 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
24 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
22 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
31 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
52 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
44 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
28 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
25 views

REST API data disaply in admin grid Magento 2.4.4

How to show REST API data in Admin Grid ???? Thank You
  • 5,926
0 votes
0 answers
22 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
31 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
21 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
0 answers
49 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
37 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
25 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
17 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
31 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
32 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
40 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
87 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
2 answers
126 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
38 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
118 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
43 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
43 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
0 answers
16 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
177 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
85 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
64 views

Can't get extension attribute in a plugin

I am trying to create a module that uploads Category image (as Category extension attribute) via REST API. The problem is that I can't even fetch extension attributes in afterSave method of my Plugin ...
0 votes
1 answer
45 views

Does not have accessor method M2

Getting this error: {"message":"Property "CustomerId" does not have accessor method "getCustomerId" in class "Magento\Customer\Api\Data\CustomerInterface". ...
0 votes
0 answers
79 views

Adding category image via REST API

I am trying to create a module to add image to a category via API. My module is based on this module: An example of the Magento 2 extension that adds Extension Attributes to a Shipment document. and ...
0 votes
0 answers
258 views

How to get user id from JWT authentication Token in Magento 2.4.5

I am getting the Token from api call /V1/integration/customer/token I want to get the user id from this jwt token. How i can get it in magento2.4.5 ?
0 votes
0 answers
32 views

Magento API works without authentication token

I created Magento API with "self" resource id but it works without an authentication token. I have also tried Magento built-in API which update product in Magento "https://web-url/rest/...
3 votes
1 answer
152 views

Magento2 REST API/GraphQl for Multiple Shipping

I'm Creating PWA Website and I don't find any API for multi-shipping (Ship to Multiple Addresses). I have checked Grapql on Magento's doc https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-...
  • 7,366
0 votes
0 answers
16 views

Why do configurable_product_options must contain custom attribute data?

I'm POSTing configurable products via REST API, meaning if I have a t-shirt in 3 sizes and there's a custom "size" attribute I need to do 4 POST requests: 3 virtual ones for "S", &...
1 vote
1 answer
37 views

Why are so many numerical parameters in JSON are of string type?

I've been looking at the examples in the documentation and also issuing GET requests via REST to get various information about products and categories. One thing that I find unusual is that there are ...
1 vote
2 answers
70 views

Get newsletter subscribers with API from Magento 2

I'm setting up an integration between Magento 2 and Salesforce through the Magento API, all products, customers, orders and carts without problem, but I can't access newsletter subscribers through API....
0 votes
1 answer
150 views

Online refund payment using Invoice Rest API in Magento 2

There are some orders on the website that is done by the Paypal online method. Now I want to a partial refund of an order item using the invoice API. E.g:: /rest/default/V1/invoice/xxxx/refund { &...
0 votes
1 answer
100 views

How to place order using Stripe Payment REST API in Magento 2.4.4?

working on mobile which use magento 2 REST API For Strip Payment. I am using https://marketplace.magento.com/stripe-stripe-payments.html Extension
2 votes
1 answer
382 views

Magento 2 How to return JSON object in rest response

I want to return the JSON response suggested by the mobile app developer. My custom rest API currently returning responses in the below format. [{ "status": true, "data": [ { ...
0 votes
1 answer
471 views

Create a REST API to get the data from the custom table in magento 2

I create a database table 'computergames' . Now the table display in postman by get request
0 votes
0 answers
158 views

Magento2 REST API all fields for attributes

I'm looking to import a bunch of data from a magento2 website via the REST-api. For this, I want to sync the attributes as well. I can successfully grab a list of attributes with this call: # Looking ...
  • 101
0 votes
0 answers
123 views

CustomResponseInterface class does not exist in API

i got error when i call API everytime. [2022-08-29 10:26:45] report.CRITICAL: Report ID: webapi-630c9465cd611; Message: Class \Rental\Totalrevenue\Api\Data\CustomResponseInterface[] does not exist {&...
0 votes
0 answers
48 views

how to get data from date range?

I have created GET API to get all Disable operator data, but if I pass static value it gives me the correct data, but I don't know how to set dynamic date here. in my Collection I got the date value, ...
0 votes
0 answers
138 views

Set Custom Attribute in Customer Register API in Magento2

I have made 2 custom customer [Referral Code, Count] attributes. I have to set their value CASE A:- Customer gets registered without referral code then in event customer_save_before the referral code ...

1
2 3 4 5
22