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.

Filter by
Sorted by
Tagged with
5
votes
2answers
31 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
2answers
50 views

Custom Rest API for custom table not wroking

My webapi.xml is below. <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"&...
1
vote
0answers
27 views

Cannot instantiate service class interface while running API in magento 2.3

THIS IS THE ERROR: "Fatal Error: 'Uncaught Error: Cannot instantiate interface SimplifiedMagento\\Custom2\\Api\\PositionRepositoryInterface in \/Applications\/MAMP\/htdocs\/Magento2_3\/vendor\/...
2
votes
2answers
36 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
20 views

Magento2: How to get invoice pdf as response through magento rest api?

I want to get the pdf invoice as response using magento rest api for mobile application. I got the invoice order history data My code: public function printInvoicePdf(Request $request) { echo "...
1
vote
0answers
12 views

SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)

I've created Custom Rest API endpoint which works fine on my local Magento instance but I'm getting an exception on the production server "#0 [internal function]: MMA\CustomApi\Model\PayPal\...
1
vote
0answers
13 views

async rest api product can't set `enable_qty_increments`

I would set up enable_qty_increments in my store. I've edit store settings cart options to manage this but when I try to use rest api to update my product always this request can't set options relate ...
1
vote
0answers
13 views

quoteCartRepositoryV1 serach by nested field

I would apply searchCriteria to /V1/carts/search in order to get all carts which contain specific sku. I've performed this query https://shop.dicanio.it/rest/all/V1/carts/search?[filterGroups][0][...
1
vote
0answers
13 views

How can we create partial shipment programmatically using rest api

I am looking to create a partial shipment to manage back order here is what I am looking. Customer place the below items Item1 qty 5 Item2 qty 10 Item4 qty 8 I wanted to ship the ...
1
vote
1answer
22 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....
0
votes
0answers
19 views

How to get all product details and sku using REST API in magento 2? using integration

<?php $productUrl='http:yourlUrl/rest/V1/products?searchCriteria[page_size]=20'; $ch = curl_init($productUrl); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, ...
0
votes
0answers
12 views

Magento 2 API Product Search by configurable Option Attributes like size, color

I'd like to be able to search products via the API. In my experiments, I am searching for a value of an configurable option attribute (e.g. drop-down size) For example: rest/V1/products?...
1
vote
1answer
86 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
19 views

call the custom event after Rest/v1 API call for create new product magento 2

Currently, we are using the nchannel to push and update the catalog product. We need to disable the item when they push the new item. After inserting the Qty and other information we manually enable ...
0
votes
0answers
17 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.
0
votes
0answers
16 views

How to create product using endpoint “/V1/products” by passing “show_default_notification_message” field in stock_item?

