User Tools

  • (Use the same account as the official website)

Site Tools


api

LiteCart Public API

The official website and add-ons store have a public API currently offering read-only access to resources using REST and JSON.

Make a HTTP request to the following URLs:

Method Endpoint Pagination Search Filter Limit
GET https://www.litecart.net/api/releases Yes - Yes
GET https://www.litecart.net/api/releases/{version} - - -
GET https://www.litecart.net/api/addons Yes Yes Yes
GET https://www.litecart.net/api/addons/{id} - - -

Search Filter

Endpoints supporting search filter uses a HTTP GET query parameter like the following:

  https://...?query=my+search+string

Limit Results

Results can be limited to a desired number.

  https://...?limit=10

Pagination

Endpoints supporting pagination will return a header like the following:

  Link: <https://...?page=1>; rel=first, <https://...?page=1>; rel=prev, <https://...?page=2>; rel=next,<https://...?page=2>; rel=last

You can extract a pagination link using regular expressions:

  if (preg_match('#<(.*?)>; rel="?next"?#m', $headers, $matches)) {
    $next_link = $matches[1];
  }
api.txt · Last modified: 2021/07/18 03:50 by tim