{"openapi":"3.1.0","info":{"title":"Kabaido API","version":"1.0.0","description":"Org-scoped REST API. Authenticate with an API key from Settings > Integrations as `Authorization: Bearer kbd_...`. Keys carry scopes; each operation lists the scope it needs. All monetary amounts are integer minor units (pence/cents) with a currency code. Rate limit: 600 requests per minute per key."},"servers":[{"url":"https://kabaido.ai"}],"security":[{"apiKey":[]}],"paths":{"/api/v1/products":{"get":{"summary":"List products","description":"Scope: products:read. Keyset pagination ordered by SKU.","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Matches title, SKU and category"},{"name":"sku","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"next_cursor":{"type":["string","null"],"description":"Pass back as ?cursor= for the next page"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/products/bulk":{"post":{"summary":"Bulk upsert products","description":"Scope: products:write. Up to 10000 products per call, upsert by SKU, same validation as the import wizard.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["products"],"properties":{"schema_id":{"type":"string","format":"uuid","description":"Optional catalog schema for attribute coercion"},"products":{"type":"array","maxItems":10000,"items":{"type":"object","additionalProperties":true}}}}}}},"responses":{"200":{"description":"Upsert result","content":{"application/json":{"schema":{"type":"object","properties":{"upserted":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"reason":{"type":"string"}}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/quotes":{"get":{"summary":"List quotes","description":"Scope: quotes:read. Newest first.","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","sent","accepted","declined","expired"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"next_cursor":{"type":["string","null"],"description":"Pass back as ?cursor= for the next page"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/quotes/{id}":{"get":{"summary":"Get a quote with lines","description":"Scope: quotes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteWithLines"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/orders":{"get":{"summary":"List orders","description":"Scope: orders:read. Newest first.","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["confirmed","in_progress","fulfilled","cancelled"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"next_cursor":{"type":["string","null"],"description":"Pass back as ?cursor= for the next page"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/orders/{id}":{"get":{"summary":"Get an order with lines","description":"Scope: orders:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderWithLines"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/customers":{"get":{"summary":"List customers","description":"Scope: customers:read.","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Matches company and email domain"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"type":["string","null"],"description":"Pass back as ?cursor= for the next page"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Upsert customers","description":"Scope: customers:write. Up to 500 records, matched by external_id then email domain.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customers"],"properties":{"customers":{"type":"array","maxItems":500,"items":{"type":"object","required":["company"],"properties":{"company":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"external_id":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Upsert result","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/customers/{id}":{"get":{"summary":"Get a customer with contacts","description":"Scope: customers:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerWithContacts"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/requests":{"get":{"summary":"List requests","description":"Scope: requests:read. Request threads, newest first.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/RequestThread"}},"next_cursor":{"type":["string","null"],"description":"Pass back as ?cursor= for the next page"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a request","description":"Scope: requests:write. Opens a request thread from RFQ or enquiry text; the team sees it in Requests.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":100000},"title":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"url":{"type":"string"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/requests/{id}":{"get":{"summary":"Get a request with messages","description":"Scope: requests:read. Messages carry the block protocol verbatim.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestWithMessages"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"kbd_...","description":"Org API key from Settings > Integrations"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"title":{"type":"string"},"category":{"type":["string","null"]},"uom":{"type":"string"},"price_minor":{"type":["integer","null"],"description":"Minor units (pence/cents)"},"currency":{"type":"string"},"stock_qty":{"type":["number","null"]},"lead_time_days":{"type":["integer","null"]},"attrs":{"type":"object","additionalProperties":true},"status":{"type":"string"},"external_id":{"type":["string","null"]}}},"Quote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","declined","expired"]},"currency":{"type":"string"},"total_minor":{"type":"integer"},"customer_id":{"type":["string","null"],"format":"uuid"},"valid_until":{"type":["string","null"]},"sent_at":{"type":["string","null"]},"created_at":{"type":"string"}}},"QuoteWithLines":{"allOf":[{"$ref":"#/components/schemas/Quote"},{"type":"object","properties":{"subtotal_minor":{"type":"integer"},"discount_minor":{"type":"integer"},"vat_minor":{"type":"integer"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/QuoteLine"}}}}]},"QuoteLine":{"type":"object","properties":{"position":{"type":"integer"},"line_type":{"type":"string"},"description":{"type":"string"},"qty":{"type":"number"},"uom":{"type":"string"},"unit_price_minor":{"type":"integer"},"discount_pct":{"type":["number","null"]},"lead_time_days":{"type":["integer","null"]}}},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"status":{"type":"string","enum":["confirmed","in_progress","fulfilled","cancelled"]},"currency":{"type":"string"},"total_minor":{"type":"integer"},"customer_id":{"type":["string","null"],"format":"uuid"},"customer_po_ref":{"type":["string","null"]},"created_at":{"type":"string"}}},"OrderWithLines":{"allOf":[{"$ref":"#/components/schemas/Order"},{"type":"object","properties":{"subtotal_minor":{"type":"integer"},"vat_minor":{"type":"integer"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLine"}}}}]},"OrderLine":{"type":"object","properties":{"position":{"type":"integer"},"line_type":{"type":"string"},"description":{"type":"string"},"attrs_snapshot":{"type":"object","additionalProperties":true},"qty":{"type":"number"},"uom":{"type":"string"},"unit_price_minor":{"type":"integer"}}},"Customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"company":{"type":"string"},"website":{"type":["string","null"]},"email_domain":{"type":["string","null"]},"vat_number":{"type":["string","null"]},"payment_terms":{"type":["string","null"]},"currency":{"type":"string"},"external_refs":{"type":"object","additionalProperties":true},"created_at":{"type":"string"}}},"CustomerWithContacts":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"is_primary":{"type":"boolean"}}}}}}]},"RequestThread":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"last_message_at":{"type":"string"},"created_at":{"type":"string"}}},"RequestWithMessages":{"allOf":[{"$ref":"#/components/schemas/RequestThread"},{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_at":{"type":"string"}}}}}}]}}}}