I am using endpoint /V1/products to create product. Request body: { "product":{ "id":0, "sku":"jitterjitter", "name":"jitterjitter", "attribute_set_id":4, "price"...
1
vote
2answers
46 views

direct sql query in custom module

I have created a new web API module, this API should execute a direct SQL query. This is the code: namespace Mymodule\ProductByEbayItemid\Model\ProductByEbayItemidQuery; class ...
2
votes
1answer
40 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
1answer
24 views

Cart Creation And store_id via REST API

I'm fairly new to Magento API (REST) and am trying to create a cart for an existing customer via admin API, update the cart and apply a discount coupon. So far I've hit two major issues: 1) I can't ...
0
votes
0answers
17 views

How to change/update payment information for order using REST API?

I've created an order (id=10) in Magento, I can verify that it exists by: GET /rest/V1/orders/10 which will respond with something like: { "entity_id": 10, "global_currency_code": "SEK", "...
0
votes
0answers
23 views

How to show Optional parameters in Swagger for Magento 2 custom REST API

I have created custom API with required parameters as: <route url="/V1/lorimcode/request/:reference/:amount" method="POST"> <service class="Vendor\Module\Api\...
0
votes
1answer
29 views

Unable to get Stock Item via REST API

I have a product with a very weird SKU (which is valid in Magento 2.3.2): Although, REST API requires using SKU as a part of URL to get the stock item info. How is it possible to use that SKU as a ...
0
votes
1answer
13 views

Issue with API bulk action using RabbitMQ

I'm using RabbitMQ with Magento Community 2.3.1 version to handle Bulk REST API actions to update products. That works fine. But sometimes, with same messages, one item of the bulk action is not ...
0
votes
0answers
13 views

Product thumbnail and color attributes in sales order rest api

I am using sales order rest api /V1/orders/ I am getting a response in postman but I want the product item image and color attributes also in response. How can i do this. any help?
0
votes
0answers
14 views

Create Gift Card Accounts using REST API without a cartID

Looking over the REST API reference in Magento2 here https://devdocs.magento.com/guides/v2.3/rest/list.html I see that cartID is required to create Gift Cards. GET /V1/carts/:quoteId/giftCards ...
0
votes
0answers
19 views

Magento Tax issue on checkout using Rest API

I am facing issue with tax on the checkout using magento 2 rest API. API always return tax amount 0 for all cart items. On web everything is working fine but getting issue with API. My magento ...
0
votes
1answer
20 views

Rest API error “ ”resources“: ”Magento_CatalogInventory::cataloginventory“”

I am trying to fetch the quantity with https:mydomain.com/index.php/rest/V1/stockItems/24-MB01 I got the following error : "message": "The consumer isn't authorized to access %resources.", "...
0
votes
0answers
18 views

Magento 2 - Custom Variables API

I was wondering if there is an API for the Custom Variables in Magento under System > Other Settings > Custom Variables. Going through the System > Integrations > API lists it as ...
0
votes
0answers
39 views

Magento2 : Not able to apply coupon code from checkout page

When I apply coupon code from the checkout page then I will get invalid routes error and when I have checked in the console request then I will get the 404 error from the API request. Coupon code is ...
2
votes
0answers
18 views

how to create custom api to get customer collection magento 2?

I am beginner to create API in magento 2. Can anyone help me step by step process to create custom api to get customer collection. Which is better REST & SOAP? Also, How can I test this custom ...
2
votes
1answer
28 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
0answers
9 views

How can I get the product list in descending order by the quantity of the product using REST API in Magento2?

I want to sort the product list by quantity using the REST API in magento2. I tried below endpoints : rest/V1/products&searchCritseria[sortOrders][0][field]=quantity_and_stock_status&...
0
votes
0answers
23 views

Update order status via API

I need to build module that should update the order status via API with tracking number , qty shipped etc.. I have the basic API module but I am stuck with how to update the data Any help is ...
0
votes
1answer
26 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
15 views

Having issue to add two attribute in product via Magento rest API

Dear Community Member, My question is how I can add more than two attributes in Magento configurable product. I am using Magento 2.2.1 rest API to add product everything going good except one issue. ...
0
votes
0answers
17 views

Magento 2 : Get custom comment in checkout page via API

I added a custom comment in the checkout page like this $installer->getConnection()->addColumn( $installer->getTable('quote'), 'delivery_comment', [ ...
0
votes
1answer
21 views

2.2 REST API change order STATE

Is it possible to change the order state via the REST API? My issue at the moment is that I have orders stuck in the Payment Review state and I can not Invoice/Cancel/Ship them via the back end or ...
0
votes
0answers
14 views

How to add multiple product with same product name using rest api

Any options to add multiple product with same name using rest api. I want to add multiple product with same name using api.
0
votes
0answers
28 views

How to place order using REST API and stripe payment method in Magento 2

I have used ReactJS for frontend and Magento2 for the backend. I have installed the "Stripe Payments" extension. https://marketplace.magento.com/stripe-stripe-payments.html How can I place the order ...
0
votes
0answers
18 views

Authentication type for API to be used by third party partners | Magento 2

We are creating an API in M2 enterprise edition to sell our giftcodes to a partner. The partner will have functionalities like: To have Store Credit Can buy giftcodes View buy history We cannot ...
0
votes
0answers
20 views

Create Product at Magento 2 Using REST in C#

I'm trying to create a simple Product by Rest API. Response.Status = Unauthorization I wonder if the installation or configuration of something is missing Here is my code public void CreateProduct()...
1
vote
0answers
32 views

How to get Custom Attributes in Carts Item REST API?

End Point: /rest/V1/carts/mine/ Added Custom Attribute Name: Unit Type: Dropdown Response: { "id": 10, "created_at": "2019-10-19 10:23:20", "updated_at": "2019-11-01 09:27:51", "is_active":...
0
votes
0answers
39 views

Magento 2.3.3 import images by API

I'm trying to send images by API but received an error "Fatal Error: 'Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes)' in '/var/www/virtual/example.com/hydro/...
0
votes
0answers
14 views

Other paths work, but inventory/ paths don't - Request does not match any route

I have many rest calls working to 2 different Magento 2.3 sites. However this one is giving the dreaded Request does not match any route error on just one of the sites (works fine on the other). http:...
0
votes
0answers
22 views

REST aPI SearchCriterea for Quantity

I try to get all active products with a quantity less then 5. I getall active products via V1/products/?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][...
0
votes
0answers
34 views

Magento 2 Rest API return multiple interface class

On the Magento 2, I want to custom return object on my custom rest API, I have code like this on the Hz\Clients\Api\TransactionInterface.php <?php namespace Hz\Clients\Api; interface ...
0
votes
1answer
16 views

Rest API for getting attribute option information

I want to get a list of all attributes. I know that domain.com/rest/V1/products/attributes/{{ATTRIBUTE_ID}}/options will grab an the attribute options, but how do i get a list of all attributes so ...
2
votes
2answers
270 views

Magento 2: Override for product custom option value Interface and model file

I have added custom product option value to below interface ProductCustomOptionValuesInterface.php and Value.php model file. File path: magento2/vendor/magento/module-catalog/Api/Data/...
0
votes
2answers
39 views

How to access all the rest api's in magento

I'm trying to build a flutter app from an existing magento store. How can I access the current REST API of the store? (I'm new to magento...)
0
votes
0answers
89 views

Magento 2: How to add extenstion attributes for the ProductCustomOptionValuesInterface

I need to add product custom added Customizable Options to the product Rest API. I have set that custom options to the below core Interface Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface ...