If you are connecting a Magento store, you need to perform additional steps within your Magento store. You will require administrative rights in order to perform the following instructions.
First, sign in to your Magento store’s backend. Depending on your installation, follow the steps for Version 1 or Version 2.
The steps below are for Magento Version 1
REST Role Setup
A security role needs to be configured inside of Magento that our account will use to transact on. From the SYSTEM menu, move your cursor over Web Services and select REST – Roles.
You will now see a list of roles. Select the + Add Admin Role button. Enter a role name e.g., BEX Shipping. Enter the password of the user currently logged in and then click Save Role at the top.
From the left-hand side menu, select the Role API Resources tab. Then, select all the permissions as shown below:
Navigate back to the Role Info tab and enter the password of the currently logged in user. Click Save Role.
User Setup
Next, we require a user account that we can use to authenticate ourselves and to also negotiate session tokens when connecting to your Magento store. From the SYSTEM menu at the top, move your cursor over Permissions and then select Users.
At the top of the list, click the + Add New User button. You should use your own judgement when providing the first name, last name and email addresses; we do recommend having it@bex.co.za as the email address.
For the Password field, we strongly recommending using a random password that consists of A-Z, a-z, 0-9, and symbols (e.g. !@#$%. It should be a minimum length of at least 20 characters.
Re-enter your account password in the Current Admin Password field. Next, we need to assign the required roles for this new user. Select the User Role tab on the left-hand side.
Select the radio option representing the role you want to assign to this user. For purposes of this example, we only have one security role called Administrator and that’s what we’ll assign.
Depending on your installation and the preferences of the customer, you might need to select a different role than the default Administrator one shown here.
Lastly, we need to assign the REST requirements enabling us to send requests to your store. Select the REST Role tab on the left-hand side.
Select the radio option representing the REST Role you created earlier on. For purposes of this example, we are assigning the BEX Shipping role as that’s what we created earlier on.
Ensure that you have entered your current account password in the Current Admin Password field on the User Info tab. Click the Save button.
OAuth Consumer Setup
The next step is to configure our account as an OAuth Consumer. This allows us to get the necessary session tokens required to communicate with your store. From the SYSTEM menu at the top, move your cursor over the Web Services menu and select REST - OAuth Consumers.
In the list of all the OAuth Consumers, click on the + Add New Consumer button. Give the consumer a name i.e., BEX Express and copy-and-paste the Key and Secret values to a temporary location (use notepad and make sure you know which one is the Key and which one is the Secret).
Again, you will be required to enter your account password in the Current Admin Password field. Click Save.
Rest Attributes
The very last step is to assign the required REST Attributes. From the SYSTEM menu at the top, move your cursor over Web Services and select REST – Attributes.
In most cases, the default and user-defined roles will be of an Admin type. This allows us sufficient privileges to access your store and process your orders. We only read your orders and only obtain information that is absolutely required to process the delivery.
Please ensure that the role you created earlier is of an Admin type.
Select the Admin entry in the REST Attributes grid. You will now be presented with a list of permissions that the Admin role has. Please ensure that the following items are selected, leaving any existing selections intact.
Click the Save button. You have now configured the required steps in Magento.
We can now proceed with entering the required information in Insight.
REST API ENDPOINT: Enter the full website address where you store is located, e.g. https://mystore.co.za.
API VERSION: You should specify 1 here.
TOKEN 1: Paste the value corresponding to the Key that you copied earlier.
TOKEN 2: Paste the value corresponding to the Secret that you copied earlier.
STORE NAME: This field should automatically be populated from the first page.
STORE WEB. ADDRESS: This field should automatically be populated from the first page.
MAGENTO ADMIN PART: Typically, and in default installations, this should be admin. You can confirm by signing into your store’s backend, and looking at the URL displayed in the address bar of the browser:
e.g. if your store URL is https://mystore.co.za/admin/orders you would enter admin here.
MAGENTO USERNAME: Enter the username of the user account you created earlier in Magento.
MAGENTO PASSWORD: Enter the password for the user account you created earlier in Magento.