As of May 31, 2023, we have updated our Code of Conduct.

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
1 answer
55 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 ...
wayx's user avatar
  • 1
1 vote
0 answers
52 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 ...
Martin Thompson's user avatar
1 vote
0 answers
111 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
1 vote
0 answers
154 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
1 vote
4 answers
256 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' ...
Vincenzo Di Deo's user avatar
2 votes
0 answers
78 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 ...
Akhilesh Chourey's user avatar
1 vote
2 answers
207 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 ...
Adex's user avatar
  • 15
1 vote
0 answers
77 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 ...
Fred August's user avatar
0 votes
0 answers
91 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 ...
Muhammad Abdullah's user avatar
0 votes
2 answers
124 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/...
Pradeep Singh's user avatar
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 ...
Rutvik Monpara's user avatar
0 votes
1 answer
559 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: { ...
Alok Kumar's user avatar
0 votes
2 answers
277 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 ...
Adex's user avatar
  • 15
0 votes
1 answer
77 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/...
Brad Kent's user avatar
  • 101
0 votes
1 answer
131 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 ...
slavikusq75's user avatar
0 votes
1 answer
94 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". ...
Jimit Bhavsar's user avatar
0 votes
0 answers
133 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 ...
slavikusq75's user avatar
0 votes
1 answer
418 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 ?
Syed Hassan Zamir's user avatar
0 votes
0 answers
45 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/...
Yasir Minhaj's user avatar
3 votes
1 answer
249 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-...
Arunendra's user avatar
  • 7,356
0 votes
0 answers
26 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", &...
Захар Joe's user avatar
1 vote
1 answer
77 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 ...
Захар Joe's user avatar
1 vote
2 answers
104 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....
David Estevez's user avatar
0 votes
1 answer
285 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 { &...
Manoj Jarial's user avatar
0 votes
1 answer
197 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
kailash mishra's user avatar
2 votes
1 answer
663 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": [ { ...
savita nagdev's user avatar
0 votes
1 answer
934 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
Rubel Parvaz's user avatar
0 votes
0 answers
288 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 ...
S.D.'s user avatar
  • 101
0 votes
0 answers
223 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 {&...
Rushikesh Solanki's user avatar
0 votes
0 answers
104 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, ...
Rushikesh Solanki's user avatar
0 votes
0 answers
246 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 ...
Prerna Gupta's user avatar
0 votes
1 answer
33 views

Color Attribute not fetching in REST API of Magento 2.2.6

How to i get color attribute for the returned json from this end point https://cleopatraweb.com/rest/V1/orders/9495? This the response of the request. I could not find color attribute for products. { ...
Thowzif Abdullah's user avatar
1 vote
1 answer
221 views

How to add product Image to abandoned cart API with search criteria

I want to add an image to the Items in Abandoned cart API response, I can able to add images to the rest/default/V1/carts/mine API, But unable to get in abandoned cart Items, How should I achieve this?...
Smita Kagwade's user avatar
1 vote
0 answers
94 views

Flutter: Card payments via Stripe from a mobile app to Magento 2.4 Rest api

After having searched for asolution but found nothing I am asking here to see if anyone can help. I have been looking at the documentation in Magento 2.4.3 and tried to understand how I make a full ...
James's user avatar
  • 11
2 votes
3 answers
535 views

Access Token Expiration settings have no effect

I tried to change the default customer access token expiration from 1 hour to 48 hours and even to 0 to disable expiration, but regardless of what number I enter, the token I receive from the REST API ...
Pethő Jonatán's user avatar
0 votes
0 answers
116 views

OpenAPI (Swagger) specification for bulk endpoints

We are integrating with a Magento webshop via its REST API. We are generating a client based on the OpenAPI (Swagger) specification (via /rest/schema). Now, we want to use the bulk api. However, these ...
Jeroen Noten's user avatar
0 votes
2 answers
445 views

Maento2 Rest Api for Categories

Is there any API to get all categories detail with images as well? I am using the below API but it won't return image information /rest/default/V1/categories
Syed Hassan Zamir's user avatar
0 votes
2 answers
126 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: <?...
Ralph Rhodes's user avatar
0 votes
0 answers
42 views

Create a Magento store Checkout url via Magento REST API

I have a marketing website and a separate Magento store for ecommerce. Can I use Magento Rest API to: Create a cart on magento store with the specific product Generate a Magento Checkout url? The ...
user1584043's user avatar
0 votes
1 answer
278 views

Magento 2: Login as customer through rest api

I would like to know if its possible to get a customer token or login as a customer through the REST API in Magento 2? I know there is a feature in admin to login as a customer, but the question is if ...
binici's user avatar
  • 138
1 vote
0 answers
222 views

how to magento 2 rest api change date formatted created at field

I have created a new module. app\code\Sale\Paymentext\etc\webapi_rest\di.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
mohit vamja's user avatar
0 votes
0 answers
65 views

How to get API from a website and save it into the database?

I am having issue that i want to call API from the website but i do not know how to save it into my database. Can anybody help me and can give me some suggestions ? I am grateful for your help. Here ...
KAITO_3SS's user avatar
0 votes
1 answer
215 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 ...
aetonsi's user avatar
  • 113
0 votes
0 answers
152 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 ...
aetonsi's user avatar
  • 113
0 votes
0 answers
143 views

Magento2 - How to get payment status from Stripe

I would like to know if there is a any way to get the payment status from Stripe based on Magento order id. I have checked this doc, I got this Search PaymentIntents example to search payment. Once I ...
Suresh Chikani's user avatar
0 votes
0 answers
238 views

Magento2 external api integration

I am currently working on a project which I need to call an external Api which has a bearer token. The Api endpoint comprises product information like SKU and Name which I need to save on Magento. ...
Adex's user avatar
  • 15
0 votes
0 answers
85 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 ...
kato's user avatar
  • 101
0 votes
0 answers
156 views

How to render CMS page builder product list or element through Magento 2 CMS REST API

I want to pass CMS Page Builder Product List or element using CMS REST API to WEB & APP. FYI I am using Backend as Magento & Frontend as React. You can check below CMS REST API response, How ...
Jitendra Patel's user avatar
0 votes
1 answer
72 views

GET Products API call with paging takes increasingly longer with each page number

On behalf of an integration with a client using Magento 2, we are fetching products from their Magento system using the /v1/products GET REST API call for version 2.4.4. They have a large number of ...
zola25's user avatar
  • 51
0 votes
0 answers
120 views

Magento2 Logout Customer using rest API

I am using magento2 core api for logout customer using id but it is not working
Syed Hassan Zamir's user avatar

1
2
3 4 5
37