Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
3 answers
8k views

where to find Magento 2 API docs?

Finally I found out the magento 2 api endpoint for all products as below rest/V1/products?searchCriteria[pageSize]=20 but I need more detailed docs about api endpoints which I coudn't find out yet. ...
2 votes
3 answers
2k views

400 bad request from rest/default/V1/carts/mine/estimate-shipping-methods

Whenever I go to cart page or checkout page after adding products, console always throws 400 Bad Request. I tried reinstalling Magento and did many things but there is no luck. Estimate shipping ...
0 votes
1 answer
2k views

Magento 2: How to run CLI command on admin store (storeId:0)?

I have a multi-store setup with Magento 2.1.7 CE on the domain a, domain b, domain c. I want to apply images to some products programmatically. When I make an API call on any domain with the "all" ...
1 vote
2 answers
4k views

Rest API import product Magento2

I want to add a product using REST API but don't know how should I do. could you please help me what should I do? Magento 2.1 I use. this is the code that i used: { "id": 989898989989989898, "...
0 votes
1 answer
2k views

Magento 2 - Custom REST api POST method not working

I have created a custom rest api module. When i am using GET method it's working fine. But when i am trying to use POST method it giving below error Request does not match any route. Does anyone ...
1 vote
1 answer
2k views

Injecting Guzzle with Parameters Magento 2

Writing some REST API bits and going to use Guzzle, which I have used many times before. The issue I am coming across is, I know Guzzle has to take the configuration via parameters when constructing ...
2 votes
1 answer
2k views

Getting Products by category id! Magento 2.1 REST

How can I get products of a specific category? For Example If I hit https://www.example.com/index.php/rest/V1/categories/[category_id]/products it should return all products of the same Category [...
7 votes
1 answer
4k views

How do I consume the REST API in Magento 2, using AJAX with session-based authentication?

I am having issues successfully making an AJAX call to Magento 2 REST API endpoints, using session-based authentication. When I run the following javascript, I always receive a 401 (Not Authorized) ...
2 votes
1 answer
1k views

How to create partial invoice using rest API in Magento-2.1?

I have one order, this order is having 3 items. I want to create different invoices of different items using Rest API. It is possible using the admin panel in Magento-2.1, but not using rest API. How ...
0 votes
1 answer
1k views

When creating an order via the Magento2 Rest V1 API, can I disable customer emails?

I'm working through integration of orders from external sources into our Magento store. We sell directly through our Magento instance as well as through some other carts (cartLoom). When an order is ...
0 votes
1 answer
3k views

How to get qty of a product using rest api

I want to get product info including the product qty how can i achieve it. Currently i am using rest/default/V1/products?searchCriteria To get all the product but it is missing qty attribute in it....
2 votes
2 answers
3k views

Magento 2 Rest API - how do I add values to dropdown product attribute

I have problems in adding values to an existing product attribute, using the API POST /products/attributes/:attribute_id/options. The corresponding GET API is working fine, as explained below. I have ...
1 vote
2 answers
5k views

How to create custom API for company and customer creation in Magento 2

I want to create a company/company admin-user in Magento 2 (as what it does from the front-end/back-end panel) via a single API call. Right now am doing with two API calls First is creating a ...
3 votes
3 answers
2k views

Magento 2 swagger-ui error

I trying this url http://192.168.1.67/isac/swagger but I got this error below 500 : {"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-5bfe5e3ac4100"} http:...
2 votes
2 answers
3k views

Magento 2 : how to change order status processing to complete using Rest Api

Any option to update order status processing to complete in Magento 2 using Rest API.
0 votes
3 answers
1k views

You did not sign in correctly or your account is temporarily disabled. In Magento 2 Admin panel Token

I am getting this error "You did not sign in correctly or your account is temporarily disabled" during generating admin token in magento 2.1.12. But admin panel is login with same username and ...
0 votes
1 answer
1k views

Order creation not working through rest api in Magento 2.1

I am using Magento 2.1.6 CE and also am using default rest api's for create mobile app. In that I follow below steps to create an order, But order is not created. Step 1:- Create an empty cart for ...
1 vote
2 answers
1k views

