{"openapi":"3.1.0","info":{"title":"SupplySlate Agent Sourcing API","version":"1.0.0","description":"Agent-native B2B supply network for buyer-owned AI and purchasing systems. Submit non-sensitive sourcing requests, track their status, and retrieve normalized supplier offers. SupplySlate routes requests and structures commercial evidence; it does not operate the buyer's agent or place orders."},"servers":[{"url":"https://api.supplyslate.com","description":"Production agent API"},{"url":"https://sandbox.supplyslate.com","description":"Validation alias"}],"security":[{"bearerAuth":[]}],"paths":{"/health":{"get":{"security":[],"summary":"Check service and database health","responses":{"200":{"description":"Healthy"}}}},"/openapi.json":{"get":{"security":[],"summary":"Download this API contract","responses":{"200":{"description":"OpenAPI document"}}}},"/v1/categories":{"get":{"security":[],"summary":"List supply categories currently accepting agent requests","description":"The category configuration is editable and does not select a permanent winning vertical. Precise requests outside this list may also be submitted.","responses":{"200":{"description":"Current sourcing categories","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["code","name","summary","status","example_request","updated_at"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"status":{"type":"string","enum":["accepting_requests","building_supply"]},"example_request":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}}},"count":{"type":"integer"},"other_categories":{"type":"string"}}}}}}}}},"/v1/sourcing-requests":{"post":{"summary":"Submit a non-sensitive sourcing request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSourcingRequest"}}}},"responses":{"201":{"description":"Request accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcingRequest"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"Duplicate external_id"}}},"get":{"summary":"List the authenticated buyer's requests","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Request list"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/sourcing-requests/{request_id}":{"get":{"summary":"Read one sourcing request and its current status","parameters":[{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Request details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcingRequest"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/sourcing-requests/{request_id}/offers":{"get":{"summary":"Read normalized supplier offers for a request","parameters":[{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Offer list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"count":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/operator/requests":{"get":{"summary":"List requests in the manual operator queue","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Operator queue"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/v1/operator/requests/{request_id}/status":{"patch":{"summary":"Change request status","parameters":[{"$ref":"#/components/parameters/RequestId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/RequestStatus"},"note":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"Status updated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/operator/requests/{request_id}/offers":{"post":{"summary":"Add a normalized supplier offer","parameters":[{"$ref":"#/components/parameters/RequestId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOffer"}}}},"responses":{"201":{"description":"Offer created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"SupplySlate API key"}},"parameters":{"RequestId":{"name":"request_id","in":"path","required":true,"schema":{"type":"string","pattern":"^sr_[A-Za-z0-9-]+$"}}},"responses":{"BadRequest":{"description":"Invalid request body"},"Unauthorized":{"description":"Missing or invalid API key"},"Forbidden":{"description":"Operator role required"},"NotFound":{"description":"Resource not found"}},"schemas":{"RequestStatus":{"type":"string","enum":["received","clarification_required","ready_for_rfq","rfq_sent","offers_available","closed","unsupported"]},"CreateSourcingRequest":{"type":"object","additionalProperties":false,"required":["category","ship_to","data_classification","items"],"properties":{"external_id":{"type":"string","maxLength":100},"category":{"type":"string","minLength":2,"maxLength":80},"ship_to":{"type":"object","additionalProperties":false,"required":["country_code"],"properties":{"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"postal_code":{"type":"string","maxLength":20}}},"need_by":{"type":"string","format":"date"},"substitutions_allowed":{"type":"boolean","default":false},"data_classification":{"type":"string","enum":["public","commercial"]},"notes":{"type":"string","maxLength":2000},"items":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/RequestItemInput"}}}},"RequestItemInput":{"type":"object","additionalProperties":false,"required":["description","quantity","unit"],"properties":{"description":{"type":"string","minLength":3,"maxLength":1000},"manufacturer":{"type":"string","maxLength":200},"part_number":{"type":"string","maxLength":200},"equipment_make":{"type":"string","maxLength":200},"equipment_model":{"type":"string","maxLength":200},"quantity":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","minLength":1,"maxLength":40},"specifications":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}},"certifications":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":100}}}},"SourcingRequest":{"allOf":[{"$ref":"#/components/schemas/CreateSourcingRequest"},{"type":"object","required":["id","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/RequestStatus"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}]},"CreateOffer":{"type":"object","additionalProperties":false,"required":["supplier_name","currency","source_evidence","items"],"properties":{"supplier_name":{"type":"string","minLength":2,"maxLength":200},"supplier_email":{"type":"string","format":"email","maxLength":320},"quote_reference":{"type":"string","maxLength":200},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"valid_until":{"type":"string","format":"date"},"delivery_terms":{"type":"string","maxLength":500},"payment_terms":{"type":"string","maxLength":500},"warranty":{"type":"string","maxLength":1000},"notes":{"type":"string","maxLength":2000},"source_evidence":{"type":"string","minLength":3,"maxLength":2000},"items":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/OfferItemInput"}}}},"OfferItemInput":{"type":"object","additionalProperties":false,"required":["request_item_id","description","quantity","unit_price","stock_status","compatibility"],"properties":{"request_item_id":{"type":"string"},"description":{"type":"string","minLength":3,"maxLength":1000},"manufacturer":{"type":"string","maxLength":200},"part_number":{"type":"string","maxLength":200},"quantity":{"type":"number","exclusiveMinimum":0},"unit_price":{"type":"number","minimum":0},"minimum_order_quantity":{"type":"number","exclusiveMinimum":0},"stock_status":{"type":"string","enum":["in_stock","limited","backorder","made_to_order","unknown"]},"lead_time_days":{"type":"integer","minimum":0},"compatibility":{"type":"string","enum":["exact","compatible","alternative","unverified"]},"compatibility_confidence":{"type":"number","minimum":0,"maximum":1},"compatibility_evidence":{"type":"string","maxLength":2000},"shipping_price":{"type":"number","minimum":0}}},"Offer":{"allOf":[{"$ref":"#/components/schemas/CreateOffer"},{"type":"object","required":["id","request_id","status","subtotal","shipping_total","total","created_at","updated_at"],"properties":{"id":{"type":"string"},"request_id":{"type":"string"},"status":{"type":"string","enum":["quoted","withdrawn","expired"]},"subtotal":{"type":"number","minimum":0},"shipping_total":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/OfferItemInput"},{"type":"object","properties":{"id":{"type":"string"},"offer_id":{"type":"string"},"line_total":{"type":"number","minimum":0}}}]}}}}]}}}}