E-Com Plus is a robust and flexible cloud commerce software, totally based on REST APIs, providing a large library of methods and specifications to deploy any digital commerce operation easly

Graphs API is our public REST interface to Neo4j (graph database), our real-time recommendation engine, used to better implementations of products recommendations systems

Overview

All requests are proxy passed to Neo4j Transactional Cypher HTTP endpoint with predefined cyphers, varying only by the resource ID

This API pass only MATCH cyphers and the responses are the same as returned from Neo4j HTTP API, so you can read their documentation to get more info and examples

Host

Should be accessed from https://apx-graphs.e-com.plus/api/{version}/

Current version: v1

https://apx-graphs.e-com.plus/api/v1/

Note that every request must be with https (SSL)

All endpoints will end with .json:

https://apx-graphs.e-com.plus/api/v1/example.json

Verbs

VerbCRUDDescription
GETReadView object

Status Codes

Based on HTTP/1.1 Status Code Definitions:

  • 2xx - Successful
  • 4xx - Client error, must check the request
  • 5xx - Server error, report us and try again later

Format

Response body is formatted as JSON, always an object like the one below:

{
  "results": [
    {
      "columns": [
        "products.id"
      ],
      "data": [
        [ "{_id}" ],
        [ "{_id}" ]
      ]
    }
  ],
  "errors": [
  ]
}

Error Handling

404

{
  "status": 404,
  "error_code": -44,
  "message": "Page not found"
}

Incorrect URL paths (check API Host) or invalid resource ID, it must match the RegEx pattern [a-f0-9]{24}, being a valid 24 chars hexadecimal string

503

{
  "status": 503,
  "error_code": -53,
  "message": "Service unavailable (DDoS?), wait few seconds"
}

NGINX is blocking your requests for security reasons, please wait few seconds and try again

Server Limits

Responses are limited to 2 requests per IP per second, and 5 simultaneous connections per IP

In almost all cases you will not receive an error if you go beyond the limits, the response will only be delayed, but even so, we recommend that you create treatments in case you receive a 503 status code

See Also

Other REST APIs

  • Store: E-Com Plus Store API, with all store resources
  • Main: E-Com Plus Main API, with some public data about stores and channels
  • Search: Powerful text search API using Elasticsearch to find and suggest items (products) and terms

Getting Help

Feel free to get help or suggest alterations on GitHub repo or by e-mail [email protected]