Lectronz API Reference

Version 1

The Lectronz API enables store owners to manage their orders and products through a JSON REST API.

WARNING: This API reference description is work in progress and is not guaranteed to be complete or accurate yet.

Introduction

All API calls must be authenticated with a API key, through "bearer authentication", by passing the following header in the request:

Authorization: Bearer {API_KEY}

So for example if the API KEY is l4PI3mLGW451UQMavfy3UVPd, then the following curl request would retrieve order number 3021:

curl -H "Authorization: Bearer l4PI3mLGW451UQMavfy3UVPd" \
     https://lectronz.com/api/v1/orders/3201

For API calls that expect as input a JSON object, it is also necessary to add the header `Content-Type: application/json`.

For example, the following curl request could be used to mark order 3021 as fulfilled:

curl -X PATCH -H "Authorization: Bearer l4PI3mLGW451UQMavfy3UVPd" \
     -H "Content-Type: application/json" \
     https://lectronz.com/api/v1/orders/3201