Magento 2 Rest Api call curl SSL Error

I have setup a custom Magento Rest Api at the endpoint: "https://domain-name.de/rest/V1/wawi". This Api just returns a simple json string. Have tested my Api with Postman application -> works fine. ...
3 votes
2 answers
4k views

Magento 2 Rest Api get Products List including qty field

I am trying to make an api call to get a list of products. I am using searchCriteria to filter the products collection. The following information of the product is needed: -sku, name, id, price, ...
0 votes
1 answer
704 views

Access token expires after 1 day

I am using the Quickbooks API for my application and I have used https://intuit.github.io/QuickBooks-V3-PHP-SDK/authorization.html generate-oauth-2-0-tokens for token generation. The token is created ...
5 votes
1 answer
989 views

Magento2 REST auth help needed

I'm hanging on this issues for nearly a week and cannot find any sollution. I'm trying to send a REST request to my new Magento2 store. It worked allready, but then the oauth/token forced ...
1 vote
1 answer
2k views

Overwrite magento 2 default customer rest api

I use magento 2 rest /V1/customers/me it get response like this { "id": 2, "group_id": 1, "default_billing": "2", "default_shipping": "2", "created_at": "2018-03-30 07:53:13", ...
4 votes
2 answers
8k views

Rest api to get product by sku with custom attribute option value in Magento 2.1

I am using Magento 2.1.6 CE and also am using default rest api's for create mobile app. When I get product by sku I get all the details of the particular product including custom attributes also. ...
2 votes
4 answers
10k views

Magento 2 REST API returns only default category and its children

I am using "rest/V1/categories/" (Magento 2 Rest API). In documentation(devdocs.magento.com/swagger/#) it says "Retrieve list of categories" but it only returns default category(and its all children) ...
3 votes
1 answer
223 views

invalid date when adding product with custom options(datetime) using REST API

I have a product with a custom option DateTime filed in product options When I try to place an order using rest API. My order array is given below $order = array ( 'cartItem' => array ( ...
2 votes
3 answers
3k views

magento 2 rest api accessing products based on store code giving same products

I'm using below url to access products which are specific to store http://<magento_host>/rest/<store_code>/V1/products/product_name but in output, i can see all other products as well. ...
0 votes
1 answer
942 views

pulling order IDs via REST API in magento 2.0

we are seeing a big dependency between the order ID that we are getting from Magento via REST and the order ID that we see in the order confirmation email. for example REST returns 45, the email has ...
1 vote
1 answer
479 views

Magento2 customer register event for rest call

I am sending sms on customer registration using customer_register_success, fired in app/code/Magento/Customer/Controller/Account/CreatePost.php But as this is from controller, and not fired when ...
1 vote
1 answer
698 views

Magento 2 Customer Rest Api Token error for some users [weird problem]

We have a mobile app for magento 2 which we communicate with magento 2 server using Rest api. Our intent is to get customer access token by below request https://magento.host/index.php/rest/V1/...
2 votes
2 answers
6k views

401 Unauthorized for accessing customer api

I was able to get the admin token using the below url against the created admin user http://username:[email protected]/index.php/rest/V1/integration/admin/token The username and password is for ...
2 votes
1 answer
864 views

Magento 2.1 : How can I save a shipping address using the REST V1 API

I'm trying to save just the shipping address using the REST V1 API of Magento 2. I know there is an endpoint to save the billing-address, but there seems to be lack of a way to save the shipping ...
1 vote
1 answer
1k views

How to filter Multiselect in Magento 2 search Rest API?

I am using magento search rest api. Now i can filter attributes like neck, sleeve, etc.., but i need to give multiple values for same attribute (like mulitple select) My Request: rest/V1/search?...
6 votes
2 answers
14k views

How can I generate a full swagger doc for Magento 2 REST API?

I have a fresh Magento 2.1.5 install, and I'd like to access the full swagger spec, like the one published on http://devdocs.magento.com/swagger, but with the Try it Out! buttons enabled. I've ...
2 votes
1 answer
742 views

"message": "Property \"Slots\" does not have corresponding setter in class \"Magento\\Quote\\Api\\Data\\CartItemInterface\"."

am using Webkul_BookingSystem extension for booking slot in magento2.1.7. The issue what I got here: While I add the product details in to cart through Rest API the Slot class showing does not have ...
2 votes
3 answers
289 views

could not found detail of the product using REST API

I tried to get all the product using REST API,i used this url "http://localhost/magento2.1/rest/V1/products/?searchCriteria[pageSize]=100&searchCriteria[currentPage]=1" Output of this url: "...
2 votes
1 answer
857 views

Review Api for magento 2.1.12

I have successfully install this module Reviews/Rating I call this url="/V1/review/mine/post" method="POST".I don't know what data is passed in body of this URL.
0 votes
2 answers
3k views

Unable to access rest api : http://localhost/magento2/index.php/rest/V1/products

I am new to Magento. Please help me understand how to fetch the products. I believe there are some changes to be made in .htaccess file present in the root folder for this url: http://localhost/...
6 votes
0 answers
1k views

Magento 2 Rest API get Quote Item Custom Option values

Hi I have tried with the magento 2 rest apis 1) V1/orders/:order-id 2) V1/orders/items with serach filter order id 3) /V1/carts/:quoteid/items The above apis are not returning the Order item ...
3 votes
2 answers
3k views

How can I get the HEX code in Visual Swatch via Rest API

Could anyone help me to find the rest api to get hex or image of visual swatch attribute? I need the api to return the following, Label Value HEX or Image of the swatch. Thanks
0 votes
0 answers
692 views

Magento 2 Rest API return multiple interface class

On the Magento 2, I want to custom return object on my custom rest API, I have code like this on the Hz\Clients\Api\TransactionInterface.php <?php namespace Hz\Clients\Api; interface ...
2 votes
0 answers
205 views

Magento2 Mobile SSO - OAuth-based authentication

I have been asked by a mobile dev to provide Magento 2 API to create a single sign-on application for my store. I have provided this info: • curl -X POST "https://example.com/rest/V1/integration/...
5 votes
5 answers
8k views

magento 2 rest api : get cart items with images

In rest api, I am using "/rest/V1/guest-carts/e3e1fd447e0e315dd761942cf949ce5d/items" method to get the magento cart items. It works well and the result is [ { "item_id": 100, "sku":...
0 votes
1 answer
218 views

How to change Order-Status with custom-order-status(Ready To Dispatch) using rest API in magento 2.1?

I have one custom order status(Ready To Dispatch).I want to change order-status of order using rest api.Please help me i don't know what api is used?
1 vote
1 answer
964 views

Why Order Api is too slow in Magento-2.1?

When I show order history using this API /rest/V1/orders/mine?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value]=abc@gmail....
0 votes
1 answer
388 views

I want to some attributes in response of /V1/products/:sku api.How can be get specific data in this api?

When I call /V1/products/:sku,It give response like: { "id": 12, "sku": "SL-LS", "name": "Long Sleeve", "attribute_set_id": 4, "price": 0, "status":...
1 vote
0 answers
482 views

REST API - Add same item with different custom options to cart in Magento 2.1

I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the ...
2 votes
1 answer
3k views

Magento 2 - Really need help "Server can´t understand Content-Type HTTP header..."

I´m a newbie with Magento 2 and the REST API so I need a little help with this code because I tried many things and the result is always the same. $adminUrl='http://mylink.com/index.php/rest/V1/...
2 votes
0 answers
231 views

Get and Add like(Favourite or Unfavourite) product in Magento 2 Rest API With URL?

Get Favourite product in Magento 2 REST API with URL? And Add to Favourite in Magento 2 REST API with URL?
4 votes
0 answers
589 views

How can I remove a custom attribute from a product via REST?

I can add or change a custom attribute of a product, i.e. via curl -X PUT --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer MYTOKEN" -d ...
1 vote
2 answers
57 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 ...