# RPG Guild order API for Model-Creator (v1) Base URL: the address you were given with your key. Format: JSON over HTTPS. Authentication: header "Authorization: Bearer ". You have two keys: a TEST key and a LIVE key. Orders sent with the TEST key are marked as tests, are never produced or shipped, and are visible only with the TEST key. ## 1. Create an order - POST /v1/orders Request body (all fields required unless marked optional): { "ref": "MC-100234", // your order number, 1-64 chars [A-Za-z0-9._-], must be unique "scale": "1/35", // "1/35" or "1/16" "stl_url": "https://.../file.stl", // https link, max 600 characters, must stay valid for at least 30 days "customer": { "name": "Jan Kowalski", "email": "jan@example.com", "phone": "+385911234567", "address1": "Street 1", "address2": "", // optional "city": "Zagreb", "postcode": "10000", "country": "HR" // ISO 3166-1 alpha-2 }, "quantity": 1, // optional, 1-10, copies of the same STL (default 1) "group": "DIORAMA-1041" // optional, 1-64 chars [A-Za-z0-9._-]; orders with the same // group and address are packed together and shipped once "replaces": "MC-100233" // optional, see section 5 (corrected file for a figure) } Diorama sets: send each figure as its own order (own ref, own STL) and give them the same "group". Two copies of one figure: send one order with "quantity": 2. Responses: 201 {"ref":"MC-100234","status":"received","test":false} 200 {"ref":"MC-100234","status":"...","test":false,"duplicate":true} // same ref sent again, nothing is created twice 400 {"error":"invalid_request","fields":["customer.country"]} 401 {"error":"unauthorized"} 429 {"error":"rate_limited"} // max 60 requests per minute per key 502 {"error":"upstream_error"} // nothing was created, safe to retry with the same ref ## 2. Check an order - GET /v1/orders/{ref} 200 { "ref": "MC-100234", "status": "received" | "in_production" | "problem" | "shipped" | "cancelled", "reason": null | "file error: ...", // only with status "problem" "group": null | "DIORAMA-1041", "requested": null | "hold" | "cancel", // a request of yours that waits for the workshop (section 6) "tracking": null | {"number": "LX0906...", "courier": "..."}, "updated_at": "2026-10-10T15:00:00.000Z" } 404 {"error":"not_found"} Status meanings: received order accepted, not started in_production supports prepared / printing / finishing. A failed print that is reprinted stays in_production, it is part of production. problem the workshop needs something from you (for example a file error), "reason" says what. Not final: it goes back to in_production once the problem is solved. shipped handed to the carrier, tracking is filled in. FINAL. cancelled the order will not be produced. FINAL. Status is refreshed about every 15 minutes. ## 3. Status push (optional) If you give us a callback URL we send a POST with the same JSON as GET /v1/orders/{ref} whenever the status or tracking changes. Header X-MC-Signature is the hex HMAC-SHA256 of the raw request body using the shared secret we give you. Answer with any 2xx code. If we get a different answer we retry at the next refresh. Each key can have its own callback URL (TEST and LIVE). Tell us both and we set them separately. ## 3b. Test the status path - POST /v1/orders/{ref}/simulate (TEST key only) Body: {"status":"in_production"}, {"status":"problem","reason":"file error"}, {"status":"cancelled"} or {"status":"shipped","tracking":{"number":"TEST123","courier":"DHL"}}. All five statuses work. Tracking and reason are optional, dummy values are used if you leave them out. The status of that TEST order is set and pushed to your TEST callback straight away. Returns the same JSON as GET /v1/orders/{ref}. With the LIVE key this answers 403. Simulated orders are never changed by our production systems. ## 5. Groups and corrected files GET /v1/groups/{group} returns every order of the group with its status: 200 {"group":"DIORAMA-1041","orders":[ ...same JSON as GET /v1/orders/{ref}... ]} 404 if unknown. A corrected file for a figure: send a NEW order with a new ref and "replaces": "". It must be an order of yours that exists (400 on "replaces" otherwise). The new order takes over the group of the old one unless you send another "group". The workshop is told which order it replaces, so the old file is not printed. Do not reuse the old ref (it would be a duplicate). ## 6. Hold, release or cancel - POST /v1/orders/{ref}/request and POST /v1/groups/{group}/request Body: {"action":"hold"} | {"action":"release"} | {"action":"cancel"} The group version applies the action to every order of the group. Possible until an order is shipped. The workshop is told straight away; the order shows "requested" until the workshop acts. The status changes (to cancelled) only when the workshop has actually stopped the order. 202 {"accepted":true,"action":"hold","orders":[ ... ]} 404 {"error":"not_found"} 409 {"error":"too_late","ref":"...","status":"shipped"} (already shipped or cancelled) 409 {"error":"not_on_hold"} / {"error":"cancel_already_requested"} 503 {"error":"workshop_notification_unavailable"} // nothing was recorded, safe to retry ## 7. Notes - The same ref sent twice, even at the same moment, creates one order: the second request gets the 200 "duplicate" answer. - customer.country must be a valid ISO 3166-1 alpha-2 code, otherwise 400. - The LIVE key uses the same base URL as the TEST key. - Prices are fixed by the agreement: 1/16 and 1/35 figures, one unique STL per order. We bill from the data you send, you do not send prices. - Do not send customer data other than the fields above. - GET /health returns {"ok":true} without authentication.