REST API
- The acronym REST stands for Representational State Transfer, and it's a web service architecture.
- The REST API specifies the ways via which developers can send and receive requests and responses.
- We utilize it for a variety of purposes when we need to transfer JSON-based data from one application to another.
REST SERVICE SPECIFICATION
- Platform-agnostic which means it makes no difference whether the server is Windows, the client is Linux/Android, or something else
- Language-independent communication (C# can communicate with Java, for example).
- Based on industry standards (runs on top of HTTP).
- Even in the presence of firewalls, it is simple to utilize.
JWT(JSON Web Token)
- JSON Web Token (JWT) is a URL-safe way of describing claims to be exchanged between two parties in a concise format.
- The claims in a JWT are encoded as a JavaScript Object Notation (JSON) object, which can then be used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, allowing them to be digitally signed, MACed, and/or encrypted.
- Think of JWT as a simple way to convey information in a clear form (typically in the form of a URL) that can be trusted.
PRE-REQUISITES
- The plugin requires you to install the Nop-Station Core plugin first
INSTALLATION
- Download the nopStation Admin REST API Plugin from our store https://nop-station.com/customer/downloadableproducts
- Upload the NopStation.AdminAPI zip file using the "Upload plugin or theme" button

- Go to Administration, reload the 'list of plugins'. Install 'Nop-Station Core' Plugin first and then install 'Nop-Station Admin API'


- To make the plugins functional, restart the application

- Enable the plugin with the 'Edit' option and Configure it

API DOCUMENTATION
- Postman
- Download Postman Collection.
- Then, just import to the postman and select 'nopStation' environment.
NST Documentation
- We have used JWT as NST in our API/app. JSON Web Token (JWT) is a JSON-based open standard for creating access tokens that assert some number of claims.
- Check NST documentation on HOW TO CREATE NST TOKEN V2
CONFIGURE
- Go to Admin → NopStation → Plugins → Admin API → Configuration

Security
- Enable JWT security: Check the box to enable JWT Security. It will require 'NST' header for every API request
- Token key: Enter the JSON web token security key. (payload: NST_KEY)
- Token secret: 512 bit JSON web token secret
- Check IAT: Check the checkbox to issue 'At time' timestamp
App settings
- Android version: Enter the current android version published in Google Play Store
- Andriod force update: By marking it as checked, Android users will be forced to update their app when it will not match with the current version published in the Play Store
- Play Store url: Enter the Play store URL for your app
- iOS Version: Enter the current iOS version published in the App Store
- iOS force update: By marking it as checked, iOS users will be forced to update their app when it will not match with the current version published in the App store
- App Store url: Enter the App Store URL for your app
- Logo: Upload the logo to display on the mobile app
- Logo Size: Enter the size of the logo that you want to display