API Plugin

API Plugin
4.5 51
This plugin provides a RESTful API for managing resources in nopCommerce.
2021-04-01T15:36:26.7187258Z
Free
Get extension You will be re-directed to the developer's website to download this plugin
Supported versions: 3.90 , 4.00 , 4.10 , 4.20
Created: October 20,2016
Last updated: January 09,2020
Description

This plugin provides a RESTful API for managing resources in nopCommerce. A resource is a data object that can be accessed via an HTTP request. The API allows you to “access your nopCommerce site’s data (resources) through an easy-to-use HTTP REST API”. The most recent version of the API (nopCommerce version 4.20), the resources include the following 7 nopCommerce objects:

  • Customers
  • Products
  • Products Categories
  • ProductCategoryMappings
  • Orders
  • OrderItems
  • ShoppingCartItems

With the nopCommerce API, you can perform any of the four CRUD actions against any of your nopCommerce site’s resources listed above. For example, you can use the API to create a product, retrieve a product, update a product or delete a product associated with your nopCommerce website.

The plugin also supports WebHooks.

For more information and source code you can visit the GitHub page: https://github.com/SevenSpikes/api-plugin-for-nopcommerce

Reviews
thanhtungo 3/19/2020 11:20 PM
You have a issue when call POST / PUT a customer
At line 256 of CustomerController.cs
//  FIXED
newCustomer.CustomerAddressMappings.Add(new CustomerAddressMapping { Address = address.ToEntity() });
// OLD
//newCustomer.Addresses.Add(address.ToEntity());
Was this review helpful? Yes0 / No0
Pavel_P 1/9/2020 11:17 AM
5nd part: Tested new import from IS MS3 to nopCommerce, including news and VAT.
I have prepared another quick video of a specific deployment/testing of
http://retromall.cz based on nopCommerce.
The video presents publishing of data from IS MS3 on the internet to the eShop:
https://youtu.be/aur1nqXxLlU
Was this review helpful? Yes0 / No0
AJ_Step1 9/9/2019 1:26 PM
Nop 4.2 Version Support
Hi,
Waiting for version 4.2

Any date for the release?
Was this review helpful? Yes1 / No0
Pavel_P 9/3/2019 9:46 AM
4nd part: CApp_TestApi. Export data from IS to open source e-commerce nopCommerce.
https://youtu.be/Pr_boRBWLLA

This section builds on my videos called CApp_TestApi, where the console is replaced by a real web service used by the IS to pass data to nopC.
Was this review helpful? Yes1 / No0
matthiasdollfuss 7/30/2019 9:57 AM
Update for 4.20
Hey there!

Is there a Version for NopCommerce4.20?

All the best
Was this review helpful? Yes2 / No0
[email protected] 7/22/2019 10:11 AM
ValueFactory attempted to access the Value property of this instance.
Some time I am getting same issue as Jensen and maxofpower.
When I restart server then everything work fine.
Could you please help to resolve this issue.

Following is the exception got from log:

