All Questions
590 questions
0
votes
1
answer
29
views
How to save products in bulk using API?
I am new bee in API development and need to save bulk products in my Magento using API.
Do I need to create custom API module or is there any default API to save the products in magneto2?
What are the ...
0
votes
0
answers
11
views
Add To Cart API and Read From Cart API, unable to retrieve configurable product variant - Magento 2.4.4-p4
So I was creating an add to cart API and read from cart API
The problem that I encounter is unable to retrieve variant of configurable product
Below are my addToCart API code
/**
* POST add to ...
0
votes
0
answers
17
views
API with price filter and configurable products
I'm working with the Magento 2 API and can't work out why when using a price filter configurable products are being filtered out completely from the results. I remove the price filter and the products ...
0
votes
0
answers
21
views
How to upload a new attribute via API?
I want to create an attribute from my android app written in Kotlin. For the explanation I am going to use Postman. Following is the code I use to create an attribute:
Post method:
https://mydomain....
0
votes
0
answers
31
views
How to add custom content to products endpoint?
In magento 2.4.6 I have a custom module that adds some configuration in the admin panel. I also have a Helper/Data.php with methods to collect the value of each field of this configuration.
On the ...
0
votes
1
answer
38
views
Setting Custom Property in customer using APi in Magento
I'm passing a custom property value using an API. The problem is that I am sending "Device Registration" as the origin ( custom property ) but the value that is being set in as "D365FO&...
0
votes
1
answer
62
views
How to create REST API endpoints for core_config_data table?
I am working on an integration extension for Magento 2. I would like to create API endpoints for core_config_data table, because I would like to insert a html script to header of each specific store ...
1
vote
0
answers
59
views
Magento2.4.4p4 REST API Error 'Class string does not exist'
I had this issue during when I create a custom Rest API in fresh magento 2.4.4p4
As you can see the error I get is Class string does not exist
Below are my code folder structure, which I found to be ...
0
votes
1
answer
79
views
Magento2.4.4p4 REST API Error 'Class array does not exist'
I had this issue during when I create a custom Rest API in fresh magento 2.4.4p4
As you can see the error I get is "Class array does not exist"
Below are my code folder structure, which I ...
0
votes
0
answers
17
views
Magento 2.4.4p4 Rest API Trouble to Confirm Customer Registration
I am having trouble to activate this API to confirm user email upon registration
Request :
{
"confirmationKey": "nVU3KFeGFg3Zn6L1oZlUbFaPclx3BOWN"
}
Response :
{
"...
0
votes
1
answer
68
views
The "oauth/consumer/enable_integration_as_bearer" path doesn't exist
I am trying to reset API but when I going to the path
Stores > Configuration > Services > OAuth > Consumer Settings > Allow OAuth Access Tokens to be used as standalone Bearer tokens
I ...
0
votes
0
answers
24
views
Not getting the difference changes on comparing two git branches in same repo using Github API
I am able to get difference between two branches stage and master under same repo on web version via below web URL.
https://github.com/:username/:repo/compare/master...staging
but not getting the ...
0
votes
0
answers
26
views
Update REST API Payload using before Plugin
Can I use before plugin in Magento 2 to update Customer Creation Payload?
Reason: In Magento, we have one custom customer attribute of dropdown type as you can see below.
Now the API is working fine ...
0
votes
1
answer
621
views
How to save data to database using interface repository api
I'm a newbie magento 2 developer. I'm currently learning how to store data to database using repository-interface-model-api approach. My code is not working.
model ItemRepository
class ...
0
votes
1
answer
366
views
Magento 2 custom API giving "Class string does not exist" error
In Magento 2.4, I am using custom API and it is giving the below error.
{
"message": "Class string does not exist",
"code": -1
}
I have tried this and this solution. But ...
0
votes
1
answer
298
views
Error in Postman and show that Invalid type for value: \"%productId%\
I have developed a module in my magento 2.2.6 for to create an API that can update the product price and quantity via product id . Please see my code below
/var/www/html/app/code/AdmNetsuitePQ/...
0
votes
2
answers
1k
views
Magento 2 - Request sample for carts/mine (GET)
I try to call the carts/mine GET route of the Magento 2 REST API, but it does not show a request sample in the documentation.
It says "Returns information for the cart for a specified customer.&...
1
vote
1
answer
2k
views
How to work with Magento REST API using Integration tokens?
I have tried these steps
Use the following steps to generate an access token:
Log in to Admin and click System > Extensions > Integrations to
display the Integrations page.
Click Add New ...
0
votes
4
answers
819
views
rest/V1/products?searchCriteria[page Size]=10 giving signature error magento 2.4.5
I am calling Magento rest API to load all products of a site.
https://store_url/rest/V1/products?searchCriteria[pageSize]=10
It gives the following error -
"message": "The signature ...
0
votes
1
answer
188
views
Rest API service
http://dev.eternal/rest/all/schema?services=all, gives all services,
but what if I want to grab only customer service? how can I do it?
Plus, how to create a service and call just the desired API's?
...
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,...
0
votes
1
answer
240
views
REST API data display in admin grid Magento 2.4.4
How does REST API show data in Admin Grid ?
Thank You
1
vote
1
answer
224
views
Magento 2 Overriding or Extending Core Interfaces in custom module without use of extension attribute
I am trying to add a new getter and setter to
\Magento\Catalog\Api\DataCategoryTreeInterface
3
votes
4
answers
694
views
Unable to set customer group when create customer with REST API
In Magento 2.4.5 I'm trying to create customer with REST API. In the payload I specify the group ID, but the new customer always get the default group ID.
Example payload:
$customerData = [
'customer' ...
1
vote
2
answers
313
views
Magento2.4.4 Place order using stripe payment method through REST API
From stripe sdk I am able to create payment id successfully but when call api to create order in magento2 then getting authentication error.
I am calling below API
http://localhost/xxx/rest/default/...
0
votes
1
answer
576
views
Does not have accessor method M2
Getting this error: {"message":"Property "CustomerId" does not have accessor method "getCustomerId" in class "Magento\Customer\Api\Data\CustomerInterface".
...
0
votes
1
answer
2k
views
Create a REST API to get the data from the custom table in magento 2
I create a database table 'computergames' . Now the table display in postman by get request
0
votes
1
answer
47
views
Color Attribute not fetching in REST API of Magento 2.2.6
How to i get color attribute for the returned json from this end point https://cleopatraweb.com/rest/V1/orders/9495?
This the response of the request. I could not find color attribute for products.
{
...
0
votes
2
answers
338
views
Get Customer Name if its logged in otherwise return message in API Magento 2
I am trying to get the customer's name by POST Method API if it's logged in but when I hit the link the postman, returns the Customer's Name even if it's not logged in. Please take a look
CODE:
<?...
0
votes
1
answer
591
views
REST Api to get cart of anonymous user
As you know you can add products to the cart even if you're not logged in.
I need to retrieve what a user has added to the cart in a given browsing session. Then i need to edit it (add/remove to/from ...
0
votes
0
answers
426
views
Magento2 external api integration
I am currently working on a project which I need to call an external Api which has a bearer token. The Api endpoint comprises product information like SKU and Name which I need to save on Magento. ...
0
votes
1
answer
112
views
Magento 2.3 Disallow Post to /V1/Customers
I am battling spam accounts being generated via Magento's REST API for customers. Someone keeps hitting my site with Postman and dumping in hundreds of fake accounts. I have set Allow Anonymous Guest ...
0
votes
1
answer
277
views
Get list of orders with increment_id
I can use the Magento API (https://magento.redoc.ly/2.4.4-admin/tag/ordersid) to get a list of orders using the following endpoint: "rest/V1/orders/items".
However, this endpoint does not ...
0
votes
1
answer
33
views
How to connect two magento2 application
I have two magento2 application running which are M2(a) and M2(b), I want all product on M2(a) to be displaying on M2(b) automatically, I have created an Integration on M2(a) by going to admin->...
2
votes
0
answers
476
views
Magento 2, How to get and set of custom_attributes value for Rest API
API: /rest/V1/products?fields=items,total_count,search_criteria[page_size,current_page]&searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][...
0
votes
1
answer
2k
views
Get order by date and status filters in magento 2 with rest api
Get Orders details using rest API with filters status and date range in magneto 2.4
0
votes
0
answers
382
views
Magento 2: How To Create Product Progamatically Using Custom Rest API
I need to create a product using a custom Rest API. (this is my first time working on API). So to check API whether it's working or not I wrote the code below, API is working, now I need to give ...
0
votes
1
answer
431
views
Magento Custom API Product Attribute Not Saving
I have created a custom API to update 4 attributes of the product out of which only 2 are updating not others.
I have already created attributes and assigned them to a product and working properly ...
0
votes
0
answers
177
views
Extend API V1/products to put the not available products at the end
I want to display out of stock products at the end of the V1/products response.
So far I tried to create a plugin on Magento\Catalog\Api\ProductRepositoryInterface to override the getList method but ...
0
votes
1
answer
263
views
How to add new fields to M2.4.2 CMS REST API response?
How would I go about adding new custom fields I have created for CMS pages to M2.4.2 CMS REST API responses (and possibly even search/filtering)?
For example, if I want to add new fields to retrieving ...
0
votes
2
answers
57
views
Do a action before insert products by endpoint magento 2
I wanna make a verification before inserting products on my Magento 2.3 in the default endpoint.
Here is a sample:
I post a product on rest/default/V1/products endpoint, but I want to check if this ...
0
votes
0
answers
61
views
Magento 2 : How to Fetch Particular Product Category Name via API
I want to access specified product category information using API.
-1
votes
2
answers
1k
views
Magento 2 send data to an API
I would like to have data from Magento 2 dashboard shown in some visualization software and have found documentation from the other site about their API, but I can't find any information from Magento ...
0
votes
1
answer
754
views
Getting 400 bad request with GuzzleHTTP when trying to POST new product
I'm trying to use the /product endpoint but keep getting
`400 Bad Request` response:
{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{...
0
votes
1
answer
717
views
Magento2.3.4 different hours in REST API call GET Orders and the real order hour timezone
I have selected Timezone (Configuration->General->Locale Options)
Central European Standard Time (Europe/Warsaw)
Order 10004 has been created at:
Sep 21, 2021, 5:59:34 PM
When I send API ...
3
votes
0
answers
591
views
What is protect code used for?
We're working on a project where we're replacing our existing web store with a custom Magento integration.
We need a way for a guest customer to retrieve information about their order by following a ...
2
votes
1
answer
161
views
Magento 2: Create Invoice or Shipment with REST API with different date
I want to post a shipment and/or invoice into Magento 2 but put a different date than today's date using the HTTP Rest API. Is this possible and how would I accomplish this? When I include the ...
0
votes
1
answer
49
views
Magento2 Order Number different in REST API orders
I've changed my order number to 2000.
INSERT INTO magento.sequence_order_1 (sequence_value) VALUES ('2000');
Then change lenght of order number
<?xml version="1.0"?>
<config xmlns:...
0
votes
1
answer
680
views
Why my module API communication is blocked by my Magento 2.4?
My ERP module connects via API and sends 1k of the product's data when there are changes from my ERP side.
In the logs, I just see the message below and my stock hasn't been updated.
Web API is unable ...
0
votes
1
answer
194
views
Magento API to use to integrate ERP System
An ERP company asks you for recommendations which Magento API to use to integrate a client
It is expected that at times large amount of product and category changes will need to be pushed from the ERP ...