Stack Exchange Network

Stack Exchange network consists of 174 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

3
votes
0answers
46 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
13 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
15 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
20 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
19 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
28 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
14 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
30 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
26 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
16 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
23 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
37 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
44 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
22 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
24 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
16 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
23 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
0answers
17 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
69 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
60 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
45 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
31 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
121 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
64 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
41 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
130 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": "...
0
votes
1answer
187 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
321 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
51 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
36 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
29 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
76 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 ...
4
votes
1answer
133 views

Create a multi-language REST API's in Magento 2

I have multi-language store in Magento v 2.2.5 English French Now,I have created multiple REST API's, like Custom Home Page REST API's GET Products, Categories Add to cart Checkout Place an Order (...
0
votes
0answers
23 views

API catalogProductAttributeOptionManagementV1 return different result than doc

When I'm using catalogProductAttributeOptionManagementV1 API (get All options of attributes), with the URL https://local.dev/rest/V1/products/attributes/color/options, I get this result : [ { ...
2
votes
1answer
176 views

Magento 2 Api/Data, When To Create It?

I have fairly simple REST API request to get guest country code by his ip. In my block file this works perfectly fine when using curl: $url = "http://........./".$guestIp."?access_key=".$...
0
votes
2answers
72 views

Magento2 Shipping Methods rest api

Is There any possibility to fetch all shipping methods using rest api in magento2 Thanks
0
votes
1answer
250 views

Create REST API with post params

I have below JSON Data for rest API {"region_id":"475","city":"city","item":[{"qty":"1","weight":"","price":"10.0000","sku":"test"}]} and i wann to create api class I do like this /** * @api * @...
1
vote
1answer
473 views

View all REST API routes of my Magento 2

I am looking for the url which will show all the available API REST routes. I have seen it before, which outputted some json. I just can't recall the url nor can't I find the right information. Anyone ...
2
votes
2answers
256 views

Consumer is not authorized to access %resources Magento_Sales::sales

I have this basic API script: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); $usr = [ 'username' => 'username', '...
1
vote
2answers
142 views

How to edit cart item in Mageto 2 REST API?

How to edit cart item in Magento 2 REST API ? I am adding product in cart using below API. http://magento.host/index.php/rest/default/V1/carts/mine/items method : POST Authorization Bearer <...
1
vote
0answers
73 views

Magento 2 - How to add custom order item field on order export API

I added a new field on table sales_order_item. I need to display it on REST API order export, in the "items" node. Is it possible to do that ?
1
vote
0answers
46 views

Magento 2 API - crud for all tables

Is it possible to create a new REST API to update or create data in all magento tables from a xml added in POST : <data> <row table="Nom_Table_1" key="Nom_Champ_Key_1"> <...
4
votes
2answers
191 views

Get customer details by using Authentication Token

I use this Magento 2 rest api to get customer token: curl -X POST "https://my.project/rest/V1/integration/customer/token" \ -H "Content-Type:application/json" \ -d "{"username":"me@awesome....
3
votes
1answer
82 views

Magento 2 for logged In customer need to add shipping address every time i place a new order?

This is what i am following... 1. Add Configurable product in cart. http://magento-host/index.php/rest/default/V1/carts/mine/items method : POST Authorization : Bearer <customer token> body ...
2
votes
1answer
50 views

Export custom option via REST interface

We have created a product with a custom option (free text field). The customer enters data, now this data should be exported via curl -X GET --header "Accept: application/xml" --header "Authorization:...
1
vote
2answers
205 views

Fetch all specific customer's order using Customer token in magento 2 REST API?

I am aware about method using admin token Request type :: GET URL http://<host>/rest/V1/orders ?searchCriteria[filterGroups][][filters][][field]=customer_email &searchCriteria[...
5
votes
1answer
254 views

How to capture the User ID using magento's customer Token?

How do I make a call to that URL that captures the User ID, using Magento customer Token in magento 2 rest API? How Magento 2 makes calls in-between for the APIs ?
6
votes
1answer
105 views

What are the use of ExtensionAttribute JoinProcessorInterface and CollectionProcessorInterface at magento 2.2.3

I built Magento 2 Module which has a model and Service contracts/API. During this implementation, I have followed vinai Kopp article and also magento2 module Magento_Quote. On this Magento\Quote\...
3
votes
2answers
339 views

Magento2 REST API - Cannot create cart/quote for customer

I am building a shoppingcart using the Magento2 Rest API and I want to create a cart for a customer and (if not logged in) for a guest. For guest carts is it working: Create a guestcart: POST ...
0
votes
0answers
9 views

Export Integration Settings

I have an external service that needs to be able to access the rest api of the Magento installation. I have added a new integration and generated the needed consumer and access tokens. The extension ...