MDR Inventory API

Real-time stock availability · Base URL https://api.mdrlighting.co.nz

Authentication

Every request to /v1/products must include your API key. Two methods are accepted — use whichever suits your client:

1. Query parameter

GET https://api.mdrlighting.co.nz/v1/products?key=YOUR_API_KEY

2. Bearer token header

GET https://api.mdrlighting.co.nz/v1/products
Authorization: Bearer YOUR_API_KEY

Keys are issued to you directly. A key may be disabled or expire; in either case requests return 401. Keep your key secret — it identifies your account and controls what you can see.

GET /v1/products

Returns the products visible to your key, each with current on-hand availability grouped into the stock labels configured for your account.

Response fields

FieldTypeDescription
idintegerStable product identifier.
namestringProduct name.
skustring · nullableProduct SKU / internal reference.
last_updatedstringUTC timestamp the product was last modified.
sales_pricenumber · optionalUnit sales price. Only present if pricing is enabled for your key.
stockobjectAvailability by label, e.g. { "Available Immediately": 12 }. Keys are the stock labels configured for your account; values are summed on-hand quantities.

Example response

{
  "count": 2,
  "products": [
    {
      "id": 1423,
      "name": "Chauvet Maverick MK3 Spot",
      "sku": "CHV-MK3-SPOT",
      "last_updated": "2026-06-05 21:14:02",
      "sales_price": 4299.00,
      "stock": {
        "Available Immediately": 7,
        "On Request": 3
      }
    },
    {
      "id": 1610,
      "name": "Antari FT-200 Fog Machine",
      "sku": "ANT-FT200",
      "last_updated": "2026-06-04 09:32:51",
      "stock": {
        "Available Immediately": 0,
        "On Request": 15
      }
    }
  ]
}

GET /v1/status no auth

Lightweight health check for monitoring. No API key required.

{
  "api": "MDR Inventory API",
  "status": "ok",
  "timestamp": "2026-06-06T14:21:09+12:00"
}

The timestamp is New Zealand time.

Error codes

StatusMeaningBody
401Missing, invalid, disabled, or expired API key. { "error": "Invalid or expired API key" }
429Rate limit exceeded. Retry after the indicated number of seconds. { "error": "Rate limit exceeded", "retry_after_seconds": 30 }
500Unexpected server error while fulfilling the request. { "error": "Internal server error" }

Rate limits

Each key has a per-minute limit, a short burst allowance, and a daily cap. When you exceed a limit you receive 429 with retry_after_seconds indicating how long to wait before retrying. Build a small backoff into your client to handle this gracefully.