call to replace anchor tags contains '/admin' in href

About APIs

The StoreHippo API is organized around REST. Our API has predictable, resource-oriented URLs, and uses message key HTTP response to indicate API success or errors. We use built-in HTTP features, like HTTP authentication which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by all API responses.

Authentication

StoreHippo REST API gives you access to the powerful StoreHippo platform from a programming language of your own choice. The authentication is done by passing the ACCESS key in the header of your the API URL. Access Key can be generated in the Advanced Settings >  Access Keys in the StoreHippo Admin Panel of your store.

Versioning

The current version is version 1. When we will make backwards-incompatible changes to the API, we will release new, dated versions.

Error Handling

Our API libraries will return the response in case of an error occurred. Error key will be present in API response of failed API.
Failed API response will look like

{
  "error": {
    "key": "error_message_key"
  },
  "data": "Api response"
}

How to call APIs

Using NodeJS SDK

Anyone can access the Storehippo API using storehippo-nodejs-sdk in nodejs language. See the detail documentation about sdk here.

Example:

var storehippo = require('storehippo-nodejs-sdk')({
    storename: "< your - store - name >",
    access_key: "< your - access - key >",
    version: "< version >"
});
var request = {
    entity: "your-entity-name",
    recordId: "_id_of_record",
    command : 'get'
}
storehippo.call(request, function (err, response) {
    if (err) throw err;
    console.log(response);
})

Using Curl

StoreHippo API can be accessed using CURL Command.

Example:

curl --header "access-key:access-key-value" http://storename.storehippo.com/api/1/entity/entity_name
 

Accessing APIs from Store Themes 

All StoreHippo themes use the angular framework. There is app service in StoreHippo theme to call the StoreHippoAPIi. First, inject the app service and call it methods.

Example:

// injecting app service
var $injector = angular.element("body").injector();
var app = $injector.get("app");

var request = {
    entity: "your-entity-name",
    recordId: "_id_of_record",
    command : 'get'
}
app.call(request, function (err, response) {
    if (err) throw err;
    console.log(response);
})
2019-02-01T10:12:29.543Z