Reference specification

X-Cart uses Swagger to provide a formal definition of the public interface for its REST APIs. Swagger provides a very rich definition model for URL structures, request models, and response models, and has a very developed ecosystem of tools for use with API interaction, testing and client generation.

Download Swagger JSON

X-Cart Swagger .json file is not quite up to the standard because different resources are accessed through different query parameters, not different URI parts. The Swagger spec is really tight here and doesn't offer much options. If you load it into the Swagger Editor, it might show errors, hang up or even crash.

Using X-Cart API Definitions

The Swagger standard either requires a host to be provided, or for the host to be generated by the host serving the file, it is important to correct the host in the definition prior to employing any existing tools, as X-Cart provides an empty host parameter with the definition. The REST API host for each X-Cart store is unique and follows this pattern:


X-Cart v5.3.3.3 API can accept request parameters of these types:

  • application/json
  • application/x-www-form-urlencoded

By default, X-Cart outputs data in JSON format. You can also provide the Accept HTTP header to configure output data format. Valid types are:

  • application/json
  • application/xml