Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
7 votes
1 answer
4k views

How do I consume the REST API in Magento 2, using AJAX with session-based authentication?

I am having issues successfully making an AJAX call to Magento 2 REST API endpoints, using session-based authentication. When I run the following javascript, I always receive a 401 (Not Authorized) ...
DrewK289's user avatar
  • 193
5 votes
1 answer
2k views

<parameter name="customerId" force="true"> in customer module webapi.xml

In Magento2 module-customer webapi.xml file, the API GET "/V1/customers/me" has codes below: <route url="/V1/customers/me" method="GET"> <service class="Magento\Customer\Api\...
Key Shang's user avatar
  • 3,445
5 votes
2 answers
5k views

Magento 2 Customer login and forgot Password using Rest API

I need customer login and customer forgot password using Magento 2 API. Can you please help me. I was search but not getting any code from google.
Kartik Asodariya's user avatar
4 votes
4 answers
4k views

How get wishlist in Magento 2 Rest API?

Get Wishlist product in Magento 2 REST API ? And Add to Wishlist in Magento 2 REST API ? Wishlist API is not provided by Magento 2
Yann Martel's user avatar
4 votes
3 answers
8k views

where to find Magento 2 API docs?

Finally I found out the magento 2 api endpoint for all products as below rest/V1/products?searchCriteria[pageSize]=20 but I need more detailed docs about api endpoints which I coudn't find out yet. ...
Ramesh KR's user avatar
  • 886
2 votes
1 answer
8k views

Get list of ALL customers using REST API

I know I can get a specific customer by running: curl -X GET "http://127.0.0.1:32769/index.php/rest/V1/customers/2" -H "Authorization: Bearer token" How do I get the list of ALL customers?.. GET "...
user53473's user avatar
1 vote
1 answer
3k views

How to add cutom customer attribute field to call rest api via create new customer

I have created a custom customer attribute(mobile_number) and set default value of customer create account. I added mobile number to customer_attribute: $customerSetup->addAttribute(Customer::...
Rajkumar .E's user avatar
  • 3,580
1 vote
1 answer
2k views

How to reduce Magento 2 rest api performance time?

I have created some custom rest api's and using Magento's default rest api's. I want to reduce the loading time of the api, as I have custom api's too so the request time and response time is quite ...
paras surya's user avatar
1 vote
1 answer
257 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" ...
shivashankar m's user avatar
1 vote
0 answers
400 views

How to create REST API for customer profile update?

Since, I have worked with magento get method api calls but yet didn't work on post or put method. I am trying to update customers to update their profile in mobile app. public function update($id){ ...
Ramesh KR's user avatar
  • 886
1 vote
0 answers
363 views

oauth_problem=Consumer+key+has+expired

Hello Magento Community, I am trying to integrate the Magento Rest API in my App. But while doing the OAuth authentication for request token I am getting error as Consumer Key has Expired. I have ...
Manoj Sethi's user avatar
1 vote
1 answer
192 views

Where is webapi.xsd located

I have been trying to access a REST API end point that results in a 404 Not Found. I have come across documentation that explains the endpoints have to be configured in the webapi.xsd file. I have ...
Wayne's user avatar
  • 21
0 votes
2 answers
2k views

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' => '[{...}]' ]; ...
andy jones's user avatar
  • 1,383
0 votes
2 answers
1k views

How to include a custom attribute in the Customer object when calling through API

I made a custom attribute using this code in the Setup/Patch/Data, everything works just fine except when calling the API to get the customer object, it comes without the new custom attribute included,...
Amjad Alarori's user avatar