All Questions
590 questions
1
vote
3
answers
1k
views
Magento 2.4.2 rest api issue with get current customer details using customer token
I am using latest magento version 2.4.2
I have created customer token using postman eg.
https://<magento.host>/rest/V1/integration/customer/token
sending in body
{
"username" : "...
0
votes
0
answers
147
views
Can I use a PUT request when required fields aren't filled in?
I'm trying to run about 10,000 put requests to update pricing via the API. A lot of the products have fields that are required, but aren't filled in.
Everything works when I update the pricing with a ...
0
votes
0
answers
193
views
How to implement Custom online shipping method with shipping API?
I have created one shipping module.I need to integrate flash express API's in that. How to integrate the APIs?
1
vote
0
answers
42
views
how i can retrieve Minimum Amount in magento 2 using REST API?
Dears
I am using Magento ver. 2.2.7 as backend for my app,
i want to get "Minimum Amount" for orders when my users review them bascket.
So i am looking for API to retrieve value of "...
1
vote
2
answers
1k
views
Fetching SKUs containing a "/" (forward slash character) from the /rest/v1/products/ REST API endpoint?
A lot of our SKUs have spaces and forward slashes in them (eg: "PRODUCT1-DARK BLUE" and "PRODUCT2-DARK/RED". I'm able to curl to the products with spaces via url encoding:
# ...
0
votes
1
answer
626
views
On Adding items in cart for guest user using Postman getting error
I have successfully run two REST API's but on running the third one
http://127.0.0.1/mag/rest/V1/guest-carts/81/items
{
"cart_item": {
"quoteId": 81,
"sku": "...
0
votes
2
answers
2k
views
REST API: Consumer is not authorized to access %resources
I'm in the middle of finishing a Magento 2 store for a client. The last I had on my to-do list, was connect Magento to their accounting software through the REST API.
However, apparently there's some ...
0
votes
0
answers
126
views
Magento 2 How to get products details with qty calling products endpoint?
Magento 2 How to get products details with qty calling products endpoint?
I need to get the qty from the products endpoint.
0
votes
0
answers
213
views
Magento 2 How to get Custom Attribute Value Of Order Using Rest API
I have created one attribute for order named "custom_fee" and it is showing okay in magento orders frontend as well as backend but when I tries to access order data
with rest API , I am not ...
0
votes
0
answers
331
views
Curl request doesn't login to my API, why?
I've been working on this code to log in to my API. But every time I try to login using CURL I get the following error
{"message":"The request entity's media type 'multipart/form-data' ...
0
votes
1
answer
763
views
API -> add image with external url instead of base64
Is there any extension that give us the possibility to add external url instead of a base64 string when I adding/update product via magento 2 api?
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 ...
0
votes
3
answers
2k
views
Magento 2: How to add a tracking number to an order using REST API
I use the following code to add a tracking number to an order:
$url = 'https://xxxxx/rest/V1/order/514/ship';
$authorization = "Authorization: Bearer ".$json; //I get $json ...
3
votes
0
answers
1k
views
2FA REST API using Postman
I have followed the steps at: https://devdocs.magento.com/guides/v2.4/security/two-factor-authentication.html to get a token in order to use Postman to fetch Magento 2 REST endpoints e.g. products, ...
0
votes
2
answers
3k
views
Magento 2.3.5 - API error The "array" class doesn't exist and the namespace must be specified
We get the following API error on our Magento 2.3.5 store;
The "array" class doesn't exist and the namespace must be specified. Verify and try again.
More info;
<![CDATA[#0 /vendor/...
0
votes
2
answers
813
views
How can i get the all coupons details in magento 2 using api?
I want to get all coupons that i created in the price rule section using the API just like the result of product/orders listing API.
3
votes
2
answers
2k
views
Magento 2 How to Update custom order attribute using REST API
I am using this -
extension_attributes.xml
<extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
<attribute code="custom_sales_id" type="string&...
2
votes
1
answer
354
views
Add a comment to an order [API REST]
I want to add a comment to a magento order. When i try to do this with postman it works properly:
But when i do this with my php code, the request return an error:
//GET TOKEN
$url = '***/rest/V1/...
1
vote
0
answers
267
views
Magento 2 - Create order using REST API - Third Party Payment Gateway such as Paypal or other 3rd party payment gateway
I need to use the Magento REST API to create an order from an API. In my case, I am trying to implement the payment directly using API to Magento. What I need to do is to create an order by setting ...
1
vote
0
answers
443
views
Call 3rd party rest api with basic auth username and password
I am calling 3rd party API in my postman I have choose Authorization as basic auth and passing username and password.
I am using Zend Client in magento 2 to send request now bt I set headers like this ...
0
votes
0
answers
220
views
Magento 2 REST API filter products in stock
I am looking for an API filter to get in stock products but I could not find any option on the internet.
Any ideas ? Maybe some plugin code ?
Thanks !
0
votes
0
answers
250
views
Magento 2 Custom REST API Update
If Only part of the data is to be updated then is sent the following way:
{
"entity": {
"entity_id": 1,
"is_enable": 1,
"name": "Hello",
...
2
votes
1
answer
3k
views
Magento 2: Where are the Token-based authentication access token stored?
I have been following along with this guide: https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-token.html
This guide shows how a token can be requested and shows ...
2
votes
1
answer
346
views
Magento 2 API for product add to compare and compare list
There is any way to get API for product add to compare and get compare list for customer.
Thanks
1
vote
1
answer
462
views
Magento 2: how endpoints (REST) to get data from database
How endpoints <host>/rest/<store_code>/V1/carts/mine/estimate-shipping-method
to get data from a database or mention function or class that helps this API to get data from the database?
...
0
votes
2
answers
2k
views
Sales order address custom attribute value in Order Rest Api
I have added door number custom attribute to sales order address table. But I'm not able to get the vale in Order REST API.
Please help me on this
0
votes
1
answer
250
views
Error on Update inventory REST API? when SKU has a "#" in it
I'm trying to update the inventory of our products from our ERP using the rest api. I have run into an issue when the SKU has a pound "#" in it.
A URL like:
https://magento.xyx.com/rest/V1/...
0
votes
1
answer
255
views
Magento 2 - Get order custom attribute data using rest api
While i am trying to get order custom attribute data using rest api it's coming as string. But magento returning all other data as JSON. Does anyone have any idea how to make this look like json?
...
1
vote
1
answer
2k
views
Magento 2 Access REST API
I tried looking for answers before posting but couldn't find any.
I hosted my magento site in siteground and added integration.
Then I tried accessing the API using Postman but I get either 401 ...
0
votes
2
answers
5k
views
Magento 2 Get Value of Custom Attribute on Magento 2 Rest API V1/orders/items
I am trying to get the Custom Attribute I have in the sales_order_item to display on the rest/V1/orders/items API call. I was able to get the Attribute to display on the rest/V1/orders API call. Using ...
0
votes
1
answer
488
views
REST API : Magento 2 : Without admin token how i can registered new user?
I am using bearer token for rest API authentication in Magento2.3.2 but I am facing one issue, while registering the new user, admin authentication token is required while registering New user by API. ...
0
votes
1
answer
189
views
Error while running API :Undefined Property
Magento 2.3, here is the stack trace:
rk/App/ErrorHandler.php:61)"} []
var//log/exception.log:[2019-12-12 07:26:41] main.CRITICAL: Report ID: webapi-5df1ebb139956; Message: Notice: Undefined ...
0
votes
0
answers
353
views
Magento 2 . API: want to fetch only order ID but every order details are coming
webapi.xml:
<route url="/V1/orders/" method="GET">
<service class="SimplifiedMagento\Custom2\Api\OrderedRepositoryInterface" method="getOrderDetails"/>
<resources>
...
6
votes
2
answers
651
views
I have to make an API where I can return orders (product name) placed by a customer using customer Id?
In sales_order table product name field is not there but i have to fetch that too. How to fetch the product name ordered by a customer using customer ID?
2
votes
2
answers
681
views
Not able to get data through API...!
Error is "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5dee36e254394".
When you run http://localhost:8888/magento/rest/V1/position/1
Need to get result ...
1
vote
1
answer
2k
views
Magento 2 credit memo API observer/plugin
I'm interested to know if an observer or plugin will be trigger if a credit memo is created via API rest example: POST /V1/creditmemo/refund OR POST /V1/invoice/{invoiceId}/refund
ref:https://devdocs....
2
votes
2
answers
3k
views
How to fetch post method xml data in Magento2 controller
We have to implement the punchout concept in magento2.
There is a 3rd party system they will send data using the cXML format to Magento 2 endpoint. We need to fetch that data in the Magento2 & ...
1
vote
1
answer
2k
views
magento 2 api. create product with multiple colours and sizes with different image and stock for each variant
I am a noob to the Magento ecosystem. I have read the documentation for the Magento 2 api and understand that I have to create a configurable product but I am not understanding the flow for creating a ...
3
votes
2
answers
2k
views
How to call a 3rd party API from a controller? Magento 2
I built a custom module. Its admin tables with CRUD functionality. I am putting a new button on the grid via the Ui_component listing XML file. When this button gets clicked I want to call a 3rd party ...
0
votes
1
answer
270
views
Getting 404 error while configuring REST API using RestClient in Magento 1.9
When I try to initiate oauth for getting oauth tokens with callback in my localhost, it throws 404 page not found error. I configured consumer key and secret and with oAuth 1.0 and using GET method.
...
2
votes
1
answer
363
views
How to get the categories child category list per store in magento2 rest api
I need to retrieve categories and child-category list per store. I have two store have store code grocery and fruit.
2
votes
1
answer
3k
views
How to get all products with pagination using REST API in Magento 2?
Is it possible to get all products with pagination using REST API in Magento 2?
I'm using REST API Get all product with pagination. E.g. in first page show 20 products, second page 20 products, etc...
2
votes
1
answer
1k
views
Bulk Actions Log
After testing Rest Async-Calls with RabbitMQ-Server, all worked fine.
In the Magento-Database the table "magento_bulk" and "magento_operation" is full with data from the Rest Async-Calls.
But in ...
0
votes
1
answer
1k
views
Magento 2 : Change default REST API response
I have an order collection get out via API
How can I change some value in API response via custom module
4
votes
1
answer
1k
views
Merge guest quote items to customer quote(if customer log in) by magento 2 rest API
If any one is add products in cart by guest and after that login then how it will merge guest cart to customer login cart items by Rest API. if anyone found this solutions, please help me.
I have ...
1
vote
1
answer
2k
views
Magento2 : Set Customer Custom Attribute Value Using Rest API
Property "Mobilenumber" does not have accessor method "getMobilenumber" in class "Magento\Customer\Api\Data\CustomerInterface".
Whenever i am trying to set customer custom attribute value i am ...
2
votes
1
answer
436
views
How to Merge guest quote items to customer quote(if customer log in) by magento 2 rest API
If any one is add products in cart by guest and after that login then how it will merge guest cart to customer login cart items by Rest API.
if anyone found this solutions, please help me.
0
votes
1
answer
449
views
Magento2 - rest API on custom module "items" object is not populated
I build a custom module with a stores repository that I query using the following webapi.xml:
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
1
answer
69
views
magento2 rest api ship to name not adding after creating shipment
Ship to name is not adding while creating shipment using Rest Api with below api url:
http://127.0.0.1/magento225/rest/V1/shipment/
Body:
{
"entity":{
"orderId":9,
"store_id":1,
"items":[...
0
votes
1
answer
50
views
Magento 2: Get order via API
I need to get out of order information via api, but i didn't know what to do, anyone help me, thank in advance.