Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rest]

Denotes questions related to the REST API on Magento

0
votes
1answer
15 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
8 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
14 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
9 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 non-default language of preference, the url_key for all (or few) also products change. I am able to retrieve the base ...
1
vote
0answers
11 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
16 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
11 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
28 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
17 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
20 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
0answers
39 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
52 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
28 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
15 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
22 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
28 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": ...
0
votes
0answers
66 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
109 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
83 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
58 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
34 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
20 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
92 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
15 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
56 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
64 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"}]}}
1
vote
0answers
85 views

Custom REST API for fetch all product with stock information

I am creating custom rest API for getting all products including out of stock products too but I am not able to get out of stock products. /** * Get products with filter. * * @param string $...
1
vote
0answers
48 views

Magento 2 calling External API

How do I call an External API in Magento 2? And what file/folder do I do it in?
4
votes
0answers
156 views

Magento 2.3 V1/Search with sortOrders not working in REST API

Magento 2.3 Search Criteria with REST API, SortOrders not working in V1/Search API. I am trying to fetch Category products using Magento REST API by below request URL. http://127.0.0.1/magento230ee/...
0
votes
0answers
22 views

Results missing from search via REST API when fields are missing

The short of it - I'm performing a search on multiple fields (two normal fields and 10 custom_attributes fields. If a product is missing any one of those custom_attributes fields it is omitted from ...
1
vote
0answers
22 views

Read Only Integration Token

I'm looking to setup an integration token for the REST API. I understand the process for this, as well as the ability to specify the tokens access to different resources such as products or customers. ...
1
vote
2answers
24 views

Custom Customer Attribute not being read from Request

I'm trying to add a new Custom attribute to the Magento customer model, and I think that I've set everything up correctly from what I've been able to scour off of this website & google, but I'm ...
0
votes
0answers
102 views

Magento 2 : Rest Api for get customer id with token number

I need customer id and token number when login customer account in Magento2 I used this API for customer login: Method: Post rest/V1/integration/customer/token Body { "username" : "abc@gmail.com"...
0
votes
0answers
50 views

Magento2: How to stop sending customer welcome email when order created using magento rest api?

Actually i'm creating orders using magento2 rest v1 api http://example.com/index.php/rest/V1/orders/create and order successfully created by calling api. But when customer order created then there ...
0
votes
0answers
23 views

How to get admin details like first name, last name,email using Rest API in Magento 2

How to get admin details like first name, last name,email using Rest API in Magento 2. Any options to add custom attribute like GST No, company name, contact number, Bank details
0
votes
1answer
126 views

How to increase/decrease items quantity of product in cart using REST API in magento 2?

How to increase/decrease items quantity of product in cart using REST API in magento 2
0
votes
1answer
72 views

Magento 2.2 REST API get categorie in product list

When I do GET /rest/V1/products/prodID, in response (custom_attributes field) I have { "attribute_code": "category_ids", "value": [ "2", "3", "20" ] } but ...
0
votes
1answer
58 views

rest api invoice capture does not save entry to transaction log

Magento faithfully logs the transaction detail when I manually capture an invoice within the Magento store interface. I assume that Magento would likewise generate the same transaction detail entry ...
0
votes
1answer
55 views

Handling REST API exceptions

I have an extension that has some code to save a custom object via REST API service. I have a try and catch (\Exception $e) around the save method, but for some reason I get the following message: {...
0
votes
0answers
81 views

Magento 2.2 REST API Not working on index.php

Unfortunately I don't know a ton about REST API and am trying to get this to work properly for another developer. Long story short, their application is trying to access the site using mysite/index....
2
votes
1answer
202 views

Magento 2 GET API request to external api

In magento 1 you can make get request like this: First Authorizing object- public function authorize($url) { $cookie = $this->getCookieDir(); $user = $this->getApiUser(); $curl = ...
0
votes
1answer
50 views

How to get orders shipping method full name via REST API?

The order object from V1/orders/{$id} only contains the shipping methods short name, not the full (e.g. localized) name. When using an extension like matrixrate, the shipping method only contains ...
0
votes
2answers
26 views

What is the easiest way to run a magento instance locally to test my requests with the rest API?

I need to write working requests but I cant test them on our live systems. My idea was to run a local instance of Magento and test my requests there. Is that a good idea? What is the easiest way to do ...
0
votes
0answers
19 views

Magento 1 How to create Api for get products and place orders from mobile?

I want to show all the products on mobile application with Api, also want to place order from mobile for my store. How can i achieve this? I heard about Magento Rest Api, will it be easily used with ...
0
votes
1answer
42 views

Magento 2: Does a user created cart interfere with a REST created cart or continue?

The question I have, If a customer has created a cart via a website. And then for customer service reasons, the customer calls in a want to place an order, By using the API's (let's say Salesforce or ...
0
votes
1answer
40 views

How to get the Admin code of an option from an attribute? REST API

I have a problem, and I want you to give me a light at the end of the tunnel. I am doing an integration REST and need to get some information from the options of an attribute, in the admin panel I ...
5
votes
1answer
91 views

Do I need to add shipping address every time whenever I place a new order in Magento 2 REST API?

STEP 1 - Using REST API I created a customer,And in address data I passed default shipping and billing true "defaultShipping": true, "defaultBilling": true, STEP 2 - In GET customer detail API ...
1
vote
1answer
215 views

Magento 2 REST API ship order tracks error

I can create a shipment for an order via REST API. But when i try to add tracks i get the error: Carrier Code can not be empty. This is my code: Array ( [items] => Array ( ) [...
1
vote
0answers
385 views

Magento 2 Rest API get all products with certain attribute_set_id

I need to elaborate de URL that will bring all products with certain attribute_set_id through Magento 2 Rest api, and then change though the api the attribute_set_id of all those items. My problem ...
2
votes
1answer
46 views

Magento 2 Curl Rest Endpoints

I'm trying to access the REST Endpoints: POST /V1/products/special-price POST /V1/products/special-price-information POST /V1/products/special-price-delete I want to achieve this through PHP code ...