{"openapi":"3.1.0","info":{"title":"SDS Business API","version":"2.0","description":"Authenticated ordering, quotation, payment status and delivery for human customers and their agents. Bearer keys are issued once. Customer output is available after release. Amounts use minor currency units (KES 100.00 = 10000)."},"servers":[{"url":"https://sds-agent-operations.sds-9991a64282bd.workers.dev"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/health":{"get":{"summary":"Worker liveness and deployed revision","responses":{"200":{"description":"JSON result. Errors use {error:string}."}}}},"/ready":{"get":{"summary":"Business database, schema and administrator configuration readiness","responses":{"200":{"description":"JSON result. Errors use {error:string}."},"503":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/catalogue":{"get":{"summary":"Services, roles and available delivery formats","responses":{"200":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/register":{"post":{"summary":"Create a customer workspace","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"organisation":{"type":"string"},"consent":{"type":"boolean"}},"required":["name","email","consent"]}}}},"responses":{"201":{"description":"One-time access_key; save privately."}},"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","format":"uuid"},"description":"Use a random UUID v4 to safely replay registration for 24 hours."}]}},"/v2/enquiries":{"post":{"summary":"Register and submit a website enquiry","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"organisation":{"type":"string"},"title":{"type":"string"},"service":{"type":"string"},"brief":{"type":"string"},"consent":{"type":"boolean"}},"required":["name","email","brief","consent"]}}}},"responses":{"202":{"description":"JSON result. Errors use {error:string}."}},"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/v2/projects":{"get":{"summary":"List your projects","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."}}},"post":{"summary":"Submit a project and receive a tracking resource","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"service":{"type":"string"},"brief":{"type":"string"},"input":{"type":"object"}},"required":["title","service","brief"]}}}},"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"202":{"description":"JSON result. Errors use {error:string}."},"400":{"description":"JSON result. Errors use {error:string}."},"401":{"description":"JSON result. Errors use {error:string}."},"403":{"description":"JSON result. Errors use {error:string}."},"409":{"description":"JSON result. Errors use {error:string}."}},"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/v2/projects/{id}":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"get":{"summary":"Status, quote, payments, messages and released JSON result with file links","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"404":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/projects/{id}/accept":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"summary":"Accept the exact current quote","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string"},"accepted":{"type":"boolean"}},"required":["quote_id","accepted"]}}}},"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"202":{"description":"JSON result. Errors use {error:string}."},"400":{"description":"JSON result. Errors use {error:string}."},"401":{"description":"JSON result. Errors use {error:string}."},"403":{"description":"JSON result. Errors use {error:string}."},"409":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/projects/{id}/checkout":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"summary":"Create a provider checkout for an accepted quote","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"503":{"description":"Online payments not connected; use SDS instructions."}}}},"/v2/projects/{id}/messages":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"summary":"Message SDS about a project","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}},"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"202":{"description":"JSON result. Errors use {error:string}."},"400":{"description":"JSON result. Errors use {error:string}."},"401":{"description":"JSON result. Errors use {error:string}."},"403":{"description":"JSON result. Errors use {error:string}."},"409":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/projects/{id}/files/{file_id}":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"Download an authorised deliverable; requires the same bearer token","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Attachment with MIME type, filename and SHA256 header."},"404":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/webhook":{"post":{"summary":"Subscribe your agent to signed completion events on an approved host","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":"string","minLength":32}},"required":["url","secret"]}}}},"responses":{"200":{"description":"JSON result. Errors use {error:string}."},"202":{"description":"JSON result. Errors use {error:string}."},"400":{"description":"JSON result. Errors use {error:string}."},"401":{"description":"JSON result. Errors use {error:string}."},"403":{"description":"JSON result. Errors use {error:string}."},"409":{"description":"JSON result. Errors use {error:string}."}}},"delete":{"summary":"Remove webhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/knowledge":{"get":{"summary":"List approved evidence sources","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."}}}},"/v2/projects/{id}/export":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"get":{"summary":"Export your project record and released result as JSON","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"JSON result. Errors use {error:string}."}}}}}}