All Questions

Tagged with
0
votes
0answers
11 views

Magento2 pass json data format in call to external service

Currently I'm referencing this article to post data to external services in a form data format. Some of the external services require in json format. How should I do it if I want to pass json format ...
1
vote
0answers
30 views

Product images in multiple stores using JSON API

I have four stores created, and I'm trying to upload a single image for the same product in each of the stores. My issue is that to get an image to show in the category front end view, I need to ...
2
votes
0answers
151 views

How to find Magento version using API (JSON specifically)

Using the JSON RestAPI, I need to do things slightly differently depending on the version of Magento due to as-yet un-fixed bugs (specifically https://github.com/magento/magento2/issues/18005). I can ...
8
votes
0answers
847 views

API Stock update

Using Magento 2.2.2, I was trying to add stock updates to a pre-existing setup using the official defined endpoint: rest/V1/products/testsku/stockItems/1 with { "stock_item": { "qty": 1234, ...
1
vote
3answers
822 views

How to list all products from API with curl command line?

I've been trying a lot of things and can't seem to figure out what should be pretty simple... How can I make a request with curl in command line to /index.php/rest/V1/products so that I simply get the ...
0
votes
1answer
297 views

REST API vs JSON

I've found lots of questions and answers on REST API vs SOAP API. Some of them like this one mention JSON. Could you explain what is the difference between REST API vs JSON. (aka create custom ...
1
vote
1answer
436 views

How to handle custom_attributes from REST API data?

When dealing with the Magento v2 API, I faced a problem where getting product details have inconsistent data from REST API. Example 1: Example 2: These are Note 8 and iPhone 8 data and we can see ...
1
vote
3answers
2k views

magento 2 custom api return in json without response tag

I have created a custom api following "inchoo" tutorial. But I am getting the data in string format instead of json. From my browser I am getting a tag surrounding the api return as below. But ...
1
vote
1answer
104 views

Move HTTP GET request into a JSON array in Magento 2 REST API (V1/customers/search)

Is it possible to put the content of this rest api in a json array to put in GET parameters instead ? And if yes, what should the code look like ? curl_init("http://my.website.com/index.php/rest/V1/...
0
votes
1answer
497 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
1answer
329 views

Magento 1.9.2 :how to take data though API from android app to magento database?

We are having android app where we are tracking the location and timing of our sales guys! but how we can save this log in time and log out time in magento database ? how I can interact with android ...
1
vote
1answer
171 views

Magento2: Add product via external form

I'm making a database connection between two seperate systems. I found a lot of options for updating existing products, but is there also a way to add new products through the Magento2 API?
1
vote
1answer
1k views

Create product using SOAP API and JSON input

I need to create product with SOAP API and JSON, here is my JSON input: {"sku":"tsett","name":"TEST","weight":"3.0000","qty":"18.0000","brand":"sample","category_ids":["107","108","109"],"pirce":"...
-2
votes
1answer
2k views

How to get JSON data output on backend using API? [closed]

In here I have not experience with JSON on Magento. So I need to know useful links or tips to learn that.
7
votes
4answers
18k views

How do I get a response from REST API in JSON format in Magento 2?

I used the resources in “Creating a New REST Web Service in Magento 2” and “Creating a New REST Web Service in Magento 2” to create a custom API module, but the response is in XML format. I need a ...
7
votes
4answers
2k views

Creating a custom module to send order details to external supplier API via XML or JSON

I'm trying to write a custom module for Magento that when certain items are ordered and payment has been made, posts to our clothing supplier's site with details of the ordered item, delivery address ...
1
vote
1answer
1k views

How to get json of products/storeConfig by making a request with an url?

I'd like to setup Magento so that if I make a request with an URL such as: http://mymagento.com/api/storeconfig (actual url format not important) would return json with the data requested. How can I ...
4
votes
3answers
3k views

No response from POST to custom REST Api route

I set up a working custom route for Magento's REST Api. It works fine for GET requests, as the _retrieve() function of the corresponding V1.php class is being called as expected and returns the data. ...