API

Mybusiness is proud to introduce its API,which is now available to all Mybusiness users. Below is an example that will show you how to access Mybusiness API and what it can be used for.

No data was found

Mybusiness is proud to introduce its API,which is now available to all Mybusiness users. Below is an 

example that will show you how to access Mybusiness API and what it can be used for. 

Users can connect to the Mybusiness database with the API by using the following: 

Example (NodeJS) 

As you can see, the URL (https://api.mbapps.co.il/parse/), user App ID, user name and password are necessary to access the API. 

Since each user must use his/her own individual App ID, please contact us at support@ mybusiness-crm.com to receive your ID.

Note: The username and password will have the same permissions as are set for their role in the database. 

We will continue with the example of the table “Cars” that we have been using until now, with the fields “car_model” and “car_year”. 

// library to create http(s) request

const request = require("request");

const SIMBLA_URI = "https://api.mbapps.co.il/parse/";

const APP_ID = "Your App_Id";

const USER = "UserName";

const PASSWORD = "Password";

let session, newCarsObjectId;

function login() {

  return new Promise(function(resolve, reject) {

      let options = {

           url: SIMBLA_URI + "login",

           headers: {

               'X-Parse-Application-Id': APP_ID

           },

          json: true,

          body: { username: USER, password: PASSWORD }

      };

     request.get(options, function(err, r, response) {

         if (err)

                reject(err)

         else if (response.error) {

             reject(response)

         } else {

             console.log(response);

             session = response.sessionToken;

             resolve(response);

         }

     })

 })

}

function createCarsObject() {

 return new Promise(function(resolve, reject) {

     let options = {

         url: SIMBLA_URI + "classes/Cars",

         headers: {

             'X-Parse-Application-Id': APP_ID,

             'X-Parse-Session-Token': session

         },

         json: true,

         body: { car_model: "Audi", car_year: "2017" }

     };

     request.post(options, function(err, r, response) {

         if (err)

             reject(err)

           else if (response.error) {

             reject(response)

         } else {

             console.log(response);

             newCarsObjectId = response.objectId;

             resolve(response)

         }

     })

 })

}

//Here, note that the the URI is the regular Simbla URL plus the table in the database in 

//which you want to create an object (for example, Classes/Cars).

function getCarsObject(){

  return new Promise(function(resolve, reject) {

     let options = {

         url: SIMBLA_URI + "classes/Cars/" + newCarsObjectId,

         headers: {

             'X-Parse-Application-Id': APP_ID,

             'X-Parse-Session-Token': session

         }

     };

     request.get(options, function(err, r, response) {

         if (err)

             reject(err)

         else if (response.error) {

             reject(response)

         } else {

             console.log(response);

             resolve(response)

         }

     })

 })

}

function countCarsObjects() {

 return new Promise(function(resolve, reject) {

     let options = {

         url: SIMBLA_URI + "classes/Cars",

         headers: {

             'X-Parse-Application-Id': APP_ID,

             'X-Parse-Session-Token': session

         },

         json: true,

         body: { count: 1, limit: 0 }

     };

     request.get(options, function(err, r, response) {

         if (err)

             reject(err)

         else if (response.error) {

             reject(response)

         } else {

             console.log(response);

             resolve(response)

         }

     })

 })

}

function deleteCarsObject() {

 return new Promise(function(resolve, reject) {

     let options = {

         url: SIMBLA_URI + "classes/Cars/" + newCarsObjectId,

         headers: {

             'X-Parse-Application-Id': APP_ID,

             'X-Parse-Session-Token': session

         }

     };

     request.delete(options, function(err, r, response) {

         if (err)

             reject(err)

         else if (response.error) {

             reject(response)

         } else {

             console.log(response);

             resolve(response)

         }

     })

 })

}

login()

 .then(createCarsObject)

 .then(getCarsObject)

 .then(countCarsObjects)

 .then(deleteCarsObject)

 .then(countCarsObjects)

 .catch(function(err) {

     console.error(err);

 })

Everything you see above is already part of Mybusiness platform and ready for use. If you haven’t found the method that you’re looking for in the previous example, go to Rest API for additional information.

  *Note: There may be methods in Rest API that are not yet supported by Mybusinesss platform.

לא מצאת מה שחיפשת?
צור קשר עם התמיכה שלנו

מדריכים נוספים

grad1
guide_9916

הרשאות מתקדמות — סינון נתונים לפי משתמש

הרשאות מתקדמות מאפשרות לסנן את הנתונים ברמת הרשומה, כך שכל משתמש רואה רק את הנתונים הרלוונטיים אליו — למשל, נציג מכיר...
grad1
Guide 9915 Header Image

ניהול תפקידים והרשאות

מערכת התפקידים וההרשאות מאפשרת לכם לשלוט בדיוק מי יכול לראות, ליצור, לערוך או למחוק נתונים בכל טבלה ב-CRM — כדי לשמור...
grad1
Guide 9914 Header Image

ייצוא נתונים וגיבוי טבלאות

ייצוא נתונים מ-CRM מאפשר לגבות מידע, לנתח נתונים בכלים חיצוניים ולעמוד בדרישות רגולציה — כל זה בקלות ובמהירות. שמירה ...
grad1
Guide 9913 Header Image

ייבוא לקוחות ונתונים מ-CSV/Excel

ייבוא נתונים מ-CSV מאפשר להעביר מידע באופן מרוכז אל ה-CRM — בין אם מדובר בהגירה ממערכת קודמת, טעינת רשימת לקוחות חדשי...