{"openapi":"3.1.0","info":{"title":"KAOS API","version":"1.0.0","description":"Externe Schnittstelle von KAOS (KAEMI OS). Authentifizierung: `Authorization: Bearer kaos_<prefix>_<secret>`. Schlüssel legen Administratoren in KAOS unter Einstellungen → API-Schlüssel an; die Rolle des Schlüssels (Leser, Mitarbeiter, Manager) bestimmt, welche Endpunkte er nutzen darf."},"servers":[{"url":"https://api-kaos.kaemi.app"}],"tags":[{"name":"Organisationen"},{"name":"Kontakte"},{"name":"Leads"},{"name":"Deals"},{"name":"Aufgaben"},{"name":"Notizen"},{"name":"Angebote"},{"name":"Artikel"}],"paths":{"/v1/organizations":{"get":{"tags":["Organisationen"],"summary":"Organisationen suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Organisationen"],"summary":"Organisation anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"label":{"default":"none","type":"string","minLength":1,"maxLength":60},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"billing_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address_extra":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"annual_revenue":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"employee_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"sevdesk_contact_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"sevdesk_customer_number":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"vat_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"linked_web_visitor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"latest_web_visit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"billing_person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"hr_entity_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"hr_register_type":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"hr_register_number":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"hr_court":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"hr_legal_form":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"hr_status":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"hr_registered_at":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"hr_capital":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hr_capital_currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"hr_purpose":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"hr_wz_codes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"hr_representatives":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}]},"hr_shareholders":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}]},"hr_synced_at":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["name"]}}}}}},"/v1/organizations/{id}":{"get":{"tags":["Organisationen"],"summary":"Organisation lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]},"patch":{"tags":["Organisationen"],"summary":"Organisation ändern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"billing_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address_extra":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"annual_revenue":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"employee_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"sevdesk_contact_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"sevdesk_customer_number":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"vat_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"linked_web_visitor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"latest_web_visit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"billing_person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"hr_entity_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"hr_register_type":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"hr_register_number":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"hr_court":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"hr_legal_form":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"hr_status":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"hr_registered_at":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"hr_capital":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hr_capital_currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"hr_purpose":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"hr_wz_codes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"hr_representatives":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}]},"hr_shareholders":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}]},"hr_synced_at":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"label":{"type":"string","minLength":1,"maxLength":60}}}}}}},"delete":{"tags":["Organisationen"],"summary":"Organisation löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/persons":{"get":{"tags":["Kontakte"],"summary":"Kontakte suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Kontakte"],"summary":"Kontakt anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"type":"string","minLength":1,"maxLength":120},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"job_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"label":{"default":"none","type":"string","minLength":1,"maxLength":60},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["first_name","last_name"]}}}}}},"/v1/persons/{id}":{"get":{"tags":["Kontakte"],"summary":"Kontakt lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]},"patch":{"tags":["Kontakte"],"summary":"Kontakt ändern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"type":"string","minLength":1,"maxLength":120},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"job_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"label":{"type":"string","minLength":1,"maxLength":60}}}}}}},"delete":{"tags":["Kontakte"],"summary":"Kontakt löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/leads":{"get":{"tags":["Leads"],"summary":"Leads suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Leads"],"summary":"Lead anlegen (Organisation oder Kontakt nötig)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"value":{"type":["number","string"]},"currency":{"default":"EUR","type":"string","enum":["EUR","USD"]},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["title"]}}}}}},"/v1/leads/sources":{"get":{"tags":["Leads"],"summary":"Lead-Quellen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}}}},"/v1/leads/{id}":{"get":{"tags":["Leads"],"summary":"Lead lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]},"patch":{"tags":["Leads"],"summary":"Lead ändern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"value":{"type":["number","string"]},"currency":{"type":"string","enum":["EUR","USD"]},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}}}}}}},"delete":{"tags":["Leads"],"summary":"Lead löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/leads/{id}/convert":{"post":{"tags":["Leads"],"summary":"Lead in einen Deal umwandeln","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deal_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["deal_id"]}}}}}},"/v1/leads/{id}/lose":{"post":{"tags":["Leads"],"summary":"Lead als verloren markieren","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lost_reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}}}}}}}},"/v1/leads/{id}/reopen":{"post":{"tags":["Leads"],"summary":"Lead wieder öffnen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/deals":{"get":{"tags":["Deals"],"summary":"Deals suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Deals"],"summary":"Deal anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"pipeline_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"stage_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manufacturer_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"value":{"type":["number","string","null"]},"currency":{"default":"EUR","type":"string","enum":["EUR","USD"]},"probability":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"expected_close_date":{"type":["string","null"]},"label":{"default":"none","type":"string","minLength":1,"maxLength":60},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["title"]}}}}}},"/v1/deals/{id}":{"get":{"tags":["Deals"],"summary":"Deal lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]},"patch":{"tags":["Deals"],"summary":"Deal ändern (auch Phase und Besitzer)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"pipeline_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"stage_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manufacturer_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"value":{"type":["number","string","null"]},"currency":{"type":"string","enum":["EUR","USD"]},"probability":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"expected_close_date":{"type":["string","null"]},"label":{"type":"string","minLength":1,"maxLength":60},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"doc":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"doc_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}}}}}}},"delete":{"tags":["Deals"],"summary":"Deal löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/deals/{id}/status":{"post":{"tags":["Deals"],"summary":"Deal gewonnen, verloren oder wieder offen setzen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","won","lost"]},"lost_reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["status"]}}}}}},"/v1/activities":{"get":{"tags":["Aufgaben"],"summary":"Aufgaben und Aktivitäten","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Aufgaben"],"summary":"Aufgabe anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contract_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"asset_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"deal_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"type":{"type":"string","minLength":1,"maxLength":60},"subject":{"type":"string","minLength":1,"maxLength":300},"note":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"due_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"done":{"type":"boolean"},"archived":{"type":"boolean"},"assignee_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["type","subject"]}}}}}},"/v1/activities/{id}":{"patch":{"tags":["Aufgaben"],"summary":"Aufgabe ändern oder erledigen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contract_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"asset_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"deal_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"type":{"type":"string","minLength":1,"maxLength":60},"subject":{"type":"string","minLength":1,"maxLength":300},"note":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"due_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"done":{"type":"boolean"},"archived":{"type":"boolean"},"assignee_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}}}}}}},"delete":{"tags":["Aufgaben"],"summary":"Aufgabe löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/notes":{"post":{"tags":["Notizen"],"summary":"Notiz anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contract_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"asset_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"deal_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["body"]}}}}}},"/v1/notes/{id}":{"patch":{"tags":["Notizen"],"summary":"Notiz ändern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["body"]}}}}},"delete":{"tags":["Notizen"],"summary":"Notiz löschen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"204":{"description":"Gelöscht"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/quotes":{"get":{"tags":["Angebote"],"summary":"Angebote suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"tags":["Angebote"],"summary":"Angebot anlegen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Angelegt"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"deal_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"recipient_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_extra":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_street":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"recipient_city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"recipient_country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"recipient_vat_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"recipient_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"customer_number":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"customer_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"quote_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"valid_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"discount_amount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"discount_note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"vat_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"type":"string","enum":["de","en"]},"intro_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"closing_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"free_text":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"currency":{"default":"EUR","type":"string","enum":["EUR","USD"]},"vat_mode":{"type":"string","enum":["standard","reverse_charge","exempt","small_business"]},"items":{"default":[],"maxItems":300,"type":"array","items":{"type":"object","properties":{"article_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"article_number":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"quantity":{"default":1,"type":"number"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"unit_price":{"default":0,"type":"number"},"discount_percent":{"default":0,"type":"number","minimum":0,"maximum":100},"discount_amount":{"default":0,"type":"number","minimum":0},"vat_rate":{"default":19,"type":"number","minimum":0,"maximum":100}},"required":["name"]}}}}}}}}},"/v1/quotes/{id}":{"get":{"tags":["Angebote"],"summary":"Angebot mit Positionen lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]},"patch":{"tags":["Angebote"],"summary":"Angebot ändern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"person_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"deal_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"recipient_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_extra":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_street":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"recipient_postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"recipient_city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"recipient_country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"recipient_vat_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"recipient_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"customer_number":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"customer_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"quote_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"valid_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"discount_amount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"discount_note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"vat_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"language":{"type":"string","enum":["de","en"]},"intro_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"closing_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"free_text":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"currency":{"type":"string","enum":["EUR","USD"]},"vat_mode":{"type":"string","enum":["standard","reverse_charge","exempt","small_business"]},"items":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"article_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"article_number":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"quantity":{"default":1,"type":"number"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"unit_price":{"default":0,"type":"number"},"discount_percent":{"default":0,"type":"number","minimum":0,"maximum":100},"discount_amount":{"default":0,"type":"number","minimum":0},"vat_rate":{"default":19,"type":"number","minimum":0,"maximum":100}},"required":["name"]}}}}}}}}},"/v1/quotes/{id}/pdf":{"get":{"tags":["Angebote"],"summary":"Angebots-PDF","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}},"/v1/quotes/{id}/status":{"post":{"tags":["Angebote"],"summary":"Angebotsstatus setzen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","sent","accepted","rejected","expired"]},"decision_note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["status"]}}}}}},"/v1/articles":{"get":{"tags":["Artikel"],"summary":"Artikel suchen und blättern","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"q","in":"query","description":"Suchtext","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]}},"/v1/articles/{id}":{"get":{"tags":["Artikel"],"summary":"Artikel lesen","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Validierung fehlgeschlagen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Schlüssel fehlt, ist ungültig oder widerrufen"},"403":{"description":"Die Rolle des Schlüssels reicht nicht"},"404":{"description":"Nicht gefunden"},"429":{"description":"Mehr als 600 Anfragen je Minute"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"kaos_<prefix>_<secret>"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"issues":{"type":"object","additionalProperties":{"type":"string"}}}}}}}