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
1k views

Rest Api service for shipping information Post -

V1/carts/mine/shipping-information for this service which parameter are required.. I had given below parameters { "addressInformation": { "shippingAddress": { "id": 0, "region": "...
4
votes
1answer
953 views

Add multiple products to cart using Magento2 REST API using custom method

Add multiple products to cart using Magento2 REST API using custom method Their is no default magento api this is single product add to cart json code in rest api body section. { "cartItem": { ...
0
votes
1answer
15 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
587 views

Carts in Magento2 REST API and Front-end

I was able to sign in using /rest/V1/integration/customer/token and add items to cart. How do I view the cart(items I added using REST API) from front-end?
0
votes
1answer
17 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 ...
2
votes
1answer
1k views

Coupon Code API Params

We just want to know what would be the json params to create coupon code from magento2 rest API. The API we are using to generate the coupon code is /rest/V1/coupons
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
16 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
11 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
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 ...
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
3answers
7k views

Magento 2: Update order status using rest API

Guys I want to update order status using API. I am using this api to change the order status but it's not working: http://dev-jawed.com/index.php/rest/V1/orders { "status" : "Out-for-delivery", "...
0
votes
2answers
3k views

How to add media gallery entries via REST API - Magento 2

I stored image in pub/media/catalog/product. How to add that images into media gallery entries. I have tried like http://myhost/rest/V1/products "media_gallery_entries"=> array( array( ...
0
votes
2answers
2k views

Need Help To Connect Magento Rest Api using curl

I would like to use cURL to get all orders using rest API. Can I use cURL instead of Oath. I tried with cURL but returns 403 Forbidden. I have tried with below code : $params = array( "...
5
votes
3answers
5k views

How to add a new address (shipping or billing or another) via Magento 2 REST API?

There are API's available to fetch and delete address of a customer but not create a new one. GET /V1/customers/addresses/:addressId GET /V1/customers/me/billingAddress GET /V1/customers/:...
1
vote
1answer
315 views

Sort Products REST API : Magento 2

I did a sort for product by price through API: http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=...
4
votes
1answer
1k views

Magento 2 REST api for guest cart - display product in Magento's checkout

I have an Ember app that handles adding to basket via the REST API. I then want to jump back into Magento's front end for the checkout process, however the cart is empty. Is there a way to pass a ...
2
votes
1answer
569 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/...
0
votes
0answers
22 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
354 views

Magento 2 : Modify Name of Product Category With API Rest

How to change name of product category with API Rest? The URL is http://localhost:8082/magento/index.php/rest/V1/categories/26 and JSON is { "category": { "id": 35, "parent_id": 34, ...
1
vote
1answer
329 views

Configurable Product is returning Price Zero magento 2.x rest Api

Why Price is zero in response. I am hitting Url: https://example.com/index.php/rest/V1/products/sku Response: { "id": 176, "sku": "8544501", "name": "BATA-8544501", "...
0
votes
1answer
2k views

Magento 1.9 REST API Callback

so I just set up my M1.9 store, and want to set up a REST API. I wanted to test it out by retrieving a list of products. I only don't know what to put in the callbackurl field, online they say the ...
3
votes
1answer
53 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:...
2
votes
1answer
43 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
2k views

Magento 2 call external REST api

I am trying to call external api from Magento. Below is the request, $client = $this->_httpClientFactory->create(); $client->setUri('thirdpartyurl.com/api/'); $client->setMethod(\...
5
votes
2answers
2k views

Magento rest API configurable product and category list

I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution. ** First: ** I want to show list of ...
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 ...
2
votes
3answers
5k views

How do I create a shipment via REST API?

I'm trying to create a shipment via the REST API. I'm able to edit existing shipments via /rest/V1/shipment, but I can't seem to figure out how to add one. I consistently get a "Could not save ...
3
votes
0answers
245 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 ...
5
votes
3answers
1k views

How to Get Customer data by telephone number in Magento2?

I have a telephone number which is given in Default address..by using this telephone number i need to get Customer Full data.Data like customer id, customer full name..etc
2
votes
2answers
762 views

Magento 2 - Set Tracking Info for Order via REST API without specifying items?

Is it possible to add in shipping and tracking information for an order using the Magento 2 REST API without putting in the item information. We always ship the entire order and based on our warehouse ...
1
vote
2answers
1k 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
1answer
5k views

Consumer is not authorized to access %resources REST API

I use MAGENTO 2 REST API in MobileFIrst project (Worcklight) in my adapter : function _retrieve(token) { if (!token) return { 'isSuccessful': false, 'errorMsg' : 'params is ' + params}; ...
0
votes
1answer
275 views

Magento2 soap/rest api for third-party consumer

I'm trying to create a webservice client for Magento2 api. I would like to know whether Magento2 supports oauth2 or oauth1.0. Could someone clarify if Magento2 SOAP API also requires oauth process?
0
votes
1answer
740 views

Magento 1.9 Order Rest API Order Data

Using magento rest API i can see the data of product, category etc using https://magentohost/api/rest/products, Here is can see list of products but when i access https://magentohost/api/rest/orders ...
3
votes
3answers
4k views

Rest API 403 Access Denied

I testing the REST API with the Fire Fox Rest API Client. But I am getting 403 Access Denined. I have checked with all the permissions as mentioned in the other answers but could not get through. I am ...
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 ...
2
votes
2answers
1k views

Magento 2 Rest Api V1/products missing extension attributes

I am calling the Rest API V1/products to get the product list from Magento 2 store Request: http://{myMagentohost}/Magento/index.php/rest/V1/products?searchCriteria[currentPage]=1&...
4
votes
1answer
3k views

Display Out of Stock Configuration not working

I have a configurable product with 3 simple products associated to it that were added via REST. I have set the "Display Out of Stock Products" option in System->Configuration->Inventory to "Yes" ...
1
vote
0answers
23 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, ...
4
votes
3answers
1k views

Magento 2 REST API PayPal Payment method

I am using REST API to create orders. I would like to know which is the right API call and payload if paypal express checkout is the payment method to process payment and generate invoice.
2
votes
1answer
1k views

Rest API Acess denied 403 for customers and orders

I am trying to get the products,customers and orders through REST Api. It's working forapi/rest/products getting product collection. But unable fetch the customers api/rest/customers and orders api/...
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
77 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/...
1
vote
1answer
1k views

How to create and use REST API for mobile app?

Am totally new to the magento and API's. I have gone through the Magento Rest Api Documentation. I have created roles and users for rest api but in the documentation it is like http://magentohost/...
3
votes
1answer
624 views

Get Countries and related Cities REST API

I have a form in my mobile app for shipping information. I am looking for REST API to get countries and its related cities. I found only an API: V1/directory/countries How can I get cities for ...