SCM Mycroft Assistant

PAID
By mycroft
Updated 5 months ago
Business
-/10
Popularity Score
-
Latency
-
Success Rate

SCM Mycroft Assistant API Documentation

The customer is provided with the following procedure in order to work with the API:

  1. The customer creates two XML files. The first is titled “data.xml” and it contains information on balances, income, and expenditure. The second is “catalog.xml”. Files contains background information including: products transferred (for instance, between warehouses), purchases, sales, etc. This information can be customized.

After these files are created, they need to be packed in “data.zip” archive. The system accepts the data from the files only if they are correctly named. Double-checking the file names will provide optimum results. Samples of the upload files, along with a description, are presented in Section B.

  1. Once the files have been properly compiled and named, the customer accesses the server at https://i.mycroft2b.com and establishes a connection. This must pass HTTP Basic Authentication, and will, as long as the correct using login and password are entered as requested.

  2. Next, the customer sends a PUT request to the server, using the archive created at step 1. The address for this is: https://i.mycroft2b.com/api/Instances/[KEY]/Import. In the above address, [KEY] is the actual key provided at registration. The customer’s login and password are required at this point.

  3. You will know that your data has been successfully loaded by a response of “true.” An unsuccessful load will return a “false”.

  4. After the response is received, the connection is broken.

Manual Load:

You can manually load the data.zip file created at step 1 into Mycroft Assistant. To do so, you need to:

a) Log in to the system at https://i.mycroft2b.com using your login and password.

b) Open the menu at the right top and select “Preferences.”

c) In the “Data” section, click on the cloud and select the file you created at step 1 (or drag the file using the drug-and-drop approach)..

View API Details
PUT/api/Instances/[KEY]/Import
PUT/api/Instances/[KEY]/Import

Import data

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Code Snippet
unirest.put("https://mycroft-scm-mycroft-assistant-v1.p.rapidapi.com/api/Instances/[KEY]/Import")
.header("X-RapidAPI-Host", "mycroft-scm-mycroft-assistant-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://mycroft-scm-mycroft-assistant-v1.p.rapidapi.com/api/Instances/[KEY]/Import
Request Method: PUT
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.put("https://mycroft-scm-mycroft-assistant-v1.p.rapidapi.com/api/Instances/[KEY]/Import")
.header("X-RapidAPI-Host", "mycroft-scm-mycroft-assistant-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication