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

2
votes
0answers
29 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
34 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
26 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
14 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
20 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
17 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
19 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
75 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
55 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
31 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
23 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
14 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
51 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
14 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
38 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
43 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
48 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
33 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
119 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
18 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
22 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
80 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
40 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
20 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
96 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
52 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
37 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
37 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
66 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
149 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
43 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
25 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
18 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
29 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
37 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
82 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
148 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
266 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
43 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 ...
4
votes
1answer
198 views

Get tax class ID by tax rate with REST API

I'm trying to get a tax class ID with only the tax rate value, all with the API. I found that I need a first request that returns me the tax rate ID : /rest/all/V1/taxRates/search?searchCriteria[...
1
vote
1answer
95 views

How to specific pass fields in custom rest api for get product Information

I'm creating custom rest API for getting a list of products. In my module, I have just use the getList function of ProductRepository. I need to pass select specific fields in API. so, how can I get ...
1
vote
2answers
119 views

How to setup a rest api for adminhtml only?

Magento 2 version 2.1.10. Admin base url : /admin Site base url : / How can I create a rest api and make it available only under the admin base url, like /admin/testapi ? Furthermore, some day I ...
2
votes
0answers
189 views

Magento 2 REST API, get attribute values instead of ids

When I make a REST call to get product data, any multi-select attribute (in custom_attributes) is return with a numeric id rather than its text value, ie: 24 => {#2105 +"attribute_code": "...
1
vote
1answer
452 views

Request doesn't match any route

I'm building rest API to get a product using its sku, but it give me this message "Request doesn't match any route" although the url in webapi.xml file is the same in the request. magento version is 2....
0
votes
2answers
516 views

HTTP 401 Basic Authorization error accessing Magento 2 Rest API

I am trying to use the Magento 2 Rest API, using token authorization. I can successfully POST user/password to /rest/V1/integration/admin/token/, and I get a token returned. But when I try to GET ...
1
vote
1answer
99 views

How to get all oAuth2.0 details for POSTMAN REST API?

How can i get oAuth 2.0 details for magento 1.9.2.3,
0
votes
0answers
42 views

How to get category name in product rest api in M2

I am trying to call rest api with website/rest/V1/products/78 and getting product data. In category field am getting category_id how can I modify this to get category name instead of id. Looking for ...
1
vote
0answers
39 views

Auto Add Product Attribute Options when Creating a new Product by Rest API

Is there a way to tell Magento 2 to: Send custom_attribute Label instead of Value; Auto create option in case the Label doesn't exist yet. I was able to do it with Magento 1 API, but I can't find a ...
2
votes
1answer
115 views

0 item price in cart when add to cart after place order

I'm building Mobile Magento 2 application with REST API. I'm using the following endpoint to add an item to cart /V1/carts/mine/items Then I'm placing an order with /V1/carts/mine/order After ...