{"openapi":"3.1.0","info":{"title":"DRY7 public API","version":"1.0.0","description":"Bearer API key (`d7k_…`). A key acts as the member who created it, narrowed by its scopes. 120 requests per minute per key (X-RateLimit-* headers). Money is in minor units with an ISO 4217 currency. Webhooks: POST JSON {id, type, created, data} with header X-Dry7-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<body>\")>; reject old timestamps. Events: order.status_changed, payment.refunded, shipping.status_changed, courier.status_changed."},"servers":[{"url":"/api/public/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Scopes: orders:read, orders:write, customers:read, catalog:read, webhooks:manage"},"device":{"type":"apiKey","in":"header","name":"Authorization","description":"Device <token> (d7d_…)"},"line":{"type":"apiKey","in":"header","name":"Authorization","description":"Line <token> (d7p_…)"}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"errors":{"type":"object"}}},"Order":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"total_minor":{"type":"integer"},"currency":{"type":"string"},"created_at":{"type":"string"}}}}},"paths":{"/orders":{"get":{"summary":"Latest orders (max 100)","security":[{"apiKey":["orders:read"]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Orders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}}}},"401":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create an order (Idempotency-Key header required)","security":[{"apiKey":["orders:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":100}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"string"},"new_customer":{"type":"object"},"lines":{"type":"array"},"coupon":{"type":"string"},"promised_at":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"},"200":{"description":"Replay of the same key"},"422":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}":{"get":{"summary":"One order","security":[{"apiKey":["orders:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order"},"404":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/customers":{"get":{"summary":"Latest customers (max 200)","security":[{"apiKey":["customers:read"]}],"responses":{"200":{"description":"Customers"}}}},"/catalog":{"get":{"summary":"Current public price list","security":[{"apiKey":["catalog:read"]}],"responses":{"200":{"description":"Prices"}}}},"/devices/events":{"post":{"summary":"Device event (idempotent by event_id). Types: rfid.read, conveyor.position, locker.pickup, scale.weight, kiosk.checkin, terminal.status, terminal.payment","security":[{"device":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["event_id","type"],"properties":{"event_id":{"type":"string"},"type":{"type":"string"},"data":{"type":"object"}}}}}},"responses":{"201":{"description":"Recorded"},"200":{"description":"Replay"},"401":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/phone/events":{"post":{"summary":"Phone call event from a PBX / IVR line (idempotent by event_id). Types: call.ringing, call.answered, call.speech, call.ended. call.speech answers {reply, handoff} on AI lines.","security":[{"line":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["event_id","type","data"],"properties":{"event_id":{"type":"string"},"type":{"type":"string"},"data":{"type":"object","required":["call_id"],"properties":{"call_id":{"type":"string"},"from":{"type":"string","description":"Caller, E.164"},"text":{"type":"string"},"seconds":{"type":"integer"}}}}}}}},"responses":{"201":{"description":"Recorded"},"200":{"description":"Replay"},"401":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}