We changed our privacy policy. Read more.

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
0answers
8 views

How do you get the revenue with the magento rest api?

I don't know how to get the revenue with the magento API. I read all the swagger documentation from magento. Is there another way to get the revenue? or is it possible with the API.
0
votes
3answers
25 views

How to get GuestCartId using rest API?

I'm trying to fetch the estimated shipping method, but I can't find it. How can I get this element for the API code? Api Url {{Base API URL}}/guest-carts/{{GuestCartId}}/estimate-shipping-methods
0
votes
0answers
9 views

how to make rest api consumption using ajax?

I'm trying to get the checkout sending methods on another page in magento 2, and I saw that it would be possible to do it using magento 2 api consumption. However, magento 2 documentation is very bad, ...
0
votes
0answers
15 views

Magento2: Add Dynamic Custom option on add to cart using rest api

Hope you all are doing good!!! I am not creating any custom option for products but need to add custom options to any simple products while adding to cart with rest api so can you please assist me how ...
0
votes
0answers
11 views

Overriding Coupon Code REST API

I would like to send an extra Header argument in the PUT V1/carts/:cartId/coupons/:couponId that is utilized by the REST API (that handles that PUT request). To do this, I would like to override that ...
0
votes
1answer
14 views

How to create multiple product using magento API

How to create/import multiple products via Magento API. I have created a single product using the following API http://127.0.0.1/magento240/rest/V1/products
0
votes
0answers
21 views

Magento 2 API - Adding media gallery video url to product in doesn't save video attributes

I'm trying to add a video-url to a product using the Api, but it doesn't save the url on the video object or any of the related values like video description, metadata etc., though it saves the image/...
0
votes
0answers
5 views

How to manage customer token lifetime for mobile application [REST API ENDPOINT]

I make Magento mobile application I don't know How to manage customer token lifetime. I create a customer token for customer login, The token has a lifetime of 4hr /rest/default/V1/integration/...
2
votes
0answers
31 views

What is protect code used for?

We're working on a project where we're replacing our existing web store with a custom Magento integration. We need a way for a guest customer to retrieve information about their order by following a ...
1
vote
0answers
7 views

Magento 2: Create Invoice or Shipment with REST API with different date

I want to post a shipment and/or invoice into Magento 2 but put a different date than today's date using the HTTP Rest API. Is this possible and how would I accomplish this? When I include the ...
0
votes
0answers
15 views

Magento 2 : REST API for Social Login(Google and Facebook)

I want to create a customer account using social networks via the API. I have used Mageplaza Social Extension for social login. This example not working for me Magento 2 : Social Login via Rest Api
1
vote
1answer
20 views

Preserve the array keys while sending data in json format to custom api endpoint magento2

I hace created a custom api endpoint to receive data from a third party service. These are my modules files etc/webapi.xml <?xml version="1.0" ?> <routes xmlns:xsi="http://www....
2
votes
1answer
21 views

How to send token for an API request along with custom post data

I have created a custom API endpoint and I have defined ACL for it. My API is working fine without ACL and I am able to post the data through API. But after defining the ACL now I need to receive the ...
0
votes
0answers
4 views

Not able to request integrations record wise through Magento 2 API

I am using Magento version 2.3.3, I am facing the issue while requesting for resources, There are multiple Integrations are created, When I requested for Admin Access Token and then requesting for ...
1
vote
0answers
31 views

Get json response through custom api endpoint

I am creating a custom api endpoint to receive some data in json format. This is my module's code webapi.xml <?xml version="1.0" ?> <routes xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
18 views

Update product's custom_attributes in Magento 2 using Rest API?

I need to update the product custom_attributes. I use the rest API and XML (this is important) in the Postman. But I get an error message (see Attachments). If I try to update only one ...
1
vote
0answers
24 views

Getting an error while trying to create an order using Rest API magento 2

I am trying to create an order using REST API in magento 2. This is the link that I am following for the process https://github.com/acolono/php-magento-api-sandbox I have created the files on my ...
0
votes
0answers
16 views

Can't set configurable product (has_options, required_options) properly when created with API REST on 2.4

I'm trying to create configurable products and related simples programmatically using API REST. The customization is only based on the "Size" attribute. The products are created, the simple ...
0
votes
0answers
13 views

Magento 2 Add/Remove Extra info in API(carts/mine/items/) payload

I'm trying to add product via API call https://testdomain.com/rest/V1/carts/mine/items/ my payload is { "cartItem": { "sku": "444375", "qty": 1, &...
0
votes
0answers
11 views

Triggering RMA Confirmation Notification When Creating Return via API

When creating a return via API, the customer is not receiving notifications like they do when an RMA is created via the user interface. I've tried changing "customer notified" from false to ...
0
votes
1answer
22 views

While overriding customer createaccount() apis iam getting below errors magento2 rest api

I have Overrrided the v1/customers rest api and added in my custom module the method CreateAccount() in my model file and the file is working fine when checking postman But while creating a customer ...
0
votes
1answer
23 views

override customer registration rest api in magento2 and block the domains of a specific emails like @163.com

Can any one help me to override the customer registration api and restrict the @163.com emails while registering magento2 rest api Help me great. Thanks
0
votes
1answer
50 views

Why my module API communication is blocked by my Magento 2.4?

My ERP module connects via API and sends 1k of the product's data when there are changes from my ERP side. In the logs, I just see the message below and my stock hasn't been updated. Web API is unable ...
0
votes
0answers
11 views

All Possible Combinations of a Bundled Product

I have a bundled product with 3 different options: Device Accessory Free Device Each of the options include multiple products. I would like to get the SKUs of all the possible combinations. For ...
0
votes
0answers
16 views

