Questions tagged [rest]

Denotes questions related to the REST API on Magento

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Will using async or bulk endpoints actually improve performance of import processes?

We have a multi-store setup with 16 stores and every store has it's own language, we have a lot of store-specific information. Most of our products are configurable products with lots of variants, so ...
0
votes
0answers
15 views

Magento 2 Shipping to Multiple Addresses using REST API

Has anyone tried creating order with multiple shipping addresses using REST API? I can see the option in the admin dashboard to enable such functionality, but I cannot find any documentation if it is ...
2
votes
2answers
118 views

How do I create an events observer that only calls when the REST API dispatches events?

I just want to call an event observer when the event is dispatched via the REST API. Like if an order is placed from a mobile application, only then the sales_order_save_afterObserver should be called....
0
votes
0answers
19 views

POST an image through Magento 2 REST API - Content-Type

I'm trying to upload an image through the Magento 2 REST API with a cURL based tool: rest/V1/products/:sku/media I'm getting the following error back from the Magento sever: "Server cannot understand ...
0
votes
2answers
16 views

how to get rest URL in Magento2

I need to get a link of this kindhttp://localhost/Magento2/rest I have a code by which I get base_url: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $...
0
votes
1answer
27 views

Magento 2.3 call api rest extern

I created a Magento 2.0 module and it calls an external web service with the command \Zend_XmlRpc_Client. /* REST */ $client = new \Zend_XmlRpc_Client($this->_scopeConfig->getValue('akria_store/...
0
votes
0answers
20 views

Magento 2 How to get list of filter for current category using REST API

How to get a list of filters to show on the category page to allow the customer to filter on products using REST API in Magento 2
0
votes
0answers
13 views

Cannot throw critical exception on retrieve REST in Magento 1

I've created a custom module that returns the content from a XML file from media folder. The XML file contains some product data. The problem is that when the call is made the client has to send the ...
0
votes
0answers
22 views

Magento 2: Set product position in category via REST API

I'm trying to set the position of an existing product inside a category via REST API. Currently all products have a position of 0. The endpoint I'm using is POST /V1​/products. The json body: { "...
0
votes
0answers
22 views

How to upload image by REST api (without base64) magento 1.9

I try to upload an image by rest API in Magento 1.9 version but getting "invalid content-type' error. Can any one help me for the same?
2
votes
0answers
35 views

Where's the order item custom options labels in the REST API?

I'm trying to retrieve orders from the REST API in Magento Enterprise 2.3.1, and that's easy enough with endpoints like /rest/default/V1/orders, but while I can see the values for custom options of ...
0
votes
0answers
47 views

Add custom attributes when creating product via REST API

I am attempting to set custom attributes when creating a new product via the REST API. The products have a required attribute hpUuid. This is part of my JSON file to create the new product: { "...
0
votes
0answers
12 views

Product Alert Notification from API in Magento 2

Hi find this useful features in Magento2: https://docs.magento.com/m2/ce/user_guide/catalog/inventory-product-alerts.html But I can't understand how access it from REST API. Is it possible? ...
0
votes
0answers
17 views

Magento 2 API: 3rd Party makes a post request to magento API with x-www-form-encoded data

I am trying to integrate a payment gateway with my headless magento 2 website. So after the payment is processed/failed, the payment website makes a POST request to my API with x-www-form-encoded ...
0
votes
0answers
31 views

Modual to acceess API required?

I am struggling with getting connected to a Magento site's API and getting permission denied. I have manually created an integration using the Admin GUI and activated it with all permissions, I then ...
0
votes
1answer
70 views

Magento 2 failed connecting to Shipworks

Magento 2.3.1 is failing to connect to Shipworks via REST API. The error it is giving is The remote server returned an error: (401) Unauthorized. When traced with Fiddler the result is {"...
0
votes
2answers
29 views

Magento 2.3 Custom Rest Api get size limit

I have made custom API which returns the categories with the products in them like this: array( key: Category name values:product1,product2,...productX ( where product is an array: array(id,price,...
0
votes
1answer
110 views

Magento2 How to get parent product(configurable) by child product using REST API

How to get parent product(Configurable) by child product(Simple) sku or id using REST API? I can't find in this list: https://devdocs.magento.com/swagger/index_22.html plz help me..
0
votes
0answers
14 views

Are magento 2 extensions required to have rest endpoints?

Do the extensions have to have a REST API or not? For example, webkul seems to be selling their rest api for the multivendor plugin apart. Is there a plugin which auto generates rest endpoints for ...
0
votes
0answers
34 views

Magento2 REST API how to create an invoice and keep order state as open or unpaid?

I am able to use Magento2's REST API to programmatically create an invoice. When I create the invoice, the API also seems to change the associated order to state paid by default. However, my workflow ...
1
vote
1answer
34 views

Magento 2 REST API: Custom API with customer_token expecting string[] instead of string

I made an API which returns wishlist of a user using customer_token as authentication, obtained via this API: rest/V1/integration/customer/token My webapi.xml looks something like: <?...
0
votes
0answers
59 views

Magento 2 REST API: Sort using custom attribute

I have created a custom product attribute best_seller and I want to use it for sorting API response. I am using the following API: V1/products?searchCriteria[filter_groups][0][filters][0][field]=...
2
votes
1answer
66 views

Magento 2 - Get multi-store addresses REST API

I need to fetch the stores addresses using REST API. We already have storeConfigs but this doesn't return the addresses. GET /V1/store/storeConfigs How can we get the address mentioned in the ...
0
votes
1answer
17 views

As capture the token that came through the head and send it to a function that I created myself?

I'm trying to customize the Magento API Engine 2. I would like to know if there is any time of the request, before arriving at webapi.xml to capture the token that came through the head and send it to ...
0
votes
1answer
54 views

Magento 2 OAuth without a Callback URL

I need to integrate a back end application (i.e. without a GUI) with Magento 2 REST APIs. As such I believe I need to use OAuth for authentication. However, as it is a back end service, there will be ...
0
votes
0answers
12 views

Force use of Flat Tables in Rest API

I'm wondering how to force the use of FLAT Tables in Rest API. I have a product API which is using the Magento\Catalog\Model\ResourceModel\Product\CollectionFactory. I've enabled the Flat Tables in ...
0
votes
0answers
20 views

“Unable to save stock item” error when using /v1/products REST call

I'm attempting to use cURL to update the stock for an item - it connects, and the item exists (tried using an invalid sku to test), using the below code. However, it throws an error, and I can't ...
0
votes
0answers
16 views

In Magento 2, using rest api, is there any method that can provide all possible url_keys (in all languages) of a product?

Magento allows a user to select a language of preference. However, by selecting a non-default language of preference, the url_key for all (or few) also products change. I am able to retrieve the ...
1
vote
0answers
18 views

Create customer with default addresses via API

Is it possible to create customer via API and set default billing and shipping address at once ? I know that in customerCustomerRepositoryV1 and customerAccountManagementV1 are fields like ...
1
vote
0answers
30 views

Magento 2: Get child product name in bundle options along with SKU and ID in API Response

I am working on a headless magento approach. On hitting : /V1/products/:sku I get the details of the product as the following response: ... "bundle_product_options": [ { ...
0
votes
0answers
15 views

how to get purchased product in magento 2 with rest api

My question is how to I can get products that have been purchased with rest API in Magento? I try this rest API rest/V1/invoicesByEmail but I can't get any data. Has the API been replaced?
1
vote
1answer
30 views

Escape initial percentage on Product Search Criteria REST API

I'm running the following request to search products by SKU using the Magento 2 REST API: curl -X GET "http://localhost/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=sku&...
1
vote
0answers
44 views

Any examples on how to use requisition_lists API Endpoint?

ORIGINAL POST Trying to use the save requisition list REST API endpoint. The API docs are not very clear on what the values should be and currently don't have access to the B2B module code to see ...
0
votes
0answers
48 views

Magento2 Rest API - How to add dynamic option to cart item during adding product to cart

I am getting issue with checkout_cart_product_add_after event. Actually I have created one method with this event which adding dynamic product option during product add. Below is by code: public ...
2
votes
1answer
53 views

How to call dispatch events specific for Mobile?

How to call dispatch event for REST API's only in mobile devices.
3
votes
1answer
169 views

Magento : REST API integration with paypal payment method

We are using REST API for mobile app from magento 2. We are try to place order using paypal express checkout method. But we get error. Check detail bellow. API call. Call Type : PUT API URL : https:...
1
vote
0answers
29 views

Use different domaine for Admin and Front

How can we use different domaine for the Front and the admin section. If I'm changing the domaine on the base URL of the store config, I'm getting a 404 because there's no admin on this domaine. I've ...
0
votes
0answers
18 views

Magento 2 Data in SSRS Reports

Has anyone been able to query Magento 2 (any entity, but I am specifically using orders) using the XML data source in SSRS Report Builder? I am having difficulty structuring the connection string. If ...
1
vote
0answers
24 views

Magento 2.2 REST API Call to get media, does not return base 64 string

I tried the call /V1/products/:sku/media/ I get this response [{ "id": 31, "media_type": "image", "label": null, "position": 1, "disabled": false, ...
2
votes
1answer
52 views

POST /rest/V1/carts/{cartId}/items isn't working when logged as customer

I'm trying to use all the /carts/{cartId} endpoint list in the magento rest API documentation with the cart ID I've recevied on POST /rest/V1/carts/mine but every time I'm getting a error "message": ...
1
vote
0answers
233 views

How to assign a guest cart to a customer with rest API

How to assign a guest cart to a customer with rest API. I've try PUT /carts/{cartId} when I’m log as a customer to assign a guest cart to the customer https://devdocs.magento.com/redoc/2.3/customer-...
2
votes
1answer
115 views

When to use PUT /carts/{cartId}

When should I use the PUT /carts/{cartId} when I’m log as a customer to assign a guest cart to the customer https://devdocs.magento.com/redoc/2.3/customer-rest-api.html#operation/...
0
votes
1answer
118 views

How to add configurable product In magento 2 using rest api?

I created a configurable product using the below link and Payload 1 Configurable Product Created http://localhost/rest/V1/products { "product": { "sku": "Js-Con", "name": "Js-Con", "...
1
vote
1answer
179 views

How to overwrite customer registration REST API in magento 2.3

Any once please help me out for overwrite the REST api in magento 2.3 please describe with example.
0
votes
0answers
54 views

Magento 2 REST API get order rows

Hi I have an issue with getting data about items in order, my order contain 1 row (one item) but in JSON I have 2 duplicated items with the same SKU but one with product_type=configurable and other ...
0
votes
0answers
26 views

Retrieving newsletter subscriber field from magento 2 API

I have the code below... but it's not giving me the newsletter subscription status. Please assist. $api = "rest/V1/customers/search"; $json = ' { "search_criteria": { "filter_groups": [...
1
vote
1answer
279 views

What is Asynchronous Web APIs in Magento 2.3?

In Magento Open Source 2.3.0 Release Notes Magento introduced Asynchronous web endpoints in Release Notes. Example PUT /async/V1/products/24-MB01 payload { "product": { "price": 29 } } ...
1
vote
0answers
16 views

Issue with wildcard preceding value converting to URL encoding

When using a wildcard at the beginning of a search query, it does not seem to work and instead tries to convert the percentage sign to a url entity when the value is an int. Any ideas on causes/...
1
vote
2answers
134 views

How to update sku code using Rest API in Magento 2?

I want to update sku using Rest API in magento 2 Call: PUT /rest/V1/products/{sku} Request: { "product": { "sku": "modified.sku", "name": "modified name" } } Result: The name has changed, but ...
1
vote
0answers
108 views

Signature invalid while hitting magento 1.9 rest API

I am facing signature error while hitting api {"messages":{"error":[{"code":401,"message":"oauth_problem=signature_invalid"}]}}