1. Overview
Two ways to order, with the same rules and the same result:
- API — your website or ERP sends a JSON order to
POST /v1/ordersand reads its status withGET /v1/orders/<ref>. - Email — fill in MDR's order form and email it to orders@mdrlighting.co.nz. You get a reply with the result.
Every order you send arrives at MDR as a draft. Our team checks and confirms it; nothing is reserved or shipped until then. Prices always come from your MDR pricelist, and all amounts are NZD excluding GST.
You can also send any order as a check only ("validate_only": true, or "Check only: YES" on the form): MDR answers
with prices and availability but places nothing. Use it while you build your integration.
2. Keys and access
- Ordering uses its own key (it starts
mdro_), separate from your stock-feed key. MDR issues it, shows it to you once, and keeps only a fingerprint: if you lose it, we issue a new one. - Send it only in the header:
Authorization: Bearer mdro_…. A key in the URL is refused. - Your key orders for your company only, and only the products your stock feed shows you.
- Limits: by default 10 orders a minute and 200 a day; status checks have their own, higher allowance. Over the limit you get
429withretry_after_seconds. Emailed orders have the same limits; an email over the limit gets a reply asking you to resend it later.
3. Place an order
POST /v1/orders Content-Type: application/json, at most 8 MB.
| Field | Required | Meaning |
|---|---|---|
po_number | yes | Your PO number, up to 50 characters (letters, digits, spaces, - _ . / #). It is how we recognise a retry: see §6. |
lines | yes | 1–100 lines: {"sku": "...", "qty": 2, "expected_price": 855.36}. qty is a whole number 1–9999. Each SKU once.
expected_price (optional, ex GST) is the price you expect; if ours differs we still take the order at our price and tell you. |
delivery | no | {"type": "dealer"} (default, to you) or a dropship address — §4. |
requested_date | no | YYYY-MM-DD, today or later (NZ time), within a year. |
notes | no | Up to 2000 characters for MDR's team. |
docket | no | Dropship only: your customer's docket as {"filename": "x.pdf", "content_base64": "..."}, a PDF up to 5 MB — §5. |
validate_only | no | true = check only, place nothing. |
{
"po_number": "PO-10432",
"requested_date": "2026-10-20",
"notes": "Please ring before delivery.",
"lines": [
{"sku": "EVEE100Z", "qty": 2, "expected_price": 855.36},
{"sku": "EVEP100WW", "qty": 1}
]
}
4. Dropship (deliver to your customer)
If your account is set up for dropship, send your customer's address and we ship to them directly. Invoicing stays with you.
"delivery": {
"type": "dropship",
"name": "Kim Lee", "company": "Lee Events",
"street": "1 Main Street", "street2": "", "suburb": "Gate Pa",
"city": "Tauranga", "postcode": "3112", "region": "Bay of Plenty",
"phone": "021 123 4567",
"instructions": "Leave at the side door"
}
name, street, city, postcode, region and phone are required; New Zealand addresses only.
region must be one of MDR's delivery regions (any capitalisation): Auckland, Bay of Plenty, Canterbury, Gisborne, Hawke's Bay, Horowhenua, Manawatu, Marlborough, Nelson, Northland, Otago, Queenstown, Southland, Taranaki, Tasman, Taupo/Rotorua, Waikato, Wanganui, Wellington, West Coast.
Courier pricing is matched by region, so an order with any other value is refused with the list above.
MDR never emails your customer: a customer email you send is not stored, and dispatch notices come to you.
Dispatch and tracking emails for a dropship go to where the order came from: for an emailed order, the
address it was sent from; for an API order, your company email on file with MDR. The response shows it as
delivery.dispatch_email.
We reply with only the ship-to name and town, never the full address.
5. Your docket (blind shipping)
Send your own packing slip as a PDF and our dispatch team packs it instead of anything MDR-branded. No docket: the parcel ships blind (nothing inside). A docket only applies to dropship orders.
6. Retries and duplicates
- Your
po_numberidentifies the order. Sending the same PO again returns the existing order with"duplicate": true— never a second order. So if a call times out, simply send it again. 409 in_progress: that PO is being placed right now; retry in a couple of minutes.409 in_doubt: an earlier attempt didn't finish cleanly and we are making sure it didn't go through; retry in 15 minutes.409 po_cancelled: that PO's order was cancelled (or removed) by MDR. Do not retry — the PO stays closed so a retry can never bring back a cancelled order. To order again, use a new PO number, or contact MDR's sales team.- An order that was rejected (e.g. an unknown SKU) frees its PO: fix it and send the same PO again.
7. The answer
201 for a placed order, 200 for a check or a duplicate. The same shape every time:
{
"request_id": 23, "status": "draft", "validate_only": false,
"po_number": "PO-10432", "order_ref": "S11045", "order_id": 11045,
"dealer": {"id": 12115, "name": "Your Company Ltd"},
"currency": "NZD", "prices_ex_gst": true, "total_ex_gst": 2158.45,
"requested_date": "2026-10-20",
"delivery": {"type": "dropship", "ship_to": "Kim Lee", "city": "Tauranga"},
"docket": {"received": true, "filename": "kim.pdf", "bytes": 61499},
"lines": [{
"line": 1, "their_sku": "EVEE100Z", "sku": "EVEE100Z", "name": "Chauvet DJ Eve E-100Z",
"matched_by": "sku", "qty_ordered": 2, "unit_price": 855.36, "line_total": 1710.72,
"expected_price": 855.36, "price_mismatch": false,
"qty_available": 2, "qty_remaining": 0, "remaining_supply": [], "qty_unscheduled": 0,
"expected_date": null, "availability_note": "Available now."
}],
"warnings": [],
"notes": "Availability is an estimate at the time of this response. Nothing is reserved until MDR confirms the order."
}
Availability is an estimate, not a reservation: qty_available is what we hold now; for the rest,
remaining_supply says whether it comes from supplier stock (with a lead_time) or an incoming shipment (with an
expected_date). qty_unscheduled is quantity with no date yet — we will confirm one.
Your part numbers. If you use your own SKUs, MDR can map them for you; each line shows both their_sku and our sku and name, so you can check every match.
8. Order status and tracking
GET /v1/orders/<ref> — ref is your PO number or our order reference (percent-encode it, e.g. # as %23).
Same shape as above, live from MDR's system, plus shipments:
"status": "confirmed",
"lines": [{"line": 1, "kind": "product", "sku": "EVEE100Z", "qty_ordered": 2, "qty_delivered": 2, "qty_outstanding": 0, ...},
{"line": 2, "kind": "freight", "name": "Freight", "qty_delivered": null, ...}],
"shipments": [{"reference": "TIKI/OUT/07138", "status": "shipped", "is_backorder": false,
"scheduled_date": "2026-10-05", "shipped_date": "2026-10-06",
"carrier": "NZ Post", "tracking_number": "00894210392927827885"}]
Order status: draft (waiting for MDR to confirm), confirmed, done, cancelled.
Shipment status: waiting, ready, shipped, cancelled. Dates are New Zealand dates.
You can see only your own orders placed through this API; anything else is 404.
9. Errors
| HTTP | error | What to do |
|---|---|---|
| 400 | validation_failed | errors lists each problem with its field, line and a message. Fix and resend. |
| 400 | unknown_sku | A SKU isn't available to your account; the whole order is refused, nothing was placed. When a code from your own range looks like a typo, that line's error carries suggestions (up to 3 codes, same model numbers only, first 10 unknown lines) and its message ends "Did you mean ...?". |
| 400 | invalid_json, invalid_body, key_in_url | Fix the request. |
| 400 | docket_without_dropship | A docket is only used for a dropship order: send it with a dropship delivery address, or leave it out. |
| 400 | dispatch_email_is_customer | Dispatch emails must come to you, never your customer, and this order would have sent them to your customer's address. Nothing was ordered: contact MDR. |
| 401 | unauthorised | Missing, wrong or disabled key. |
| 403 | ordering_not_enabled, dropship_not_enabled, creation_restricted,
dealer_unavailable, no_pricelist, key_not_linked | Your account isn't set up for this yet; contact MDR. |
| 404 / 410 | not_found / gone | No such order for your account / it no longer exists. |
| 409 | in_progress, in_doubt (retry later); po_cancelled (do NOT retry: new PO) | See §6. |
| 413 / 415 / 429 | too_large / unsupported_media_type / rate_limited | Smaller body / send JSON / wait retry_after_seconds. |
| 502 / 503 | order_refused / temporarily_unavailable, busy, pricing_unavailable | Our side; MDR is alerted. Retry later — retries are safe (§6). |
Inside validation_failed, each entry in errors has a code: required, invalid_type,
invalid_value, invalid_characters, invalid_date, invalid_email, in_past, too_far,
too_long, too_many, too_large, out_of_range, not_pdf, unsupported,
duplicate_sku (the same SKU on two lines: combine them) or ambiguous_sku (a code that matches more than one product: contact MDR).
10. Ordering by email
Download the MDR order form (.xlsx)
- Fill in the form: PO number, "Deliver to" (exactly DEALER or DROPSHIP; for DROPSHIP fill in the address), and your lines (SKU, quantity, optional expected price). "Check only: YES" checks without placing. A
.csvwith the same layout also works. - Email it to orders@mdrlighting.co.nz from an address MDR has registered for your account. For dropship, attach your customer's docket as one PDF.
- You get a reply with the same information as the API: placed as a draft (with prices and availability), checked only, or what to fix.
11. Testing your integration
- Use
"validate_only": truefreely: it checks everything and places nothing. - MDR can give you a key on a test account: orders placed with it become drafts that our team cancels; they are never confirmed or shipped.
- Tell us the email address you will order from, and we register it before your first emailed order.