← Back to EcomCentral
NOPCOMMERCE SEVEN SPIKES REST API

nopCommerce Setup Guide

Connect your nopCommerce store to EcomCentral using the Seven Spikes API plugin with OAuth2 Bearer authentication.

About nopCommerce

nopCommerce is a popular open-source ASP.NET e-commerce platform used by thousands of merchants worldwide. EcomCentral integrates with nopCommerce via the Seven Spikes "API plugin for nopCommerce" (github.com/SevenSpikes/api-plugin-for-nopcommerce), an open-source plugin that provides OAuth2-secured REST endpoints for products, orders, customers, and more.

ℹ️ EcomCentral connects to the Seven Spikes API plugin at {store_root}/api. The plugin must be installed and configured in your nopCommerce admin before the connection will work.
⚠️ Tracking / Shipments: The Seven Spikes API plugin does not expose a shipment or tracking resource. The available resources are: Customers, Products, Categories, ProductCategoryMappings, Orders, OrderItems, and ShoppingCartItems. Manage shipments directly in the nopCommerce admin panel under Sales → Orders.

Prerequisites

Installing the Seven Spikes API Plugin

  1. Download the plugin from github.com/SevenSpikes/api-plugin-for-nopcommerce — make sure the release matches your nopCommerce version
  2. Copy the plugin to the Plugins/ folder of your nopCommerce installation
  3. Restart the nopCommerce application to discover the plugin
  4. In the nopCommerce admin, go to Configuration → Local Plugins and click Install next to the API plugin
  5. After installation, navigate to Configuration → API to access the plugin settings
⚠️ The plugin version must match your nopCommerce version. Using a mismatched version will cause startup errors or 404 responses on all API endpoints.

Obtaining an OAuth2 Access Token

The Seven Spikes plugin uses the OAuth 2.0 Authorization Code grant type. You must register a client application and complete the OAuth flow to receive a access_token (JWT Bearer token).

  1. In the nopCommerce admin, go to Configuration → API
  2. Click Add new client and fill in the application name, redirect URI, and other details
  3. Note the Client ID and Client Secret for the new client
  4. Run the OAuth 2.0 Authorization Code flow against {store}/oauth/authorize to receive an authorization code, then exchange it at {store}/token for an access_token
  5. Copy the access_token (a JWT) — this is what you enter in EcomCentral
✅ For a guided walkthrough of the OAuth flow, use the official sample application at github.com/SevenSpikes/nopCommerce-Api-SampleApplication. It handles the full OAuth dance and prints the access token for you.
⚠️ Access tokens expire. When EcomCentral returns a 401 error, re-run the OAuth flow to obtain a fresh token and update your connection credentials.

Connection Credentials

KeyRequiredDescriptionExample
base_url Required Full root URL of your nopCommerce store. EcomCentral appends /api automatically. Do not include a trailing slash or /api. https://mystore.com
access_token Required OAuth2 Bearer JWT token obtained from the {store}/token endpoint after completing the Authorization Code flow. eyJhbGciOiJSUzI1NiIs…
✅ Alternative key names accepted: baseUrl or url for the store URL; token for the access token.

API Endpoints Used

OperationMethodEndpoint
Test connectionGET/api/products/count
List ordersGET/api/orders?page=P&limit=N
Order countGET/api/orders/count
Order detailGET/api/orders/{id}
List productsGET/api/products?page=P&limit=N
Product countGET/api/products/count
Product detailGET/api/products/{id}
Update stockPUT/api/products/{id} with { "product": { "id": N, "stock_quantity": N } }
ℹ️ All requests use Authorization: Bearer {token}. List responses wrap items in { "orders": […] } or { "products": […] }. Count responses return { "count": N }. Single-item responses wrap in { "order": {…} } or { "product": {…} }. Errors return { "error": "…" } or { "errors": {…} }.

Order Statuses

nopCommerce uses string enum names (not numeric codes) for order, payment, and shipping statuses. EcomCentral displays them with colour-coded badges.

Order Status (order_status)

ValueBadge colour
PendingBlue
ProcessingBlue
CompleteGreen
CancelledRed
RefundedRed
PartiallyRefundedAmber

Shipping Status (shipping_status)

ValueBadge colour
NotYetShippedBlue
PartiallyShippedAmber
ShippedGreen
DeliveredGreen

Supported Features

FeatureSupportedNotes
View orders (paginated)Order ID, date, status, total
View order detailOrder/payment/shipping status, customer ID, billing & shipping addresses, order items with price, shipping method
View products (paginated)Product ID, SKU, name, price, stock quantity
View product detailFull product with type, weight, inventory method, short & full description (HTML stripped)
Update stock quantityBy product ID (not SKU) via PUT /api/products/{id}
Test connectionHits GET /api/products/count — confirms token and plugin are working
Add tracking / shipmentsNot supported — the Seven Spikes API plugin exposes no shipment or tracking resource. Manage shipments in the nopCommerce admin panel.
ℹ️ Stock updates use the product's internal nopCommerce ID (the numeric ID shown in the Products tab and in the nopCommerce admin), not the SKU. The Seven Spikes API plugin does not support SKU-based stock updates.

Troubleshooting

401 Unauthorized

The access token is expired or invalid. OAuth2 Bearer tokens issued by the Seven Spikes plugin have a finite lifetime. Re-run the OAuth Authorization Code flow to obtain a fresh access_token and update your EcomCentral connection credentials.

404 Not Found on all requests

The Seven Spikes API plugin is not installed, not active, or the base_url is wrong. Verify the plugin is installed and enabled under Configuration → Local Plugins. Also check that the store URL does not include a trailing /api path — EcomCentral appends that automatically.

Plugin version mismatch

The API plugin must be built for the same major version of nopCommerce that your store is running. If the plugin version does not match, the nopCommerce startup will fail or all API routes will return errors. Download the correct release from the plugin releases page.

Incorrect base_url

Enter only the store root URL — for example https://mystore.com. Do not append /api or any path segment; EcomCentral adds that automatically. A trailing slash is harmless and will be stripped.

🔧 Quick sanity check — visit https://your-store.com/api/products/count in a browser with an Authorization: Bearer {token} header (e.g. using a REST client). A 200 response with { "count": N } confirms the plugin is working and the token is valid. A 401 means the token is wrong or expired. A 404 means the plugin is not installed.