Getting Started

The North Commerce Rest API is a robust api that gives you access to all parts of North Commerce's data on your store.

The purpose of the Rest API is to give you complete control over your North Commerce store, to create integrations, extend or build upon what we already have.

Making your first API request

The only requirement to make an API request is to have a WordPress instance running with North Commerce installed.

The URL for your WordPress site will be referred to in this documentation as the BASE URL. As of the writing of this documentation the path to access the North Commerce API is:

<BASE_URL>/wp-json/nc-data/v1/<table-name>/<id> (id is optional)

Inside of the North Commerce plugin settings you will see an auto generated list of all the tables and potential options for North Commerce.

Finding your tables

Inside of the API Docs of the North Commerce settings you will see every database table with a list of all their columns and the available GET & POST routes that you can make. This documentation lives inside of the North Commerce plugin so that the docs match the latest schema version of the database. Giving you the latest information because there is a chance these docs may get behind at times.

Let's test the api with products. Create a few products inside of North Commerce and open up postman

Type in your URL of your WordPress site and hit the products endpoint. Once you hit Send you should be able to see all of the available products in your North Commerce store.

Security

Inside of the API security is already baked in anytime you hit an endpoint you will only see the data you are suppose to see. More about admin access in Authentication section.

API Fundamentals

Inside of North Commerce there are 3 fundamental features that will help make your life easier.

  1. Security - This gives you access to data right out of the box without having to create tokens or api keys you are able to just get started immediately.

  2. Filtering - There will be use cases where you want more than to list all of your products, or just hit a single product id. You may want to get a specific product, or you may want to list products with a specific tag or category applied to it. This is all available with our built in filtering features.

  3. Expanding - If you have already looked at all of North's database tables you will notice that lots of the tables reference other tables. This enables us to have more control of our response body directly out of the box. You may want to get a single product, but you may want to reference all of the product options that the product has for various colors or sizes of this specific product. Instead of giving you this massive body of data with one single api request you are able to expand on that and add that information as needed. Keeping all of your response data fast and lightweight.

Click on the title of each fundamental to learn more

Last updated