System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at AutoMapper.Mappers.ConvertMapper.MapExpression(IConfigurationProvider configurationProvider, ProfileMap profileMap, PropertyMap propertyMap, Expression sourceExpression, Expression destExpression, Expression contextExpression)
   at AutoMapper.Execution.TypeMapPlanBuilder.MapExpression(IConfigurationProvider configurationProvider, ProfileMap profileMap, TypePair typePair, Expression sourceParameter, Expression contextParameter, PropertyMap propertyMap, Expression destinationParameter)
   at AutoMapper.Execution.TypeMapPlanBuilder.CreatePropertyMapFunc(PropertyMap propertyMap, Expression destination)
   at AutoMapper.Execution.TypeMapPlanBuilder.TryPropertyMap(PropertyMap propertyMap)
   at AutoMapper.Execution.TypeMapPlanBuilder.CreateAssignmentFunc(Expression destinationFunc, Boolean constructorMapping)
   at AutoMapper.Execution.TypeMapPlanBuilder.CreateMapperLambda(HashSet`1 visitedTypeMaps)
   at AutoMapper.TypeMap.Seal(IConfigurationProvider configurationProvider, HashSet`1 visitedTypeMaps)
   at AutoMapper.MapperConfiguration.Seal()
   at AutoMapper.MapperConfiguration..ctor(MapperConfigurationExpression configurationExpression)
   at Nop.Plugin.Api.AutoMapper.AutoMapperApiConfiguration.get_Mapper()
   at Nop.Plugin.Api.AutoMapper.AutoMapperApiConfiguration.MapTo[TSource,TDestination](TSource source)
   at Nop.Plugin.Api.MappingExtensions.CustomerDtoMappings.ToDto(Customer customer)
   at Nop.Plugin.Api.Services.CustomerApiService.GetCustomerById(Int32 id, Boolean showDeleted)
   at Nop.Plugin.Api.WebHooks.WebHookEventConsumer.HandleEvent(EntityUpdated`1 eventMessage)
   at Nop.Services.Events.EventPublisher.PublishToConsumer[T](IConsumer`1 x, T eventMessage)

Thanks
Ram
Was this review helpful? Yes0 / No0
Pavel_P 7/18/2019 12:51 PM
3nd part: CApp_TestApi, import categories, products, product/category mappings to Nop
The app includes new features for importing categories, products, product/category mappings.

the video shows how I proceeded in VS2017 and what is needed to make the import base

https://youtu.be/mYh9dQxV24I
Was this review helpful? Yes0 / No0
culeu 7/3/2019 9:27 AM
Tier price and ProductAttributeCombination not support?
Currently I have not seen support for tierprice and ProductAttributeCombination? Please help me!
Was this review helpful? Yes0 / No0
drummondit 6/25/2019 7:59 AM
Poorly Documented
The documentation for this plugin is poor. Just a little bit of effort would save many devs lots of time.
Was this review helpful? Yes0 / No0
clemens.nau 6/20/2019 3:37 AM
4.2 support?
Is there a version for 4.2?
Was this review helpful? Yes5 / No0
Pavel_P 5/6/2019 3:56 AM
2nd part: Call API from windows console (exe) and get Orders
I have also tested the following query strings, which may help someone:
1.example ?customer_id=2
2.example,created after  ?createdAtMin=2019-04-21T09:21:05
3.example,created before ?createdAtMax=2019-04-21T09:21:05
4.example,after the specified ID ?sinceId=4
5.example ?ids=4
6.example ?limit=2&page=1

you can watch my second video with this app:

https://youtu.be/N3FiL-Os2OU
Was this review helpful? Yes1 / No0
Pavel_P 4/28/2019 9:08 AM
Call API from windows console (exe)
My console application CApp_TestApi is used to test the nopCommerce API.
The app. includes features for loading products, clients, categories
and product mapping to the category. Products can also be exported to XML.

video:
https://youtu.be/wEezTHfsCuo
Was this review helpful? Yes1 / No0
manish.patil 3/13/2019 8:13 AM
Order Fetch and Tracking upload back
Can we fetch orders and upload tracking back to nopCommerce.
If any documentation available please suggest me.
Was this review helpful? Yes0 / No0
stevenZA 2/11/2019 5:31 AM
Brilliant
Avoided many headaches because of this plugin.
Was this review helpful? Yes1 / No0
khangtran 1/12/2019 1:24 PM
Excellent plugin
This plugin is very helpful for me.

And I want to say more about the issue when we checkout the plugin source code for Nop v4.0
We get the error message: "Plugin 'Api plugin'. Could not load file or assembly 'Microsoft.EntityFrameworkCore.Relational, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly"

Resolve:
At Nop.Web, right click on project and select "Manage NuGet package..." And then downgrade:
Microsoft.EntityFrameworkCore.Design to 2.0.1
Microsoft.EntityFrameworkCore.SqlServer to 2.0.1
Microsoft.EntityFrameworkCore.Tools to 2.0.1

