Questions tagged [api]

An application programming interface (API) specifies how some software components should interact with each other.

Filter by
Sorted by
Tagged with
6
votes
2answers
628 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?
1
vote
1answer
83 views

Magento 2 : issue with service class of API (Message: Notice: Undefined index: entity_id)

this is error: var//log/debug.log:[2019-12-10 10:59:36] main.CRITICAL: Report ID: webapi-5def7a98e911d; Message: Notice: Undefined index: entity_id in /Applications/MAMP/htdocs/Magento2_3/app/...
1
vote
0answers
123 views

Magento 2 REST API - Tax Rates for Taxable Products

For the purpose of testing I have setup a simple product with a tax class of 2 which I believe is Taxable Goods. I can see 2 test tax rates when using the api call /rest/V1/taxRates/search?...
2
votes
2answers
53 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
0answers
25 views

Magento 2 Braintree AVS check not working in REST API

Using this API https://www.domainname.com/index.php/rest/V1/carts/ mine/payment-information AVS and CVV verification are enabled at Braintree end but when credit card zip code and billing address zip ...
3
votes
2answers
130 views

Magento2 create Product API

I'm creating Product create / Edit API for admin. In product edit API some attributes are in custom_attribute section(most of newly create) some are in extension_attribute and remain are directly ...
1
vote
1answer
251 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....
1
vote
1answer
35 views

Turn API Return to Object PHP

My API returns a JSON that I would like to transform into a PHP object so that I can find a specific field in return. how can I do this? My get public function teste() { $requestUrl='http://...
4
votes
3answers
276 views

Magento 2 - Get product image url in API

I am creating custom API in magento 2 and I need to get image URL of product. I have used this code to get image URL: $imageUrl = $this->listProductBlock->getImage($product,"category_page_grid"...
2
votes
0answers
39 views

how to customize the Magento 2, Core API URL

I want to customize the magento 2 core base API URL. For example, If my magento base url is http://local.m233ee.com/rest/v1/ . As per my project requirement, i have to change the base URL to ...
2
votes
2answers
521 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
1answer
155 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 ...
0
votes
0answers
18 views

How to customize API in magento 2

I am trying to customize API's which are built-in with Magento 2. for example. I want to add some key-value pair in customer information (rest/V1/customers/me/) Thanks for Helping.
3
votes
1answer
188 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
0answers
24 views

Magento2 How to send SMS to customer when order placed succesfully

I'm using Magento version 2.2.5 How to Send SMS to the customer when order placed successfully. Please help me out on this. I'm using (PRP services SMS API) Thanks in advance.
2
votes
0answers
62 views

Magento 2: GraphQL V/S REST API [closed]

I am planning to build API's. Which is better GraphQl or REST API? How easy to customize either as per the developer perspective view? https://www.howtographql.com/basics/1-graphql-is-the-better-...
1
vote
0answers
37 views

Magento 2 : Show order items custom option text value in order api (/V1/orders/{id})

I want to show order products custom option in default magento 2 api rest/all/V1/orders/order_id run it looks like below as we know I need text value of the custom option in default single magento ...
0
votes
1answer
75 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. ...
1
vote
0answers
24 views

Is there any way to restrict API methods in Magento2?

I refer:http://vinaikopp.com/2017/02/18/magento2_repositories_interfaces_and_webapi/ So apart from that any other way possible to restrict API and also is it possible to restrict few methods in API ...
4
votes
1answer
55 views

Why API is not in every folder of default Magento folders? When Api is needed?

I already know the basic of API and its use, but in magento its confusing.(I am new in magento) if I am creating my module, I can get data from model/repository, that's means API is not required every ...
2
votes
1answer
45 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.
0
votes
1answer
190 views

How to Get All Product with pagination using REST API in magento 2?

Using REST API Get all product with pagination. In first page 20 product and second page 20 products ect...
0
votes
0answers
20 views

Cannot filter by created_at field in magento SOAP

Title says it all. The API can't seem to filter by product's created_at value. I am able to filter by any other value, especially the updated_at but not created_at. I have noticed that the particular ...
1
vote
1answer
63 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
0answers
28 views

Magento 2 API - Error when trying to update a product

In my debug.log I received this error [2019-11-05 14:04:34] main.DEBUG: cache_invalidate: {"method":"PUT","url":"https://example.com/rest/default/V1/products/attributes/...
0
votes
0answers
20 views

CategoryManagement class, how to move at top

I found a problem with a custom script in our Magento 2.3.3 installation. The custom script tries to order the categories. There is a usage of the move function from the CategoryManagement class. It ...
0
votes
0answers
14 views

Magneto 2 Rest API out of stock not working in search Criteria parameter

In searchCriteria Result items are empty while add stock parameter only in stock It get not any result in these param http://www.thepetstore.ae/rest/V1/products?searchCriteria[filterGroups][3][...
0
votes
1answer
30 views

Any suggestions of a Single Sign-On to users from external apps (Mobile) to Magneto 2?

The titles say it all. Is there any extension, or suggestions to add this feature to Magento 2 store? I want users to access the store from a 3rd-party mobile app. And from there, users will be able ...
0
votes
2answers
81 views

Magento2 : checkout_cart_product_add_after Event not working with API

I have created an observer on event "checkout_cart_product_add_after" and its working fine for web but not working with REST API.
0
votes
0answers
91 views

Magento 2.3.2 - Update product attribute option api duplicate option value

I'm trying to add and update product attribute options through the api endpoint: /V1/products/attributes/:attributeCode/options. When I try to update the values of an existing attribute option, the ...
0
votes
0answers
18 views

Magento soap api update product max qty

Update product inventory Max qty allowed in shopping cart using magento soap api, find the screenshot: we have tried with the below link, but its not working, useconfig checkbox not updating with ...
0
votes
1answer
288 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
0
votes
0answers
21 views

Reorder Issue - Placing order using API

The Reorder button does not appear when I am trying to place the order using API.I have checked the API using swagger even there the reorder variable is not set. how CAN i RESOLVE THE ISSUE
0
votes
0answers
18 views

Magento 2 : Change option_value of custom option via api

I took the order via API My problem is how to edit the option value of the custom option via API. hope you helps. Thank in advance.
0
votes
0answers
24 views

Order API Pre-set parameters

I have a custom module with it's own api requests, but I wish to create an alias to an Magento api request. My api path: GET /V1/orders/get-new which is a simple alias to Magento owns GET /V1/...
1
vote
1answer
48 views

Magento 2 change product description using API on every 5 seconds

I am working on Magento2, and I've to change my product description on every five minutes using the third-party API. Then I've 1laksh product in my Magento, so which approach is better to change the ...
2
votes
2answers
113 views

Update Cart Item quantity by customer quote id in custom API

I want to Update Cart Item quantity by customer quote_id in custom API. I have tried below code but it's not work with Magento 2.3 $quote = $this->quoteRepository->getActive($quoteId); ...
0
votes
0answers
26 views

The owl carousel is initialized before the module instagram and does not see the items

I have a block that displays pictures from instagram, he gets them using the library. https://www.mageplaza.com/magento-2-instagram-feed I have 6 elements in a row, I want to use them in a carousel ...
0
votes
2answers
65 views

How to programmatically reindex product after update ex. price/stock quantity

how to programmatically reindex product after update ex. price/stock quantity using Magento ver. 2.3.2 API via Swagger? I do application in C# which sync my system with Magento. I have a lot of ...
0
votes
2answers
30 views

How to Get API Paramter?

I use a custom API with Delete Method. I would get this paramter. { "id":"1" } How can i get it in my api response? etc/webapi.xml <?xml version="1.0"?> <routes xmlns:xsi="http://www....
1
vote
1answer
390 views

Custom Module API get CDATA Error

i got this error at localhost/rest/V1/hello/name/Jim. This XML file does not appear to have any style information associated with it. The document tree is shown below. <error> <messages> &...
3
votes
1answer
455 views

Magento 2: Authorize.Net: Transaction has been declined. Please try again later

I'm on Magento 2.3.2, Using Authorize.Net [sandbox] as my payment method, I'm unable to place order because I'm getting an error Transaction has been declined. Please try again later., I see my ...
4
votes
1answer
310 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 ...
0
votes
1answer
316 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
1answer
150 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
1answer
28 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:...
0
votes
1answer
41 views

Mageto 2: get custom attribute via rest api

I have a module "extra fee", I did get order info via rest api, but I don't see "extra fee", how can I get it? anyone help me. Thank in advance.
0
votes
0answers
20 views

External application - Magento 2 login

Do you know if it's possible to use the customer login that I have in my Magento 2 store in an external application? I would like to have one login database for all my applications. Thanks
1
vote
1answer
26 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
1answer
35 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.

1 2
3
4 5
32