Questions tagged [rest]

Denotes questions related to the REST API on Magento

17
votes
0answers
3k views

Not able to get OAuth token for Magento Rest API Client

I am using Magento version 1.9.1.0 and server running on my mac and trying to use Magento Rest APIs using OAuth Integration. I have a consumer key and consumer secret. Now, I want to get OAuth token ...
8
votes
0answers
541 views

Magento 2: Creating configurable product using the REST API

In order to create configurable product I need to create configurable product, virtual product and finally connect them. Example of json request got from here: How do I create a configurable product ...
5
votes
0answers
1k views

Magento2 How to get Custom order attributes value in response in rest api v1

down vote favorite I have installed Amasty order attributes extension I followed http://magehit.com/blog/how-to-get-value-of-custom-attribute-on-magento-2-rest-api/ and created app/code/Amasty/...
5
votes
0answers
5k views

Confirm email after Customer signup magento 2

I am developing a e-commerce mobile application using magento 2 REST apis. The sign up api is working perfectly. Signup Api-> http://{{domain_name}}/index.php/rest/V1/customers Also I changed ...
5
votes
0answers
398 views

Paypal Payload for Payment Rest API 2

Can anyone help me for payload of paypal standard we are trying two api's nothing works for us. We tried multiple payloads already but no success in order placement. POST /V1/guest-carts/{cartId}/...
5
votes
0answers
234 views

How to use REST API for mobile App?

I have found on dev docs that REST API is recommended for mobile application. I have created integration from magento admin panel and tried to access resources with passing access token in header. ...
5
votes
0answers
1k views

Magento REST without oAuth

I have an Android and an iOS app that connect to Magento through SOAP and perform various actions. I have to switch to REST, but the users of the apps must not notice this change. They do not know ...
5
votes
0answers
524 views

Accessing Magento Rest Api as Admin

I am trying to access magento rest api with following script, but is uses default guest role to access, so I cannot access orders and other stuffs. How can I access Magento Rest api as admin. <?...
4
votes
0answers
217 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/...
3
votes
0answers
420 views

Magento 2.1 Rest API - Adding to Extension Attributes for VI/Orders/?searchcriteria

I have some custom data that I gather on checkout. Using etc/extension_attributes.xml, I was able to add this data to the extension_attributes output on VI/Order/#id, but when I use VI/Order?...
3
votes
0answers
167 views

Magento - Create order using REST API

I need to create place order using REST API. I want to help someone to create API. If you have any reference URL for perfect code please let me know.
3
votes
0answers
195 views

How to get featured products REST API

How to get REST API for featured products, Best sellers and Sale products? Is it possible with searchCriteria parameter?
3
votes
0answers
401 views

3rd party OAuth integration with Java

I'm following the documentation http://devdocs.magento.com/guides/v2.1//get-started/authentication/gs-authentication-oauth.html and I'm a little stuck. Basically I want to make REST calls from my ...
3
votes
0answers
248 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 ...
3
votes
0answers
661 views

Magento2 NodeJS: SOAP or REST API?

Does anyone know a good module that can use HTTP VERBS like POST and PUT ?. I tried this one magento2 but only managed to use GET and DELETE ... Hope someone has a few ideas !
3
votes
0answers
492 views

Magento 2.1: Custom Option IDs regenerated during site edit - how to manage?

I am developing an interface between Magento and Epicor 9 and we access our customer's orders using the REST API. When the customer buys one of our custom products, they modify their order using ...
3
votes
0answers
76 views

How does a REST API URL look like without rewrites?

Magento ships a rewrite for from /api/rest to api.php?type=rest. In case I can not or don't want to use that rewrite, how would I have to change a rest URL such as /api/rest/orders ? api.php/orders?...
3
votes
0answers
577 views

How to get images of products in cart using rest API

Doing a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" will give: [ { "item_id": 129, "sku": "24-UG05", "qty": 1, "name": "Go-Get'r Pushup Grips", "price": ...
3
votes
0answers
27 views

How to configure REST without edit the controls manually?

Hello I am developing an extension for magento that adds a new call to the REST API. This call must be accessible to everyone so by now the guest user must be configured manually to allow him use this ...
3
votes
0answers
426 views

Shopping cart price rule not applying when creating order by REST Api

I'm working with Magento CE 1.7.0.2. I create order by sending REST Api request (working fine) but when I'm adding coupon code to my XML (or JSON) request, the discount is not applying and the amounts ...
3
votes
0answers
344 views

REST products web service filter by Price Attribute

Magento 1.9 provides a web service for products but the response parameters that are different for customer/guest and admin. The problem is that there is a price field in Admin response that gives ...
2
votes
0answers
239 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": "...
2
votes
0answers
86 views

Magento2 Rest Api to Delete an item after place order

Can anyone help me how to remove an item from an order after order completion using resti api in magento2 Thanks
2
votes
0answers
43 views

Magento 2 : Rest APi Management payment methods

I need a solution to manage payment methods. Ex. Credit cards. in the web version we have the option to list the cards already used in purchases. (html: // vault / cards / listaction /).   Is it ...
2
votes
0answers
121 views

How to get window.checkoutConfig data via REST API?

I am building a custom frontend for Magento 2 Checkout. Sometimes the checkout uses window.checkoutConfigin the built-in frontend. My frontend uses the REST API provided by Magento 2, but how can I ...
2
votes
0answers
55 views

Custom REST API returns duplicate “response” tag

I am struggling because I get an invalid response from my custom API module for Magento 2 (2.2.5). When I send a request to my endpoint via GET with the header "Accept application/xml" (which is ...
2
votes
0answers
62 views

REST API: One Magento refuses to accept tokens

I have a weird problem- I am trying to use the REST API in Magento 2. I am using exactly the same method with two other Magento installations successfully, and I was looking for some help debugging ...
2
votes
0answers
21 views

How to develop a SOAP API as a guest user

I am trying to developing a SOAP API. For first I created a module like this app\code\MyVendor\MyModule in which I created etc\module.xml, etc\webapi.xml and etc\di.xml. Then I created my API ...
2
votes
0answers
242 views

Magento 2 rest api: Ignore out of stock products in get products search criteria

I am using the following api call to get products. {{base_url}}/rest/V1/products?searchCriteria[filter_groups][0][filters][0][condition_type]=like&searchCriteria[filter_groups][0][filters][0][...
2
votes
0answers
644 views

magento 2 override Magento\Sales\Model\Order.php get method for REST api

magento 2 override Magento\Sales\Model\Order.php get method for REST api to add some details. i am getting an error in di compile Fatal Error: 'Uncaught TypeError: Argument 1 passed to Custom\\Sales\...
2
votes
0answers
509 views

Get available filters of category by category ID

I have been trying to write rest api to retrieve available filters of particular category by its ID. I have a category which has two filters price and brands. Both price and brands are visible in ...
2
votes
0answers
57 views

Placing Multiple Orders in Magento 2.1 using REST API

How to post multiple cart items through one request on server using magento2.1 REST API?
2
votes
0answers
156 views

how to add cutom price via rest api - Magento 2

I'm following this answer to create guest order. I'm trying to add product to cart with my custom price, but the order will take the actual product price. POST /V1/guest-carts/{cartId}/items Rest ...
2
votes
0answers
168 views

Catalog Search gives different results every request : Magento 2

I did search several consecutive times for catalog search in the search box in the header of the store, but every time gave me different results as following: Also, I can see this difference when use ...
2
votes
0answers
232 views

Magento 2 REST API: What's the difference between carts and guest-carts?

Our team is developing a store using Magento 2 as the backend, with a decoupled client-side layer using Node.js/Express/React/Redux. So obviously we are relying heavily on the REST API, which is far ...
2
votes
0answers
194 views

Magento2 rest api error on product search on extension attribute

I've an extension attribute on products, declared in the following way: <attribute code="stock_item" type="Magento\CatalogInventory\Api\Data\StockItemInterface"> <resources> &...
2
votes
0answers
84 views

Error Using HTTPS to get the authentication token for Magento2 Rest

I am using Magento2 Rest API with token-based authentication. http://example.com/index.php/rest/V1/integration/admin/token It is working when using HTTP. However it doesnot work with HTTPS. SSL ...
2
votes
0answers
135 views

Custom file attribute Rest Api

I'm using the Magento 2 rest API to read out the orders in to our system. If an order line product have a custom file option we want to download this file. From the order items we get the following ...
2
votes
0answers
1k views

Magento 2: Debug REST error – 400 (Bad Request)

I can't process orders for some reason. The error I get in the console is: POST http://test-site.net/rest/default/V1/carts/mine/payment-information 400 (Bad Request) and POST https://test-...
2
votes
0answers
291 views

REST API - POST Attribute error

My post of an attribute is not working anymore (it has worked, checked git history). { "attribute":{ "attribute_code":"some_other_stuff", "is_html_allowed_on_front":...
2
votes
0answers
53 views

REST API, find sales search with SKU

I have necessity to search sales with SKU in REST API in magento 2.1. Example: return all orders that have products with sku equals AAA. Use REST API and PHP Thank you
2
votes
0answers
255 views

Magento2 - Additional_option not coming in Order REST api

I am creating additional_option so that i can add option in cart and order detail and it is working fine in both way but problem is that when i try to fetch order data using REST api it is not getting ...
2
votes
0answers
93 views

magento 2 search api response

i am using the magento2 api V1/Search for getting search results. It also returns the filter. The price filter is not coming in this. Please advise. http://stage.augvue.com/rest/V1/search?...
2
votes
0answers
551 views

Magento REST API Payment Method Aditional Information

I'm creating orders via REST. When placing the order, I'm invoking this: $base_url/index.php/rest/V1/guest-carts//order When using the 'checkmo' payment method it goes without issues, but when using ...
2
votes
0answers
2k views

Magento 2 Rest api POST JSON TypeProcessor error

Have a problem with Magento2 rest APIs. I try to import some data to DB table im my module. I wrote rest api, that gets a JSON array and insert it in database table, but when i try to send this array ...
2
votes
0answers
233 views

Magento 2.1 REST API configurableProductLinkManagementV1 only adds first simple product to configurable product

I'm making a call to REST API configurableProductLinkManagementV1. The first simple product is associated correctly. Any simple product after that is not. The error I receive states "option values are ...
2
votes
0answers
411 views

Magento 2 REST Api with Authorize.net

I'm using Magento:2 REST Api in my website, and currently working on the payment system (Authorize.net). Is it possible to create a transaction ? and place an order with Authorize.net through the ...
2
votes
0answers
357 views

Magento 2 Customer Attribute in REST Order API

I have added a new custom attribute for order in sales_order table. It contains a value for the order. I have added extension_attributes.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
0answers
120 views

curl and json approve conversion Rest API

i'm currently coding a little api for extole approve conversion api. It's only suppose to send data on declined orders which is equal to cancelled in the magento admin. Here is what i have written ...
2
votes
0answers
267 views

Observing REST API requests from 3rd party

I would like to know if there are any API events that are fired when a third party API sends a request to Magento? For example, if a 3rd party makes a call to salesOrderShipmentCreate() method app/...