Questions tagged [rest-api]

Magento REST API defines a set of functions that a developer can use to perform requests and receive responses. These interactions are performed using the HTTP protocol.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

REST API: Setting Item Quantity / Need to Get Current Reserved Quantity of an item

Working on using the Magento 2.3 Rest API to set the Quantity of an item available based on a separate datastore. I realize that the formula for getting the Total Salable quantity is based on the ...
0
votes
2answers
20 views

Magento 2: How to fetch a custom attribute of products

I am trying to fetch a custom attribute which is of collection type. I need to get all various types of collection in that attribute using Magento 2 custom rest API and display them in postman.
0
votes
0answers
10 views

Create an external webapplication login interface for Magento2

i would like to create an interface for logging in for magento. For this reason, customer should login on my web application and then, should be authenticated on the magento application. I tried ...
0
votes
0answers
11 views

Magento 2.3.2 Category API returns null attributes for the entire tree

When I am trying to call the REST API for generating the Category tree, it shows null values for the entire attribute except id and parent_id URL: rest/all/V1/categories Version: Magento Commerce 2.3....
-1
votes
0answers
16 views

Magento 2.X : Integrate multiple REST API and call them in a single API

I want to integrate multiple REST API and call them in a single API call in Magento 2. Thanks in advance
0
votes
1answer
25 views

Magento 2 - Get only categories Names and Id in REST API Programmatically

I am trying to get only the category name and category id with the parent and child segregation programmatically using REST API. Can anyone please suggest some solution or provide some sample code ...
0
votes
2answers
25 views

REST V1/customers adding a new extension attribute Magento 2.3.1

I have added a new field as "is_seller" in registration page (same as "is_subscribed). If the checkbox is clicked the customer Id will be saved to another table with some additional values. It was ...
0
votes
0answers
10 views

Magento2 currency switcher using rest API for mobile app

I am creating a Magento website with currency switcher, It works fine in webview. I need the same for mobile app. If the user changed the currency once, all the prices should change to selected ...
0
votes
1answer
29 views

How to update value and label in attribute REST API Magento2

I have an attribute manufacturers, it has a value, I want to select them and change which I need using Rest API I tried sending a request like this http://magengree/rest/V1/products/attributes/...
0
votes
0answers
17 views

Calling MAGENTO API 1.9 using HTML and JAVASCRIPT (experts question - problem) HELP

I need someone who knows MAGENTO and everything related to APIs and REST APIS very well I have a website and I want to validate (check if you want) if the email for a certain customer exist or not ...
0
votes
2answers
47 views
+50

Magento 2 WebAPI json encode

I'm returning JSON via an endpoint in Magento 2 this bit of JSON looks like the following: $new_json = [ 'component_1' => '[{....}]', 'component_2' => '[{...}]' ]; ...
0
votes
0answers
15 views

Validate email using MAGENTO 1.9 (not way)

I've been trying several times to validate an email from my website against MAGENTO without success. I know it is possible to use MAGENTO REST API through JAVASCRIPT or maybe a PHP script but THIS IS ...
0
votes
1answer
28 views

Magento 2 set order extension attributes via API

Is it possible to set an order's extension attribute value when creating the order via the API or is there an appropriate API endpoint to update an existing order with this information? For example ...
0
votes
1answer
52 views

Cannot validate email - MAGENTO api - how

I've been trying without success to validate the email from my website against the MAGENTO customers API and throw a message (exist or not exist) I mean, i have a website where customers are created; ...
0
votes
0answers
12 views

Magento - PUT request Rest API - Header issue

I am using PUT request to change name of product entity id 1 in Magento 1.8. I am using below details while using PUT request: A. Oauth1.0 key credentials like secret key, etc B. Headers: Content-...
0
votes
0answers
30 views

Hide Authorization Token from Request Headers in browser for headless magento 2

We are using reactJS as frontend for magento 2 website using magento 2 rest APIs. But the authorization token is visible in the browser dev tools posing security risk. Kindly suggest a way to hide ...
0
votes
0answers
18 views

Magento1.8 - Restapi Custom Module - PUT using RestClient

I am using restClient for PUT activity on magento. I used 2 Headers option in the top: Content-Type: application/json Accept: application/json After I do put, I receive below error: { "messages": ...
1
vote
0answers
37 views

Add comments to an order

So when I look online, it looks super simple... Even the swagger docs show it to be simple, but I've tried 2 different Magento sites now (different versions) and the API simply doesn't work... Order ...
0
votes
0answers
17 views

Any way to get order source thought api?

I'm working with Magento as a third-party application. I'm fetching orders(API) and just want to know to which warehouse(source) his line items refers. I can see this on the GUI side (screenshot), but ...
0
votes
1answer
29 views

How to hide a product in magento2 rest api?

I want the product not to appear on the site, but not delete ? How to do it through the REST API ?
0
votes
2answers
55 views

Issue on Magento 2.1.7 Placing Order Errors

Place order error 400 on /rest/english/V1/carts/mine/payment-information magento 2 http://prntscr.com/os98gp We are facing an error on a custom checkout, which on hit place order First, try, it ...
0
votes
0answers
15 views

Magento 2 Shipping to Multiple Addresses using REST API

Has anyone tried creating order with multiple shipping addresses using REST API? I can see the option in the admin dashboard to enable such functionality, but I cannot find any documentation if it is ...
1
vote
0answers
18 views

Magento 2: Rest API throws error “The consumer isn't authorized to access %resources”

Working in to the rest API and checking with the postman storeConfigs, storeViews, currency etc... API working fine but i am workign on Add to Cart API and it's throwing in below response. "message": ...
0
votes
1answer
16 views

Checkout process rest api

/rest/V1/carts/:cartid/payment-information code is not working. The request does not match any route. Please suggest something.
0
votes
1answer
20 views

How can get category layered navigation using rest api in magento 2 for mobile api

I'm creating rest api for mobile app in Magento 2,now i'm wondering to get layered navigation (filters) for a category and loaded collection like search or custom collection using rest api. Please ...
0
votes
0answers
19 views

POST an image through Magento 2 REST API - Content-Type

I'm trying to upload an image through the Magento 2 REST API with a cURL based tool: rest/V1/products/:sku/media I'm getting the following error back from the Magento sever: "Server cannot understand ...
0
votes
1answer
16 views

How do I create a shipment via REST API magento2?

Can someone help me about the shipment. How can I pass the MSI source code to the Shipment Create API? Thanks
1
vote
0answers
12 views

Magento 2 setting base image on all store views via REST API does not change base image for specific store on production mode

I have a magento 2.2.6 installation with 2 store views, i am setting the base image via the REST API using the /rest/all/V1/ endpoint. In developer mode changing the base image updates the base image ...
0
votes
1answer
36 views

Magento 2.2.6 : Shipment creation using REST API

Unable to create shipment in Magento 2.2.6 I am using the following source code like this in postman https://test.com/rest/V1/shipment { "entity" : { "order_id" : 70, "items" : [{ "order_item_id" ...
0
votes
1answer
41 views

MAGENTO 2 REST API: PUT through POSTMAN [Resolved]

I'm trying a PUT on Magento 2 REST API through POSTMAN like this: https://domain/rest/V1/products/IP_X With only a price change on the json content. getting the following error message: { "...
0
votes
0answers
10 views

Magento 2 : Share with friends rest api

How to create an API to share a product (via email, facebook, twitter etc) in Magento2 for mobile application
0
votes
0answers
9 views

How to add layered navigation filters in Category Page API?

I'm working on Category Page API where according to design, it is category details above followed by category products. Now, I'm unable to get the layered navigation filters in the Magento default ...
0
votes
1answer
26 views

Create product viewable by only specific customer or customer group

I want to add a product that can be viewed only by a specific customer or group of customers via Rest API Can anyone tell me how can I achieve this? Any help would be appreciated. Thanks in advance....
0
votes
1answer
19 views

How to Create Token based Router in Magento2?

I want to create Custom API through controller action. How i can authenticate using token to make secure API. Example: http://www.example.com/webapiv1/getItems http://www.example.com/webapiv1/...
0
votes
1answer
19 views

Get Last Added Product ID of Cart without using checkout session

I am using RESTful APIs of Magento and I want to get the last added product id of in the cart. All of my searches are using the Checkout Session method of Magento which is $this->checkoutSession-&...
0
votes
0answers
17 views

How to Receive XML Post Data in Magento2?

I want to receive and validate xml object from third party application in Magento2. How I can write custom endpoint and response for this. Xml payload: <myitems> <item> <info1>&...
3
votes
1answer
17 views

Addtocart Rest api for Configurable product in magento2?

Addtocart Rest api for Configurable product in magento2 ?
0
votes
1answer
23 views

Magento 2.3 REST API: How to update shipment?

I need to add carrier code and tracking number to the shipment by REST API. For this, I am trying 2 different codes which I found from the search as below. But it doesn't update anything, not display ...
0
votes
1answer
17 views

Error in Uploading Image using REST API in Magento 2

I am getting below error while hit REST API from postman: "message": "The product can't be saved.", I have used below details for API: URL: magento.localhost/rest/V1/products/p1/media ...
0
votes
0answers
20 views

Magento 2 How to get list of filter for current category using REST API

How to get a list of filters to show on the category page to allow the customer to filter on products using REST API in Magento 2
0
votes
0answers
13 views

Cannot throw critical exception on retrieve REST in Magento 1

I've created a custom module that returns the content from a XML file from media folder. The XML file contains some product data. The problem is that when the call is made the client has to send the ...
2
votes
1answer
23 views

How to secure Magento 2.x guest API

I realized that it is possible to register customers through API without authentication. https://devdocs.magento.com/guides/v2.2/rest/anonymous-api-security.html Just make a POST call to https://...
1
vote
1answer
72 views

Adding extension attribute to customer rest API giving Fatal error

I'm trying to add custom extension_attribute to customer API (REST) in Magento 2. The logic is working for single record API V1/customers/{{CUSTOEMR_ID}} But it is not working for search API V1/...
1
vote
0answers
28 views

Magento 2 - REST API filter order data from shipping and billing address name and telephone number

I need to filter order data based on shipping and billing address name and telephone through rest api For example In order to filter data through status my request url would be something like this: ...
0
votes
0answers
24 views

Magento 2: Set product position in category via REST API

I'm trying to set the position of an existing product inside a category via REST API. Currently all products have a position of 0. The endpoint I'm using is POST /V1​/products. The json body: { "...
1
vote
0answers
41 views

Magento2 Products filter quantity_and_stock_status is not working

We are developing an iOS app for a Magento website using Magento2 rest apis. App is fetching and showing all products added to the magneto website. But some of the products are not being added to the ...
0
votes
0answers
27 views

Create Custom API with multiple values of a parameter magento 2

I am trying to create a new API which calls the existing methods to get products data inside my custom method I wanted to accept multiple values of a parameter (comma separated) eg. parameters key ...
0
votes
1answer
62 views

custom “sales_order_item” attribute to API response

I followed this guide to add a custom product attribute to quote and sales order item throughout the order process and this works fine. My custom attribute is added to the sales_order_item table ...
0
votes
1answer
31 views

Magento 2: Property “ActionsHintLabel” does not have accessor method “getActionsHintLabel” in class “Magento\SalesRule\Api\Data\RuleInterface”

In Magento 2 I am trying to add SalesRule from API: /rest/V1/SalesRules Post Request body: { "rule": { "name": "Test SalesRule", "store_labels": [], "description": "test 50% ...
0
votes
0answers
32 views

Magento 2.3 REST API: How to update status of multiple order in single API call

$data = [ 'entity' => [ 'entity_id' => 123, 'status' => 'processing', 'increment_id' => '000000123' ] ]; By this, the order status can be changed. But ...