Hemi Connectors / ItsPerfect Technical Scope / ItsPerfect Authentication , Database Structure & L

ItsPerfect Authentication , Database Structure & Limits

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Version Date Created / Updated Notes
v1.0 N/A Hristiyan First publish
v1.1 19/03/2024 Bogomil Add warehouse Table
v1.2 29/05/2024 Hristiyan Add extention attributes table

AUTHENTICATION

API Docs : https://www.itsperfect-solutions.com/api-v2

All endpoints need to be authenticated using an authentication token. The authentication token is passed in the URL, for example:

/api/v2/items/?token={token}

The auth token is provided by ItsPerfect.

The authentication is happening through a basic auth where ItsPerfect will provide us with an username and password. We need to include the user/pass in every call we make.

Database Structure

We want to create a table called ItsPerfect Connector where we will be storing all the needed information

Field Name Type Required Comment Default Value
Main Fields
Name varchar Yes Field for internal use to differentiate the ItsPerfect connectors.
Active checkbox No Flag indicating if the connector is active and based on this we can switch off and on the connector false
Username Encrypted Field Yes This is the username needed for the authorisation
Password Encrypted Field Yes This is the password needed for the authorisation
Auth Token Encrypted Field Yes The auth token provided by ItsPerfect
Settings
Create Orders checkbox No Flag indicating if we would like to export/create new orders on ItsPerfect false
Get Stock checkbox No Flag indicating if we would like to get stock from ItsPerfect and populate it in our location quantities false

<v1.2> We want to have a slave table of ItsPerfect Connector called “Extention Attributes”. The table should have twi field types - Name and Value of the attribute.Whatever is added for as Extension Attributes we want to include it in the payload when exporting orders in the main node. The idea is that we can add/remove attributes for the payload easily without having to hardcode anything. If we happen to have duplicate extention attribute that is included in the standard payload, we want to treat the attribute from the “Extention Attributes” table with priority </v1.2>

Next table will be Account ItsPerfect Connector which is a slave table of Account and will be used to connect with the ItsPerfect connector.

Field Name Type Required Comment
Connector Name dropdown Yes A dropdown list with all ItsPerfect connectors
Warehouse dropdown Yes A dropdown list with all the warehouses. Please see ItsPerfect Get Warehouses for more info

Third table is ItsPerfect ****Connector Locations ****- slave table of Location table where we basically map our locations with ItsPerfect Warehouse ID s so we will know how to update the stock in Hemi. Please note we want to be able to map only one ItsPerfect location mapped to our Location.

Field Name Type Required Comment
Warehouse dropdown Yes We need to get the warehouse via **GET warehouses** call and store the warehouse and ID. We then need to be pushing the ID as parameter when making GET stock call. (more info in the Get Stock page)
Connector dropdown Yes A dropdown list with all ItsPerfect Connectors

<v1.1>For the warehouses we will introduce a new table called ItsPerfect Warehouses

Field Name Type Required Comment
Warehouse Id int Yes The ItsPerfect warehouse id
Name varchar Yes The warehouse name
Active int Yes The warehouse status

</v1.1>

API USAGE LIMITS

The IT's Perfect API enforces a default limit of 750 requests per hour, calculated as the sum of client-side and server-side requests. If our app exceeds the initial limit, the app will start failing.

We want to add a check and try not to reach the limit of requests and we want to stop sending the requests for the hour instead of trying to request and receive errors.

Is this article helpful?
0 0 0