API References

All our API's are documented on Postman as well. The whole collection can be downloaded from here

Go to Postman

What you need to know

We only support HTML, CSS, JavaScript and PHP for customization. Be sure to check the several example codes that we have by clicking on the dropdowns.

Hierarchy of users

When using an API, you should try to use it as the user who was intended to do the action.

For example:

  • Admins own the marketplace so they have control over almost everything and everyone else on the marketplace.

  • Merchants are the sellers of the marketplace. So they have control over their user information, their items/services that they are offering, and the transactions they want to do.

  • Buyers are the consumers, so they have control over only their information.

Tokens

We have an Authentication API that responds with an admin token and the Admin GUID (Globally Unique IDentifier). This takes sensitive information as input and returns admin token and GUID.

Tokens can also be obtained using the snippet below. If the code is running on client side, then it gets the user's token from the cookie stored locally. It is passed as a parameter using the Bearer + token method.

function getCookie(name){
     var value = '; ' + document.cookie;
     var parts = value.split('; ' + name + '=');
     if (parts.length === 2) {
         return parts.pop().split(';').shift();
     }
 }
 var token = getCookie('webapitoken');
 var settings = {
     "url": "", 
     "method": "", 
     "headers": { 
         "Content-Type": "",
         "Authorisation": "Bearer" + token
     }, 
     "data": ""
 };
 $.ajax(settings).done(function(response) { console.log(response); });
                           

User IDs

Admin, Merchant and Buyer ID's can be found by inspecting the page when logged in as each of them. The value of the userGUID is the ID used in APIs.

List of APIs

Was this article helpful?
13 out of 12 found this helpful