billing address API magento 2.4

I need to send some data from an external API to billing address API as array. how can I do it? I tried lots of ways but no result
0
votes
1answer
63 views

Call to undefined method Magento\Sales\Api\Data\OrderItemExtension

Error: Call to undefined method Magento\Sales\Api\Data\OrderItemExtension::setGuid() di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
0
votes
0answers
14 views

how to get attribute product when order and save to table in database

I have add new custom attribute for product. I want get custom attribute of product when order and save to new column in sales_order_item.
0
votes
0answers
15 views

Updating stock via REST API returns 200 but does not update

I'm attempting to update the stock level of a product via the REST API, PUT /rest/V1/products/{sku}/stockItems/{stockId}. When I send the request, it responds with 200 OK and the ID of the stock item, ...
0
votes
1answer
35 views

Magento API to use to integrate ERP System

An ERP company asks you for recommendations which Magento API to use to integrate a client It is expected that at times large amount of product and category changes will need to be pushed from the ERP ...
0
votes
1answer
28 views

Magento2: Get Category list by using admin Authentication Token?

I want to get Category list by authorization bearer key by helper function. I have created custom api module and created helper Data.php and created function for getting generated bearer key. public ...
1
vote
3answers
117 views

Magento 2.4.2 rest api issue with get current customer details using customer token

I am using latest magento version 2.4.2 I have created customer token using postman eg. https://<magento.host>/rest/V1/integration/customer/token sending in body { "username" : "...
0
votes
0answers
12 views

POST Product Image w/ REST API Exception

I have Magento running in a Bitnami Docker container, and trying to upload an image for a product using the REST API causes an exception. I initially suspected a permissions error, so the following ...
0
votes
0answers
31 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: &...
0
votes
0answers
16 views

How to upload image/file using custom customer attribute with Rest API Magento 2?

I have create one custom customer attribute with file type. I want to upload file using rest API and want to store it to custom media path. How to upload file is with customer registration API?
0
votes
0answers
19 views

Magento 2 - How to upload image and some post data to REST API (POST)

I'm working with a Magento 2 project that need to upload image and post data using a POST endpoint How can I send image with post array data.If post request sample available then share. Thank you very ...
0
votes
2answers
20 views

magento 2 error - "Fatal Error: 'Uncaught Error: Cannot instantiate interface

I have a custom module to expose an API to get the best selling products & most viewed products separately. This module is working fine in my localhost and staging server. When i moved the same ...
0
votes
1answer
39 views

Magento 2: How to get Token via Rest API?

Magento 2: I want to get admin or customer token via Rest API. Early I used: End point POST / rest / <store_code> / V1 / integration / admin(or customer) / token Headings Content-Type / json app ...
0
votes
0answers
69 views

Magento 2 API Data is not being accessible on Knockout JS

I'm struggling with a knockout js component. Here is what I'm trying to do: 1- Get data from an external API 2- Load that data on my JS Component So basically what is happening is that when I create a ...
0
votes
0answers
18 views

How to get all orders by custom column in sales_order table using API

I'm using a module allows user to select delivery date and time slot while placing the order. Module that I use creates additional columns in table sales_orders For some business needs I would like to ...
0
votes
0answers
15 views

Can I use a PUT request when required fields aren't filled in?

I'm trying to run about 10,000 put requests to update pricing via the API. A lot of the products have fields that are required, but aren't filled in. Everything works when I update the pricing with a ...
0
votes
1answer
160 views

Magento 2: How to get Admin Token via Rest API in Postman?

Magento 2: I want to get admin token via Rest API. Early I used: End point POST / rest / <store_code> / V1 / integration / admin / token Headings Content-Type / json app Payload { "...
0
votes
1answer
14 views

How to add only one product using Magento 2 REST API?

I am using REST API for Magento 2. I want to add 1 product only in Cart using REST API. Like if cart is empty one product is added is cart and if one product is in cart then remove that existing ...
0
votes
1answer
24 views

magento 1.9, "Resource 'custom_restapi' not found"

i am trying to create a custom REST API i use this guide https://inchoo.net/magento/configure-magento-rest-and-oauth-settings/ api2.xml file <?xml version="1.0"?> <config> &...
0
votes
0answers
47 views

How to implement Custom online shipping method with shipping API?

I have created one shipping module.I need to integrate flash express API's in that. How to integrate the APIs?
0
votes
1answer
51 views

Magento 2 REST API bulk update product attributes

I am trying to update an attribute for about a thousand products using REST API. I'm using async/bulk/V1/products/bySku. It works perfectly, but it takes forever as it saves one product at a time. ...
0
votes
0answers
30 views

My swagger is broken - FAILED TO LOAD API DEFINITION

I'm sure It’s likely improper comments on some interface files on custom modules. But my question is ... is there an easy way to search (grep) on the server or other command line type ways to find ...
0
votes
1answer
23 views

Magento 2 RestAPI shows wrong stockid

I ran the Magento Rest API to get the stock id for a particular product but it's showing me the wrong stock id. We have three websites and each website has a separate stock, but when we call Magento ...
0
votes
1answer
22 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", ...
0
votes
0answers
15 views

Magento 2 - how to update attribute values with rest api (curl)

$ch = curl_init("92.19.109.89/index.php/rest/V1/products/".$productId); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($...
0
votes
2answers
112 views

Magento 2 - How to get product attribute in order API

I added two new product attributes to a product called netsuite_internal_id & ava_tax_code if I do a GET to /rest/V1/products/{sku}, I can see them in custom_attributes.attribute_code. When a ...

1
2 3 4 5
21