Custom Development / Puma UAE / OMSPro / OMSPro Authentication & Database Structure

OMSPro Authentication & Database Structure

Date Version Name Applied changes
1.0 Hristiyan First Publish

The authentication is rather simple as we are given client_id and secret_key which we use to obtain an bearer access_token which can be sent either as a parameter or into the request header’s Authorization with every call we make to OMSPro. Its up to the dev team to decide which method we want to use.

Authentication

OMSPro uses OAuth 2.0 for authentication. To make an API request, we need to send the client ID and client secret and encrypt the data with TSL/SSL.

API Call : GET https://{APIdomain}/omspro.com:{PortNo}/token?scope=all&grant_type=client_credentials&client_id={YOUR_CLIENT_ID}&client_secret={YOUR_CLIENT_SECRET}

Example call :

curl --location 'https://puma-test.openoms.net:8084/Token?client_id=143BC89B-F49D-4167-996D-E1F3116CF83A&secret_key=41AE5D9A-2401-4328-97FA-BBABE5DA0804'

Example response :

{
    "success": true,
    "message": "Get Token successfully",
    "error_code": 0,
    "data": {
        "token": {
            "access_token": "8D9F8B92-D874-4470-A39C-F5EF81429AB8",
            "token_expire_date": "2024-07-31T18:38:31.507"
        }
    }
}

From the response we need to cache the access_token and the token_expire_date. We want to make sure that we have a valid token before making any call. We don’t need to have the token visible in the UI so we can store it in cache.

Database

Additional tables will need to be created, however please note the structure and names are just suggestions.

OMSPro Connector - here we will be storing all the OMSPro details required from the connection to work and this is our starting point.

Field Name Type Required Comment Default Value
Main Fields
Name varchar Yes Field for internal use to differentiate the OMSPro connectors.
Active checkbox No Flag indicating if the connector is active and based on this we can switch off and on the connector false
client_id varchar Yes This is the client_id needed for the authentication. To be encrypted
secret_key varchar Yes This is the secret_key needed for the authentication. To be encrypted
Settings Separate tab
Create Orders checkbox No Flag indicating if we would like to export/create new orders in OMSPro false
Create Returns checkbox No Flag indicating if we would like to send returns to OMSPro false
Create Cancellations checkbox No Flag indicating if we would like to send cancellations to OMSPro false

Account OMSPro Connector - slave table for Account to connect with the OMSPro Connector.

Field Name Type Required Comment
Connector Name dropdown Yes A dropdown list with all OMSPro connectors (if more than 1)
Sales Channel varchar Yes This will be a field which we will use for the order create. We want it to be required as it is a required field for Create Orders call
Is this article helpful?
0 0 0