Build and try to run again.

Thanks
Was this review helpful? Yes3 / No0
Jensen 1/2/2019 3:32 PM
Execption autofac? Nop3.90
We are having same issue as maxofpower.

ValueFactory attempted to access the Value property of this instance.
Was this review helpful? Yes0 / No0
techYogesh 12/24/2018 7:27 AM
How to use it with Nopcommerce username and password
Hi

We want to use this plugin for mobile application. And current authentication endpoint supports redirect url. So we want to change that default authentication endpoint. So how can we do that?
Was this review helpful? Yes2 / No0
pcook 11/16/2018 4:13 PM
Version 4.1? Swagger?
I've downloaded this and can connect via Postman but accessing the Swagger documentation results in a not found. Can you provide instructions how to connect successfully to Swagger or identify when this will be fixed?
Was this review helpful? Yes6 / No0
maxofpower 11/3/2018 5:14 AM
3.9 support , i get exception
website goes down and i get this exception :

ValueFactory attempted to access the Value property of this instance.
Was this review helpful? Yes0 / No0
tmanoharc 11/3/2018 4:49 AM
How to Get Access Token using Nopcommerce UserID and Password?
Right now sample client retrieves AccessToken using Authorization Code flow, for my needs, please let us know How to Get Access Token using Nopcommerce UserID and Password?
Was this review helpful? Yes1 / No0
Paradaim 10/20/2018 5:29 AM
Postman Test
How get Token from postman with username and password
Was this review helpful? Yes1 / No1
A manager responded to this review
Please read this post where it is explained - https://www.nopcommerce.com/boards/t/48824/how-to-test-nopcommerce-rest-api-provided-by-nop-template.aspx
feraree 9/25/2018 4:54 AM
Is there any plan for supporting 4.1?
Very helpful web api services.

Thanks you development team.
Was this review helpful? Yes0 / No0
rahul.balodi.cipl 9/18/2018 11:47 PM
Unable to install API Plugin
We tried installing API Plugin 4.0 with NOP Commerce 4.0, but while installing API Plugin, it crashes the visual studio. And restarting the NOP Commerce application gives us the error

"FileNotFoundException: Could not load file or assembly 'Nop.Plugin.Api' or one of its dependencies. The system cannot find the file specified.

System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, string codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, ref StackCrawlMark stackMark, IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks) "

Please help us ASAP.
Thanks.
Was this review helpful? Yes0 / No0
sanjay-btc 9/11/2018 9:13 AM
Add support for 3.5
I want to customize and want to add support for nopCommerce v3.5.

Can you please tell me what needs to do for this?
Was this review helpful? Yes0 / No0
jkevlorayna 8/20/2018 3:01 AM
where it for the 4.10 version ?
not applicable in version 4.10?
Was this review helpful? Yes2 / No0
kkbv 7/30/2018 10:02 PM
Support for 4.1?
Hi,
We picked up 4.1 this weekend - do you have a roadmap to support 4.1 in the next few weeks? Or, could it be longer?

Regards,
kk
Was this review helpful? Yes3 / No0
kkbv 7/30/2018 10:02 PM
Support for 4.1?
Hi,
We picked up 4.1 this weekend - do you have a roadmap to support 4.1 in the next few weeks? Or, could it be longer?

Regards,
kk
Was this review helpful? Yes3 / No0
[email protected] 7/28/2018 9:23 AM
How can I use UserIdentity in this API
Hello,
Thanks for providing this beautiful Plugin.
I just wonder that how we can implement user identity in this project, so that we can identify user on each API method call.
There is already a folder named "IdentityServer" but I don't know it is for User Identity or anything else.

Could you please help me here how we can Implement Microsoft.AspNetCore.Identity (IdentityUser) or any other option to achieve this?

