{"openapi":"3.1.0","info":{"title":"WOI: ממשק לשרתים","version":"1","description":"שרת חיצוני מדבר עם WOI במפתח של החשבון, וכל בקשה חתומה. סכומים באגורות, כולל מע\"מ.\n\nהוצאה משימוש: שינוי ששובר שרת קיים נכנס רק בגרסה חדשה בכתובת (/v2), ו-/v1 נשאר לפחות 6 חודשים אחרי ש-/v2 עולה. פעולה שיוצאת משימוש מסומנת כאן (deprecated), ובתשובות שלה הכותרות Deprecation ו-Sunset. על שינוי כזה יוצא מייל לבעלים של כל מפתח פעיל."},"x-deprecation-policy":{"breaking_changes":"new_major_version","minimum_support_months":6,"headers":["Deprecation","Sunset"]},"servers":[{"url":"https://www.workonit.app/api/ext"}],"security":[{"woiKey":[]}],"paths":{"/v1/connection":{"get":{"operationId":"getConnection","summary":"מי אני: המפתח, הארגון, בדיקות או ייצור, התחומים והגבולות","security":[{"woiKey":[]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"המפתח תקין","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments":{"post":{"operationId":"createPayment","summary":"קישור תשלום (תחום payments)","description":"המצב הסופי ב-GET /v1/payments/{id} ובאירועים payment.succeeded ו-payment.failed.","security":[{"woiKey":["payments"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["client_ref","amount_total_agorot","description","customer","success_url","cancel_url"],"properties":{"client_ref":{"type":"string"},"amount_total_agorot":{"type":"integer","minimum":1},"description":{"type":"string"},"lines":{"type":"array","maxItems":100,"items":{"type":"object","required":["name","quantity","unit_price_agorot"],"properties":{"name":{"type":"string"},"quantity":{"type":"integer"},"unit_price_agorot":{"type":"integer"}}}},"customer":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"name":{"type":"string","maxLength":200},"phone":{"type":"string"},"tax_id":{"type":"string","maxLength":20}}},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"},"amount_net_agorot":{"type":"integer"},"vat_agorot":{"type":"integer"}}}}}},"responses":{"200":{"description":"תשלום שכבר נפתח","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"links":{"getPayment":{"operationId":"getPayment","parameters":{"id":"$response.body#/payment_id"}}}},"201":{"description":"תשלום חדש","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"links":{"getPayment":{"operationId":"getPayment","parameters":{"id":"$response.body#/payment_id"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}":{"get":{"operationId":"getPayment","summary":"מצב תשלום: המקור של המצב הסופי","security":[{"woiKey":["payments"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"subscription_id ו-period רק בתשלום של מנוי","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatus"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions":{"post":{"operationId":"createSubscription","summary":"מנוי: תשלום ראשון ושמירת כרטיס","description":"המצב הסופי של התשלום הראשון ב-GET /v1/payments/{id}.","security":[{"woiKey":["payments"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["client_ref","amount_total_agorot","description","customer","success_url","cancel_url"],"properties":{"client_ref":{"type":"string"},"amount_total_agorot":{"type":"integer","minimum":1},"description":{"type":"string"},"customer":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"name":{"type":"string","maxLength":200},"phone":{"type":"string"},"tax_id":{"type":"string","maxLength":20}}},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"מנוי שכבר נפתח","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"links":{"getPayment":{"operationId":"getPayment","parameters":{"id":"$response.body#/payment_id"}}}},"201":{"description":"מנוי חדש","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"links":{"getPayment":{"operationId":"getPayment","parameters":{"id":"$response.body#/payment_id"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}/charge":{"post":{"operationId":"chargeSubscription","summary":"חיוב חודשי של תקופה. ייחודי לפי (מנוי, תקופה)","security":[{"woiKey":["payments"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["period"],"properties":{"period":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])$"},"amount_total_agorot":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"payment_id, status, period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCharge"}}},"links":{"getPayment":{"operationId":"getPayment","parameters":{"id":"$response.body#/payment_id"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","summary":"ביטול מנוי","security":[{"woiKey":["payments"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"subscription_id, status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCancel"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/issues":{"post":{"operationId":"createIssue","summary":"דיווח על תקלה (תחום issues): לתיבה של הארגון או לצוות של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","description","bot"],"properties":{"target":{"type":"string","enum":["org","woi"],"description":"org: לתיבה של הארגון. woi: לצוות של WOI"},"description":{"type":"string","maxLength":4000},"kind":{"type":"string","enum":["agent","no_answer","system"],"default":"agent"},"channel":{"type":"string","enum":["site","telegram","whatsapp","email","link","voice","other"],"description":"חובה, חוץ מ-system"},"bot":{"type":"string","maxLength":200},"product":{"type":"string","maxLength":200,"description":"בלי ערך: השם של המפתח"},"user_request":{"type":"string","maxLength":2000},"checked":{"type":"string","maxLength":2000},"answer":{"type":"string","maxLength":2000},"error":{"type":"string","maxLength":1000},"alert":{"type":"string","maxLength":200},"conversation_url":{"type":"string","format":"uri","maxLength":500,"description":"https"},"asked_by":{"type":"string","maxLength":200,"description":"מזהה בלבד, בלי שם, מייל או טלפון"},"occurred_at":{"type":"string","format":"date-time"},"is_test":{"type":"boolean","description":"במפתח בדיקות כל דיווח הוא בדיקה"}}}}}},"responses":{"201":{"description":"ticket_id, ticket_number, target, status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCreated"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listIssues","summary":"הדיווחים בתיבה של הארגון, עד 50 בעמוד, מהישן לחדש. מפתח בדיקות רואה רק דיווחי בדיקה","security":[{"woiKey":["issues"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","in_progress","resolved"],"default":"new"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"issues, ו-next_cursor לעמוד הבא","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueList"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/issues/{ticket_id}/status":{"post":{"operationId":"markIssue","summary":"סימון דיווח בתיבה של הארגון: forwarded (עם forwarded_to) או handled","security":[{"woiKey":["issues"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["forwarded","handled"]},"forwarded_to":{"type":"string","maxLength":200,"description":"חובה ב-forwarded"}}}}}},"responses":{"200":{"description":"ticket_id, status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatus"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"post":{"operationId":"saveCustomer","summary":"לקוח בארגון (תחום customers). external_ref הוא המפתח: אותו ערך מחזיר את אותו לקוח. טלפון משותף לא מאחד לקוחות","security":[{"woiKey":["customers"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_ref","name"],"properties":{"external_ref":{"type":"string","maxLength":100},"name":{"type":"string","maxLength":255},"email":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50}}}}}},"responses":{"200":{"description":"כבר קיים לפי external_ref: customer_id, existing=true","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSaved"}}}},"201":{"description":"לקוח חדש: customer_id, existing=false","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSaved"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{customer_id}":{"patch":{"operationId":"updateCustomer","summary":"עדכון לקוח (תחום customers). גוף חלקי: name, email, phone. null או \"\" במייל או בטלפון מוחקים את השדה","security":[{"woiKey":["customers"]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","maxLength":255},"email":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50}}}}}},"responses":{"200":{"description":"customer_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdated"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/approvals":{"post":{"operationId":"requestApproval","summary":"בקשת אישור מהבעלים והמנהלים של הארגון (תחום approvals). ההחלטה יוצאת כאירוע approval.decided, גם בדחייה","security":[{"woiKey":["approvals"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","customer_id","external_ref","profile_url"],"properties":{"kind":{"type":"string","enum":["facebook_profile_link"]},"customer_id":{"type":"string","format":"uuid","description":"לקוח בארגון של המפתח (POST /v1/customers)"},"external_ref":{"type":"string","maxLength":100},"profile_url":{"type":"string","maxLength":500,"description":"https בלבד, בפייסבוק"}}}}}},"responses":{"200":{"description":"כבר יש בקשה פתוחה לאותו לקוח ו-external_ref: approval_id, status=already_requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequested"}}}},"201":{"description":"בקשה חדשה: approval_id, status=requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequested"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/approvals/{approval_id}/result":{"post":{"operationId":"reportApprovalResult","summary":"התוצאה בצד של השרת אחרי ההחלטה (תחום approvals). רק לבקשה של המפתח. התוצאה הראשונה נשמרת, וקריאה חוזרת מחזירה אותה. לפני ההחלטה: 409 NOT_DECIDED","security":[{"woiKey":["approvals"]}],"parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["done","failed"]},"reason":{"type":["string","null"],"maxLength":500,"description":"רק ב-failed"}}}}}},"responses":{"200":{"description":"approval_id, status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalResult"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruiting/jobs":{"post":{"operationId":"saveJob","summary":"עותק של משרה מהאתר שלכם בארגון של המפתח (תחום recruiting). כל שליחה היא המשרה המלאה, ושדה שלא נשלח נשמר ריק. עדכון לפי external_ref. בשלב הזה העותק לא מתפרסם מ-WOI ונערך רק אצלכם","security":[{"woiKey":["recruiting"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_ref"],"additionalProperties":false,"description":"שמירה: גם title, ‏updated_at ו-site_displayed. מחיקה: external_ref ו-deleted_at בלבד, והמשרה נסגרת","properties":{"external_ref":{"type":"string","maxLength":100,"description":"המזהה של המשרה אצלכם"},"title":{"type":["string","null"],"maxLength":255},"description":{"type":["string","null"],"maxLength":20000},"requirements":{"type":["string","null"],"maxLength":20000},"responsibilities":{"type":["string","null"],"maxLength":20000},"benefits":{"type":["string","null"],"maxLength":10000},"location":{"type":["string","null"],"maxLength":1000},"employment_type":{"type":["string","null"],"maxLength":50},"salary_type":{"type":["string","null"],"maxLength":50},"company":{"type":["string","null"],"maxLength":500},"company_website":{"type":["string","null"],"maxLength":2048},"company_logo":{"type":["string","null"],"maxLength":2048},"category":{"type":["string","null"],"maxLength":500},"experience_level":{"type":["string","null"],"maxLength":200},"education_level":{"type":["string","null"],"maxLength":200},"project_duration":{"type":["string","null"],"maxLength":500},"project_scope":{"type":["string","null"],"maxLength":5000},"project_deliverables":{"type":["string","null"],"maxLength":10000},"project_description":{"type":["string","null"],"maxLength":20000},"apply_method":{"type":["string","null"],"maxLength":50},"apply_contact_email":{"type":["string","null"],"maxLength":320},"apply_contact_phone":{"type":["string","null"],"maxLength":50},"apply_contact_url":{"type":["string","null"],"maxLength":2048},"applications_email":{"type":["string","null"],"maxLength":320},"external_url":{"type":["string","null"],"maxLength":2048},"source":{"type":["string","null"],"maxLength":200},"reference_number":{"type":["string","null"],"maxLength":200},"status":{"type":["string","null"],"maxLength":50},"quality_verdict":{"type":["string","null"],"maxLength":50},"salary_min":{"type":["number","null"]},"salary_max":{"type":["number","null"]},"project_budget_min":{"type":["number","null"]},"project_budget_max":{"type":["number","null"]},"short_id":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"site_displayed":{"type":["boolean","null"],"description":"true: המשרה פתוחה. אחרת המצב לפי status ו-quality_verdict"},"urgent":{"type":["boolean","null"]},"is_freelance":{"type":["boolean","null"]},"is_temporary_role":{"type":["boolean","null"]},"is_project":{"type":["boolean","null"]},"remote_work":{"type":["boolean","null"]},"project_includes_weekends":{"type":["boolean","null"]},"eor_requested":{"type":["boolean","null"]},"is_parent_friendly":{"type":["boolean","null"]},"is_50_plus_friendly":{"type":["boolean","null"]},"is_student_friendly":{"type":["boolean","null"]},"cv_required":{"type":["boolean","null"]},"is_active":{"type":["boolean","null"]},"has_contact":{"type":["boolean","null"]},"show_company_name":{"type":["boolean","null"],"description":"true: שם החברה (company) מופיע גם בתוכן של WOI על המשרה. אחרת בלי השם"},"profession_keywords":{"type":["array","null"],"maxItems":100,"items":{"type":"string","maxLength":500}},"target_groups":{"type":["array","null"],"maxItems":100,"items":{"type":"string","maxLength":500}},"tags":{"type":["array","null"],"maxItems":100,"items":{"type":"string","maxLength":500}},"regions":{"type":["array","null"],"maxItems":100,"items":{"type":"string","maxLength":500}},"organization_id":{"type":["string","null"],"format":"uuid"},"import_source_id":{"type":["string","null"],"format":"uuid"},"recruiter_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time","description":"שליחה עם updated_at ישן או שווה למה שנשמר לא משנה כלום"},"expires_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"רק בשורת מחיקה. אחרי מחיקה העותק לא משתנה יותר"},"project_start_date":{"type":["string","null"],"format":"date"},"project_end_date":{"type":["string","null"],"format":"date"}}}}}},"responses":{"200":{"description":"כבר קיימת לפי external_ref: job_id, ‏external_ref, ‏status, existing=true. משרה של WOI שחזרה אליכם (reference_number): גם woi_job=true, ולא נשמר כלום","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSaved"}}}},"201":{"description":"משרה חדשה: job_id, ‏external_ref, ‏status, existing=false","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSaved"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/state":{"get":{"operationId":"getState","summary":"מפתח אחד במצב העבודה של החשבון (תחום state). מפתח שלא קיים או שפג תוקפו: 404 NOT_FOUND","security":[{"woiKey":["state"]}],"parameters":[{"name":"scope","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":300}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"scope, key, value, version, expires_at","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateValue"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"writeState","summary":"כתיבה במצב העבודה של החשבון (תחום state). take: נעילה, ומפתח תפוס מחזיר taken=false עם הערך. put: כתיבה. delete: מחיקה. עם version, הכתיבה והמחיקה רק אם הוא עדיין זהה","security":[{"woiKey":["state"]}],"parameters":[{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","scope","key"],"properties":{"action":{"type":"string","enum":["take","put","delete"]},"scope":{"type":"string","minLength":1,"maxLength":100},"key":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"object","description":"חובה ב-put. לא ב-delete"},"version":{"type":["integer","null"],"minimum":1,"description":"ב-put וב-delete"},"expires_at":{"type":["string","null"],"format":"date-time","description":"ב-take וב-put. אחרי השעה המפתח פנוי"}}}}}},"responses":{"200":{"description":"take: taken, scope, key, version, expires_at (ו-value כשתפוס). put: written, scope, key, version. delete: deleted, scope, key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateWrite"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{organization_id}/requests":{"get":{"operationId":"listCustomerRequests","summary":"מנהל לקוח: הפניות של לקוח אחד בתיבה של WOI, עד 50 בעמוד. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","in_progress","resolved"],"default":"new"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"requests, ו-next_cursor לעמוד הבא","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRequestList"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{ticket_id}/reply":{"post":{"operationId":"replyToRequest","summary":"מנהל לקוח: תשובה ללקוח, בשיחה, בפעמון ובטלגרם. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"ticket_id, status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatus"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{company_id}/file":{"get":{"operationId":"getCompanyFile","summary":"תיק לקוח: החברה, היומן (עד 100, מהחדש) והקבצים, עם קישור הורדה לעשר דקות. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"}],"responses":{"200":{"description":"company, log, files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyFile"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{company_id}/log":{"post":{"operationId":"addCompanyLog","summary":"תיק לקוח: שורה ביומן. השורה הראשונה היא הכותרת. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":4000},"activity_date":{"type":"string","format":"date-time","description":"בלי ערך: עכשיו"},"actor_label":{"type":"string","maxLength":255,"description":"השם שמוצג ליד השורה"}}}}}},"responses":{"201":{"description":"activity_id, company_id, activity_date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLogEntry"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{company_id}/files/upload-url":{"post":{"operationId":"createCompanyUploadUrl","summary":"תיק לקוח: כתובת העלאה חתומה וקצרת מועד. מעלים ב-PUT ל-upload_url, ואז רושמים ב-/files. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_name"],"properties":{"file_name":{"type":"string","maxLength":255,"description":"השם לתצוגה, בלי / ובלי \\"}}}}}},"responses":{"200":{"description":"storage_path, upload_url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrl"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{company_id}/files":{"post":{"operationId":"addCompanyFile","summary":"תיק לקוח: רישום של קובץ שכבר הועלה. רק למפתח של WOI","security":[{"woiKey":["issues"]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XWoiKey"},{"$ref":"#/components/parameters/XWoiTimestamp"},{"$ref":"#/components/parameters/XWoiRequestId"},{"$ref":"#/components/parameters/XWoiSignature"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_name","storage_path"],"properties":{"file_name":{"type":"string","maxLength":255,"description":"השם לתצוגה, בלי / ובלי \\"},"storage_path":{"type":"string","description":"מה שחזר מ-upload-url"},"file_type":{"type":"string","maxLength":100},"file_size":{"type":"integer","minimum":0},"actor_label":{"type":"string","maxLength":255}}}}}},"responses":{"201":{"description":"attachment_id, company_id, storage_path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAttachment"}}}},"400":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"500":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"events":{"post":{"operationId":"receiveEvent","summary":"אירועים אל <הבסיס של השרת>/v1/events, חתומים באותו מפתח. מסננים לפי event_id, ואין הבטחת סדר","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["event_id","type","occurred_at","data"],"properties":{"event_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["payment.succeeded","payment.failed","subscription.charged","subscription.charge_failed","subscription.cancelled","approval.decided","job.changed"]},"occurred_at":{"type":"string","format":"date-time"},"data":{"type":"object","description":"approval.decided: approval_id, external_ref, kind, decision (approved או rejected), decided_at, decided_by\n\njob.changed (תחום recruiting): job_id, external_ref (ריק למשרה שנולדה ב-WOI), version, woi_status (open, draft או closed), closing_date, job_number, deleted_at, ו-job באותה צורה של הגוף של POST /v1/recruiting/jobs, בלי target_groups, tags ו-regions. version עולה בכל אירוע, ואירוע עם version קטן או שווה למה שנשמר אצלכם לא משנה כלום"}}}}}},"responses":{"200":{"description":"נשמר. כל תשובה אחרת: ניסיון חוזר"}}}}},"components":{"securitySchemes":{"woiKey":{"type":"apiKey","in":"header","name":"X-Woi-Key","description":"המפתח של החשבון, ועם כל בקשה גם X-Woi-Timestamp, ‏X-Woi-Request-Id ו-X-Woi-Signature. לכל פעולה תחום (payments, ‏issues, ‏customers, ‏approvals, ‏recruiting, ‏state), ומפתח בלי התחום מקבל 403 SCOPE_DENIED. התחומים של המפתח ב-GET /v1/connection."}},"parameters":{"XWoiKey":{"name":"X-Woi-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^woik_[0-9a-f]{24}$"}},"XWoiTimestamp":{"name":"X-Woi-Timestamp","in":"header","required":true,"description":"שניות מאז 1970. עד 300 שניות מהשעה אצל WOI","schema":{"type":"string"}},"XWoiRequestId":{"name":"X-Woi-Request-Id","in":"header","required":true,"description":"uuid v4 לכל בקשה. גם מפתח הכפילות (Idempotency-Key): אותו מזהה עם אותו גוף מחזיר את התשובה השמורה, ועם גוף אחר 409 REQUEST_ID_REUSED","schema":{"type":"string","format":"uuid"}},"XWoiSignature":{"name":"X-Woi-Signature","in":"header","required":true,"description":"v1= ואחריו HMAC-SHA256 בהקסדצימלי","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":50}},"Cursor":{"name":"cursor","in":"query","required":false,"description":"next_cursor מהעמוד הקודם","schema":{"type":"string","maxLength":200}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"רשות. כשנשלח, זהה ל-X-Woi-Request-Id, שהוא מפתח הכפילות. ערך אחר: 400 BAD_REQUEST עם field","schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"BAD_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"KEY_UNKNOWN, SIGNATURE_INVALID, TIMESTAMP_SKEW","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"KEY_INACTIVE, SCOPE_DENIED, PERMISSION_DENIED, PAYMENTS_NOT_ACTIVE, ENVIRONMENT_MISMATCH, LINK_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"REQUEST_ID_REUSED, SUBSCRIPTION_NOT_ACTIVE, NO_CONVERSATION, NOT_DECIDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Validation":{"description":"VALIDATION, עם field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"RATE_LIMITED, עם Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"שניות","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"המכסה לדקה של המפתח, לפי טיוטת IETF: \"reads\";q=60;w=60","schema":{"type":"string"}},"RateLimit":{"description":"כמה בקשות נשארו בדקה: \"reads\";r=59","schema":{"type":"string"}}}},"Failed":{"description":"FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","code","message","request_id"],"properties":{"error":{"type":"string","enum":["BAD_REQUEST","KEY_UNKNOWN","SIGNATURE_INVALID","TIMESTAMP_SKEW","KEY_INACTIVE","SCOPE_DENIED","PERMISSION_DENIED","PAYMENTS_NOT_ACTIVE","ENVIRONMENT_MISMATCH","LINK_INACTIVE","NOT_FOUND","REQUEST_ID_REUSED","SUBSCRIPTION_NOT_ACTIVE","NO_CONVERSATION","NOT_DECIDED","VALIDATION","RATE_LIMITED","FAILED","UNAVAILABLE"]},"code":{"type":"string","enum":["BAD_REQUEST","KEY_UNKNOWN","SIGNATURE_INVALID","TIMESTAMP_SKEW","KEY_INACTIVE","SCOPE_DENIED","PERMISSION_DENIED","PAYMENTS_NOT_ACTIVE","ENVIRONMENT_MISMATCH","LINK_INACTIVE","NOT_FOUND","REQUEST_ID_REUSED","SUBSCRIPTION_NOT_ACTIVE","NO_CONVERSATION","NOT_DECIDED","VALIDATION","RATE_LIMITED","FAILED","UNAVAILABLE"]},"message":{"type":"string"},"request_id":{"type":["string","null"],"format":"uuid"},"field":{"type":"string","description":"השדה שנפסל, ב-VALIDATION"}}},"Connection":{"type":"object","required":["key_id","organization_id","client","scopes","remote_scopes","rate_limits"],"properties":{"key_id":{"type":"string","pattern":"^woik_[0-9a-f]{24}$"},"organization_id":{"type":"string","format":"uuid"},"client":{"type":"object","required":["id","name","environment"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"environment":{"type":"string","enum":["test","live"]}}},"scopes":{"type":"array","items":{"type":"string"}},"remote_scopes":{"type":"array","items":{"type":"string"}},"rate_limits":{"type":"object","additionalProperties":{"type":"integer"}}}},"Payment":{"type":"object","required":["payment_id","payment_url","status"],"properties":{"payment_id":{"type":"string","format":"uuid"},"payment_url":{"type":["string","null"],"format":"uri"},"status":{"type":"string"}}},"PaymentStatus":{"type":"object","required":["payment_id","client_ref","status","amount_paid_agorot","document"],"properties":{"payment_id":{"type":"string","format":"uuid"},"client_ref":{"type":["string","null"]},"status":{"type":"string"},"amount_paid_agorot":{"type":["integer","null"]},"document":{"type":["object","null"],"required":["type","number","url"],"properties":{"type":{"type":["string","null"]},"number":{"type":["string","null"]},"url":{"type":["string","null"]}}},"subscription_id":{"type":"string","format":"uuid"},"period":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])$"}}},"Subscription":{"type":"object","required":["subscription_id","payment_id","payment_url","period"],"properties":{"subscription_id":{"type":"string","format":"uuid"},"payment_id":{"type":["string","null"],"format":"uuid"},"payment_url":{"type":["string","null"],"format":"uri"},"period":{"type":["string","null"],"pattern":"^[0-9]{4}-(0[1-9]|1[0-2])$"}}},"SubscriptionCharge":{"type":"object","required":["payment_id","status","period"],"properties":{"payment_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"period":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])$"}}},"SubscriptionCancel":{"type":"object","required":["subscription_id","status"],"properties":{"subscription_id":{"type":"string","format":"uuid"},"status":{"type":"string"}}},"IssueCreated":{"type":"object","required":["ticket_id","ticket_number","target","status"],"properties":{"ticket_id":{"type":"string","format":"uuid"},"ticket_number":{"type":"string"},"target":{"type":"string","enum":["org","woi"]},"status":{"type":"string"}}},"Issue":{"type":"object","required":["ticket_id","ticket_number","created_at","status","forwarded_to","target","kind","channel","bot","product","description","user_request","checked","answer","error","alert","conversation_url","asked_by","occurred_at","is_test"],"properties":{"ticket_id":{"type":"string","format":"uuid"},"ticket_number":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"forwarded_to":{"type":["string","null"]},"target":{"type":["string","null"]},"kind":{"type":["string","null"]},"channel":{"type":["string","null"]},"bot":{"type":["string","null"]},"product":{"type":["string","null"]},"description":{"type":["string","null"]},"user_request":{"type":["string","null"]},"checked":{"type":["string","null"]},"answer":{"type":["string","null"]},"error":{"type":["string","null"]},"alert":{"type":["string","null"]},"conversation_url":{"type":["string","null"]},"asked_by":{"type":["string","null"]},"occurred_at":{"type":["string","null"]},"is_test":{"type":"boolean"}}},"IssueList":{"type":"object","required":["issues","next_cursor"],"properties":{"issues":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/Issue"}},"next_cursor":{"type":["string","null"]}}},"TicketStatus":{"type":"object","required":["ticket_id","status"],"properties":{"ticket_id":{"type":"string","format":"uuid"},"status":{"type":"string"}}},"CustomerRequest":{"type":"object","required":["ticket_id","ticket_number","created_at","status","category","type","description","user_request","bot","channel","forwarded_to","can_reply","is_test"],"properties":{"ticket_id":{"type":"string","format":"uuid"},"ticket_number":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"category":{"type":["string","null"]},"type":{"type":["string","null"]},"description":{"type":["string","null"]},"user_request":{"type":["string","null"]},"bot":{"type":["string","null"]},"channel":{"type":["string","null"]},"forwarded_to":{"type":["string","null"]},"can_reply":{"type":"boolean"},"is_test":{"type":"boolean"}}},"CustomerRequestList":{"type":"object","required":["requests","next_cursor"],"properties":{"requests":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/CustomerRequest"}},"next_cursor":{"type":["string","null"]}}},"CompanyFile":{"type":"object","required":["company","log","files"],"properties":{"company":{"type":"object","required":["company_id","name","trade_name","tax_id","address","city","phone","email","notes","is_active","linked_organization_id"],"properties":{"company_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"trade_name":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"notes":{"type":["string","null"]},"is_active":{"type":"boolean"},"linked_organization_id":{"type":["string","null"],"format":"uuid"}}},"log":{"type":"array","maxItems":100,"items":{"type":"object","required":["activity_id","activity_date","type","title","text","actor_label"],"properties":{"activity_id":{"type":"string","format":"uuid"},"activity_date":{"type":["string","null"],"format":"date-time"},"type":{"type":"string"},"title":{"type":["string","null"]},"text":{"type":["string","null"]},"actor_label":{"type":["string","null"]}}}},"files":{"type":"array","maxItems":100,"items":{"type":"object","required":["attachment_id","file_name","file_type","file_size","uploaded_label","created_at","download_url"],"properties":{"attachment_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"file_type":{"type":["string","null"]},"file_size":{"type":["integer","null"]},"uploaded_label":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"download_url":{"type":["string","null"],"format":"uri"}}}}}},"CompanyLogEntry":{"type":"object","required":["activity_id","company_id","activity_date"],"properties":{"activity_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"activity_date":{"type":"string","format":"date-time"}}},"UploadUrl":{"type":"object","required":["storage_path","upload_url"],"properties":{"storage_path":{"type":"string"},"upload_url":{"type":"string","format":"uri"}}},"CompanyAttachment":{"type":"object","required":["attachment_id","company_id","storage_path"],"properties":{"attachment_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"storage_path":{"type":"string"}}},"CustomerSaved":{"type":"object","required":["customer_id","existing"],"properties":{"customer_id":{"type":"string","format":"uuid"},"existing":{"type":"boolean"}}},"CustomerUpdated":{"type":"object","required":["customer_id"],"properties":{"customer_id":{"type":"string","format":"uuid"}}},"ApprovalRequested":{"type":"object","required":["approval_id","status"],"properties":{"approval_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","already_requested"]}}},"ApprovalResult":{"type":"object","required":["approval_id","status"],"properties":{"approval_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["done","failed"]}}},"JobSaved":{"type":"object","required":["job_id","external_ref","status","existing"],"properties":{"job_id":{"type":["string","null"],"format":"uuid"},"external_ref":{"type":["string","null"]},"status":{"type":["string","null"]},"existing":{"type":"boolean"},"woi_job":{"type":"boolean","const":true}}},"StateValue":{"type":"object","required":["scope","key","value","version","expires_at"],"properties":{"scope":{"type":"string","minLength":1,"maxLength":100},"key":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"object"},"version":{"type":"integer","minimum":1},"expires_at":{"type":["string","null"],"format":"date-time"}}},"StateWrite":{"oneOf":[{"type":"object","required":["taken","scope","key","version","expires_at"],"properties":{"taken":{"type":"boolean"},"scope":{"type":"string"},"key":{"type":"string"},"version":{"type":"integer"},"value":{"type":"object"},"expires_at":{"type":["string","null"],"format":"date-time"}}},{"type":"object","required":["written","scope","key","version"],"properties":{"written":{"type":"boolean"},"scope":{"type":"string"},"key":{"type":"string"},"version":{"type":["integer","null"]},"expires_at":{"type":["string","null"],"format":"date-time"}}},{"type":"object","required":["deleted","scope","key"],"properties":{"deleted":{"type":"boolean"},"scope":{"type":"string"},"key":{"type":"string"},"version":{"type":["integer","null"]}}}]}}}}