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.

The 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.

The caller issues an HTTP request, which contains the following elements:

  • An HTTP header that provides authentication and other instructions
  • A verb, which can be one of GET, POST, PUT, or DELETE.
  • An endpoint, which is a Uniform Resource Indicator (URI) that identifies the server, the web service, and the resource being acted on.
  • The call payload, which is set of input parameters and attributes that you supply with the request.

Reference:

https://devdocs.magento.com/guides/v2.1/get-started/rest_front.html

1834 questions
16
votes
0 answers

REST API returns 404

I am using magento community edition 1.9.0.1. I try the REST Client Example explained here: http://www.magentocommerce.com/api/rest/testing_rest_resources.html But every time I send a request I got a 404 My server runs on localhost under the url :…
Ralph
  • 351
  • 1
  • 4
  • 12
3
votes
1 answer

REST API accessible without authorization

I'm testing the REST API of magento. According to the docs: "To make a web API call from a client such as a mobile application, you must supply an access token on the call." I can successfully get the token for my admin account using the code…
user3346601
  • 131
  • 2
2
votes
2 answers

REST API /products endpoint does not return all products

I'm trying to list all products via the REST API. I have 1195 products in my store, but the API is consistently only returning 849 of them, and it's the same ones that are left out every time. My requests look like…
Joseph Montanaro
  • 215
  • 1
  • 10
1
vote
1 answer

REST Api returns empty items

I've been working on a new Magento implementation for a client, and I seem to be hitting a snag with the Magento REST API. I had no issues getting past Oauth. I've run into that before, but my question is about how Magento stores information. When I…
user20089
1
vote
1 answer

Pass Bearer Token from Postman and fetch customer data in Magento 2 model

I need to find the customer data in custom rest api model I think magento very the customer token from the header as bearer token so i need to get from the customer token.
Prince Kumar
  • 462
  • 2
  • 11
1
vote
1 answer

Get order by increment_id thru REST API

I am trying this syntax but it returns no results. I am trying to get a single order based on increment_id. I have no issue getting an order thru the…
andyknas
  • 131
  • 4
1
vote
0 answers

Getting Error for asynchronous API call (v2.3) through postman

I get valid response when I try Synchronous API call. E.g. curl --location --request POST 'http://10.xx.xx.xxxx/rest/V1/customers' \ --header 'Authorization: Bearer jz62fwxwkdyyat8qeuxl1XXXXX97lpz' \ --header 'Accept: application/json' \ --header…
Lokesh
  • 11
  • 1
1
vote
0 answers

Issue with wildcard preceding value converting to URL encoding

When using a wildcard at the beginning of a search query, it does not seem to work and instead tries to convert the percentage sign to a url entity when the value is an int. Any ideas on causes/solutions? This…
willboudle
  • 1,705
  • 1
  • 13
  • 18
1
vote
1 answer

What's the difference between "extension_attributes" and "custom_attributes" in the products API?

I'm looking at the API in magento 2.3 and I'm trying to figure out how they works. I called a GET on /rest/it/V1/products/:sku and I got a JSON (stripped out for clarity) { "extension_attributes": { "marketing1_title": "This is the…
1
vote
0 answers

Retreive product list Magento REST API error

I have no idea what should I do with this error. The error says: Notice: Undefined index: state in /home/kataloggrosir/server/magento/rest.php on line 26 Warning: Use of undefined constant OAUTH_AUTH_TYPE_URI - assumed 'OAUTH_AUTH_TYPE_URI' (this…
planetDoom
  • 11
  • 4
1
vote
1 answer

Magento2 and Oauth 2.0

Magento 2.2.4 how can in use Oauth 2.0 for rest api resource access? Is it posible to use Oauth 2.0 with magento 2.2.4 like Oauth 1.0.
1
vote
0 answers

Magento 2 REST API Product Variants

I am using the Magento 2 REST API. How do I create a variable product? Here is my goal: T Shirt (Parent Item) - Small, Red - Medium, Blue I found this post, but I see no code to create product variants. I assume I must match to an existing…
Joseph Anderson
  • 145
  • 1
  • 7
1
vote
0 answers

Autentication in Rest

I have a local installation of Magento 2 where everything is configured and all the API works fine I'm doing an app for a client also with Magento 2 Done the same confugurations And the site always returns Consumer is not authorized to access…
Luís
  • 11
  • 4
1
vote
1 answer

How to hide in Magento REST API xml response?

Magento CE-1.9.2.4 I am trying to use the REST API and when accessing (for example) http://my-domain.com/api/rest/customers the response is the following:
kanenas
  • 209
  • 1
  • 4
  • 14
1
vote
2 answers

/rest/V1/products filtering by price and special price

I am using the Rest API to query for products. When I set the order by to "price" it orders everything properly while also taking into account currently active special prices. My issue is that when I try filtering by "price" it ignores special…
1
2