Thanks in advance
Ram
Was this review helpful? Yes0 / No0
kleberapsilva 5/4/2018 12:05 AM
Very Bice
Very Bice
Was this review helpful? Yes0 / No0
ApoorvaSrivastava 4/24/2018 3:33 AM
API plugin 4.0 is not working properly
Hi,
I am using NOPCommerce 4.0 along with API plugin 4.0 provided by the same link.
After adding the api plugin I am not able to add any controller in Nop.Web and if I add controller from another project it starts to giving a dependency injection exception.

Plugin 'Api plugin'. Could not load file or assembly 'Microsoft.EntityFrameworkCore.Relational, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly

I tried everything from my side but couldn't find any solution,  if I unload the api plugin project it starts working properly.
Was this review helpful? Yes0 / No0
[email protected] 4/18/2018 7:51 AM
How to use this API for windows and mobile application
Hi,
I want to know how to use these APIs for desktop and mobile application, because it uses "Callback Url" while we create client at Admin.
In case of mobile and desktop application the "Callback Url" will be changed for every time when new user will use my desktop/mobile application.

Please help me.
Thanks in advance.
Was this review helpful? Yes0 / No0
dwarapudi 3/27/2018 4:39 AM
NOP API plugin conflicting with Google API
Hi, we tried to install this plugin and it conflicts with Google API and receiving Internal Server Error.

An error occurred while starting the application.
.NET Framework 4.7.2563.0 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.0.0-rtm-26452    |    Microsoft Windows 10.0.14393
Was this review helpful? Yes0 / No1
A manager responded to this review
What do you mean by "Google API" and how exactly it conflicts with it?

p.s: We have already replied to your issue in GitHub
jitendrapatidar07 2/17/2018 2:40 PM
api-plugin-for-nopcommerce 3.9
i have jitendra patidar i have install api plugin but not use api api/product please help me
Was this review helpful? Yes0 / No0
RohitasBehera 1/19/2018 5:51 AM
is 4.0 rest api out ??
is 4.0 rest api out ??
Was this review helpful? Yes0 / No0
A manager responded to this review
Version 4.00 has been released
[email protected] 1/14/2018 10:34 PM
Nopcommerce 4.0
Hi,
Waiting for version 4.0

any specific date for the release?
Was this review helpful? Yes0 / No0
A manager responded to this review
Version 4.00 has been released
[email protected] 12/31/2017 2:52 PM
will it support multiple stores
Will this Extension support multi store?
Was this review helpful? Yes1 / No0
sumit20 12/29/2017 1:33 AM
Installation on version 4.
I am new to nopCommerce please help me how can i install this plugin on nop.
Was this review helpful? Yes0 / No0
aswaaq 12/26/2017 6:06 AM
Access API from Android app
This is an amazing Feature.
Any Documentation available to access the API from android Application.
Thank you
Was this review helpful? Yes0 / No0
AxelAndersen 12/12/2017 9:38 AM
API for version 4.0
Hi

I am running nopCommerce 4.0. Is there an API plugin for that?
Was this review helpful? Yes1 / No0
A manager responded to this review
We are currently working on the upgrade to 4.0 but a lot of libraries that we used as not supported yet in ASP.NET Core and we are working on alternative solutions. We hope we will be able to release a compatible version before the Christmas holidays.
jShehab 10/29/2017 2:21 AM
Customer Login
Thank you very much for the great plugin..

Is there an endpoint to authenticate the customer by his login Id and password?
Was this review helpful? Yes1 / No0
jShehab 10/29/2017 2:21 AM
Customer Login
Thank you very much for the great plugin..

Is there an endpoint to authenticate the customer by his login Id and password?
Was this review helpful? Yes0 / No0
A manager responded to this review
Currently such authentication is not supported in the API plugin.
DanielaM 10/11/2017 3:57 AM
Excellent for ERP integration
This plugin is EXCELLENT, very useful to sync nopCommerce with ERP systems. It is, however, not complete and a little outdated. Download the source code and sample application from GitHub to add missing code.

- - -

MY PERSONAL EXPERIENCE

I used it for a customer that has been running a physical store for years and has only recently asked me to create the eCommerce site.
He already has a highly customized ERP system for maintaining commerce data, with more than 300 tables, including products and customers.
So although nopCommerce has a wonderful Admin panel he considered it an overhead maintaining two systems and asked me how long it would take to build an automatic one way sync mecchanism from his ERP to NopCommerce, for now constantly updating product prices and quantities.
I said I honestly didn't know, I'd take one day to do some analysis, see what plugins were available and give him a more precise estimate by the end of the day.
Luckily I found this amazing plugin, downloaded the source code and accompanying sample. The API is easy to change as you simply mimic the database structure to provide any missing functionality. The sample is tougher as it's very basic, but it does show how to call the API functions and how the token authentication mechanism works.
This is what I personally did:
1) Copied the sample MVC web application on a server on the intranet with IIS and created a CNAME record so that it could be accessed as http://nopSync
2) Gave it the same "look and feel" as the nopCommerce Admin panel by doing "view source" and referencing most of the same css files
3) Removed the login form and session variables, hard coded credentials in web.config and automatically authenticated on load  
4) Used a SQL script to insert SKU and Manufacturer for all nopCommerce products. These two combined fields were my key to uniquely match products between the two systems
5) The api provides a "list" function to select all products but updates are performed one by one.
I could have read all the products and then with a loop accessed the ERP system each time, checking the price and quantity and updating nopCommerce if there were differences.
However, I considered it more performant to read all the nopCommerce data into a local database PRODUCTS table with a DoesItRequireUpdating flag by default equal to false.
The benefit of this was that the ERP system would only be accessed once. With a single query on the PRODUCTS table using a JOIN on ERP database tables I was able to update PRODUCTS prices, quantites and flags and subsequently call the update API once for each product with flag set to true.
6) I allowed for both manual and automatic syncronization. Manual by inserting a link to http://nopSync in the Admin panel menu and automatic by using a scheduled task to repeatedly call the web sample.

When the customer asked me, at the end of the day, how many days it would take to build the ERP syncronization, I said that thanks to SevenSpikes API plug it was online and syncronizing. Thanks SevenSpikes!!
Was this review helpful? Yes7 / No0
a.m. 8/21/2017 6:17 AM
Very useful
Maybe, the most useful plugin (API). Recommended by nopCommerce team!
Was this review helpful? Yes2 / No0
m.amer 7/21/2017 7:32 PM
Would you provide us how to call the API or use it?
Would you provide us how to call the API or use it?
Was this review helpful? Yes0 / No0
A manager responded to this review
Please refer to the Sample Application - https://github.com/SevenSpikes/nopCommerce-Api-SampleApplication

It shows you how to authorize and make calls to the Api
m.amer 7/20/2017 2:32 AM
what about using this plugin version with 3.6?
what about using this plugin version with 3.6?
Was this review helpful? Yes0 / No0
A manager responded to this review
The plugin is available only for nopCommerce 3.7 and above.
surgum 4/1/2017 3:39 AM
Where is the 3.9 version
Is there a version for 3.9?
Was this review helpful? Yes0 / No0
Figmo 2/11/2017 1:24 PM
Must have if integrating custom software to your store
Wow - this plugin rocks!  

Plus, the source code gives you a great place to expand it to do things it doesn't already do

I've already added GenericAttribute support and Search in product name/descriptions.

Worth it even at 100 times the price! <wink>
Was this review helpful? Yes0 / No0
easyalioglu 1/24/2017 3:53 AM
Thanks for the free plugin
Thanks for the free plugin.
Was this review helpful? Yes0 / No0
khalil_sandilkar 11/28/2016 12:11 AM
Very Useful
Very Useful Plugin.
Was this review helpful? Yes0 / No0
vixu1128 11/23/2016 1:26 AM
great thanks
It's helpful for us
Was this review helpful? Yes0 / No0
a.m. 11/22/2016 10:35 PM
Great plugin
This is a really very good plugin! Very useful (for any kind of integrations). And it's free! Recommended by nopCommerce team!
Was this review helpful? Yes7 / No0