{"openapi":"3.0.3","info":{"contact":{"name":"Scalar360 support","email":"support@scalar360.com","url":"https://scalar360.com/developers"},"license":{"name":"Proprietary — Scalar360 Terms of Service","url":"https://scalar360.com/terms"},"termsOfService":"https://scalar360.com/terms","version":"1.0","title":"Scalar360 API","description":"REST API for Scalar360. Authenticate with OAuth 2.0 (server-based or self client) and send `Authorization: Scalar360-oauthtoken <access_token>`. Every call runs as the authorizing user, inside their organization, role and plan."},"servers":[{"url":"https://api.scalar360.com","description":"Scalar360"}],"tags":[{"name":"accounting","description":"60 endpoints"},{"name":"assets","description":"40 endpoints"},{"name":"audit-log","description":"1 endpoints"},{"name":"batches","description":"4 endpoints"},{"name":"bills","description":"17 endpoints"},{"name":"composite-items","description":"5 endpoints"},{"name":"contacts","description":"16 endpoints"},{"name":"credit-notes","description":"10 endpoints"},{"name":"crm","description":"45 endpoints"},{"name":"custom-fields","description":"9 endpoints"},{"name":"customers","description":"5 endpoints"},{"name":"dashboard-data","description":"3 endpoints"},{"name":"daybook","description":"2 endpoints"},{"name":"document-email-settings","description":"2 endpoints"},{"name":"document-emails","description":"1 endpoints"},{"name":"documents","description":"4 endpoints"},{"name":"drive","description":"49 endpoints"},{"name":"email-templates","description":"5 endpoints"},{"name":"expense-categories","description":"5 endpoints"},{"name":"expenses","description":"27 endpoints"},{"name":"health","description":"1 endpoints"},{"name":"hooks","description":"1 endpoints"},{"name":"import-jobs","description":"5 endpoints"},{"name":"integrations","description":"21 endpoints"},{"name":"inventory","description":"47 endpoints"},{"name":"inventory-adjustments","description":"4 endpoints"},{"name":"invoices","description":"21 endpoints"},{"name":"leads","description":"39 endpoints"},{"name":"manufacturing","description":"47 endpoints"},{"name":"me","description":"15 endpoints"},{"name":"notifications","description":"12 endpoints"},{"name":"payables","description":"4 endpoints"},{"name":"payroll","description":"146 endpoints"},{"name":"plans","description":"2 endpoints"},{"name":"pos","description":"34 endpoints"},{"name":"price-lists","description":"5 endpoints"},{"name":"projects","description":"382 endpoints"},{"name":"purchase","description":"1 endpoints"},{"name":"purchase-debit-notes","description":"11 endpoints"},{"name":"purchase-orders","description":"5 endpoints"},{"name":"purchase-receipts","description":"6 endpoints"},{"name":"purchase-returns","description":"5 endpoints"},{"name":"quotes","description":"8 endpoints"},{"name":"receivables","description":"4 endpoints"},{"name":"recurring","description":"8 endpoints"},{"name":"reorder","description":"3 endpoints"},{"name":"reports","description":"36 endpoints"},{"name":"sales","description":"3 endpoints"},{"name":"sales-orders","description":"7 endpoints"},{"name":"sales-returns","description":"4 endpoints"},{"name":"scm","description":"6 endpoints"},{"name":"settings","description":"22 endpoints"},{"name":"shipments","description":"8 endpoints"},{"name":"stock","description":"1 endpoints"},{"name":"stock-transfers","description":"8 endpoints"},{"name":"table-views","description":"3 endpoints"},{"name":"todos","description":"5 endpoints"},{"name":"user-preferences","description":"3 endpoints"},{"name":"vendors","description":"7 endpoints"}],"paths":{"/api/contacts":{"get":{"tags":["contacts"],"summary":"Get all contacts","operationId":"ContactController_getAllContacts","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"source","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"hasGstin","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]},"post":{"tags":["contacts"],"summary":"Create contact","operationId":"ContactController_createContact","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"companyName":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"source":{"type":"string"},"assignedTo":{"type":"string"},"notes":{"type":"string"},"customFields":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","phone"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.CREATE"]}]}},"/api/contacts/import":{"post":{"tags":["contacts"],"summary":"Import contacts","operationId":"ContactController_importContacts","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.CREATE"]}]}},"/api/contacts/import/template.csv":{"get":{"tags":["contacts"],"summary":"Template csv","operationId":"ContactController_templateCsv","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]}},"/api/contacts/import/template.xlsx":{"get":{"tags":["contacts"],"summary":"Template xlsx","operationId":"ContactController_templateXlsx","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]}},"/api/contacts/{gid}":{"delete":{"tags":["contacts"],"summary":"Delete contact","operationId":"ContactController_deleteContact","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.DELETE"]}]},"get":{"tags":["contacts"],"summary":"Get contact by gid","operationId":"ContactController_getContactByGid","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]},"put":{"tags":["contacts"],"summary":"Update contact","operationId":"ContactController_updateContact","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"companyName":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"source":{"type":"string"},"assignedTo":{"type":"string"},"notes":{"type":"string"},"customFields":{"type":"object","additionalProperties":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.UPDATE"]}]}},"/api/contacts/{gid}/activities":{"get":{"tags":["contacts"],"summary":"List activities","operationId":"ContactController_listActivities","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]},"post":{"tags":["contacts"],"summary":"Add activity","operationId":"ContactController_addActivity","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"required, not blank"},"note":{"type":"string"},"activityTime":{"type":"string","format":"date-time"},"mentions":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.CREATE"]}]}},"/api/contacts/{gid}/activities/{activityGid}":{"delete":{"tags":["contacts"],"summary":"Delete activity","operationId":"ContactController_deleteActivity","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"activityGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.DELETE"]}]}},"/api/contacts/{gid}/documents":{"get":{"tags":["contacts"],"summary":"List documents","operationId":"ContactController_listDocuments","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]},"post":{"tags":["contacts"],"summary":"Upload document","operationId":"ContactController_uploadDocument","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"activityId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.CREATE"]}]}},"/api/contacts/{gid}/documents/{docGid}":{"delete":{"tags":["contacts"],"summary":"Delete document","operationId":"ContactController_deleteDocument","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"docGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.DELETE"]}]}},"/api/contacts/{gid}/documents/{docGid}/link":{"get":{"tags":["contacts"],"summary":"Document link","operationId":"ContactController_documentLink","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"docGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]}},"/api/contacts/{gid}/emails":{"get":{"tags":["contacts"],"summary":"Contact emails","operationId":"CrmEmailController_contactEmails","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.contacts.READ"]}]}},"/api/crm/activity":{"get":{"tags":["crm"],"summary":"List","operationId":"CrmFeedController_list","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/analytics":{"get":{"tags":["crm"],"summary":"Analytics","operationId":"CrmAnalyticsController_analytics","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"pipeline","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"owner","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/automations":{"get":{"tags":["crm"],"summary":"List","operationId":"CrmAutomationController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create","operationId":"CrmAutomationController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"triggerType":{"type":"string","description":"required, not blank"},"enabled":{"type":"boolean"},"definition":{}},"required":["triggerType","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/automations/{gid}":{"delete":{"tags":["crm"],"summary":"Delete","operationId":"CrmAutomationController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"put":{"tags":["crm"],"summary":"Update","operationId":"CrmAutomationController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"triggerType":{"type":"string","description":"required, not blank"},"enabled":{"type":"boolean"},"definition":{}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/automations/{gid}/enabled":{"patch":{"tags":["crm"],"summary":"Set enabled","operationId":"CrmAutomationController_setEnabled","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/email-settings":{"get":{"tags":["crm"],"summary":"Settings","operationId":"CrmEmailController_settings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"put":{"tags":["crm"],"summary":"Save settings","operationId":"CrmEmailController_saveSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"syncEnabled":{"type":"boolean"},"sharing":{"type":"string"},"mailbox":{"type":"string"},"dropboxAddress":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/emails/{gid}":{"get":{"tags":["crm"],"summary":"Content","operationId":"CrmEmailController_content","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/forms":{"get":{"tags":["crm"],"summary":"List forms","operationId":"CrmFormController_listForms","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create form","operationId":"CrmFormController_createForm","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"successMessage":{"type":"string"},"accentColor":{"type":"string"},"defaultPipelineId":{"type":"string","format":"uuid"},"defaultStage":{"type":"string"},"defaultSource":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"label":{"type":"string"},"fieldType":{"type":"string"},"required":{"type":"boolean"},"visible":{"type":"boolean"},"displayOrder":{"type":"integer"},"options":{"type":"string"},"custom":{"type":"boolean"}}}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"level":{"type":"integer"},"fieldKey":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"fieldType":{"type":"string"},"options":{"type":"string"},"custom":{"type":"boolean"},"span":{"type":"integer"},"displayOrder":{"type":"integer"},"layout":{"type":"object","additionalProperties":{"type":"object"}}}}},"theme":{"type":"object","properties":{"fontFamily":{"type":"string"},"headingColor":{"type":"string"},"textColor":{"type":"string"},"labelColor":{"type":"string"},"backgroundColor":{"type":"string"},"cardColor":{"type":"string"},"buttonColor":{"type":"string"},"buttonTextColor":{"type":"string"},"buttonLabel":{"type":"string"},"buttonRadius":{"type":"integer"},"fieldGap":{"type":"integer"}}},"allowedOrigins":{"type":"array","items":{"type":"string"}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/forms/field-catalog":{"get":{"tags":["crm"],"summary":"Field catalog","operationId":"CrmFormController_fieldCatalog","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/forms/{gid}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}":{"delete":{"tags":["crm"],"summary":"Delete form","operationId":"CrmFormController_deleteForm","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"4","in":"path","required":true,"schema":{"type":"string"}},{"name":"12","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"get":{"tags":["crm"],"summary":"Get form","operationId":"CrmFormController_getForm","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"4","in":"path","required":true,"schema":{"type":"string"}},{"name":"12","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"put":{"tags":["crm"],"summary":"Update form","operationId":"CrmFormController_updateForm","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"4","in":"path","required":true,"schema":{"type":"string"}},{"name":"12","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"successMessage":{"type":"string"},"accentColor":{"type":"string"},"defaultPipelineId":{"type":"string","format":"uuid"},"defaultStage":{"type":"string"},"defaultSource":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"label":{"type":"string"},"fieldType":{"type":"string"},"required":{"type":"boolean"},"visible":{"type":"boolean"},"displayOrder":{"type":"integer"},"options":{"type":"string"},"custom":{"type":"boolean"}}}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"level":{"type":"integer"},"fieldKey":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"fieldType":{"type":"string"},"options":{"type":"string"},"custom":{"type":"boolean"},"span":{"type":"integer"},"displayOrder":{"type":"integer"},"layout":{"type":"object","additionalProperties":{"type":"object"}}}}},"theme":{"type":"object","properties":{"fontFamily":{"type":"string"},"headingColor":{"type":"string"},"textColor":{"type":"string"},"labelColor":{"type":"string"},"backgroundColor":{"type":"string"},"cardColor":{"type":"string"},"buttonColor":{"type":"string"},"buttonTextColor":{"type":"string"},"buttonLabel":{"type":"string"},"buttonRadius":{"type":"integer"},"fieldGap":{"type":"integer"}}},"allowedOrigins":{"type":"array","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/forms/{gid}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}/publish":{"post":{"tags":["crm"],"summary":"Publish form","operationId":"CrmFormController_publishForm","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"4","in":"path","required":true,"schema":{"type":"string"}},{"name":"12","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/forms/{gid}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}/unpublish":{"post":{"tags":["crm"],"summary":"Unpublish form","operationId":"CrmFormController_unpublishForm","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"4","in":"path","required":true,"schema":{"type":"string"}},{"name":"12","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/lead-priorities":{"get":{"tags":["crm"],"summary":"List lead priorities","operationId":"CrmSettingsController_listLeadPriorities","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create lead priority","operationId":"CrmSettingsController_createLeadPriority","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/lead-priorities/{gid}":{"delete":{"tags":["crm"],"summary":"Delete lead priority","operationId":"CrmSettingsController_deleteLeadPriority","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"put":{"tags":["crm"],"summary":"Update lead priority","operationId":"CrmSettingsController_updateLeadPriority","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/lead-sources":{"get":{"tags":["crm"],"summary":"List lead sources","operationId":"CrmSettingsController_listLeadSources","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create lead source","operationId":"CrmSettingsController_createLeadSource","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/lead-sources/{gid}":{"delete":{"tags":["crm"],"summary":"Delete lead source","operationId":"CrmSettingsController_deleteLeadSource","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"put":{"tags":["crm"],"summary":"Update lead source","operationId":"CrmSettingsController_updateLeadSource","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/lead-types":{"get":{"tags":["crm"],"summary":"List lead types","operationId":"CrmSettingsController_listLeadTypes","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create lead type","operationId":"CrmSettingsController_createLeadType","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/lead-types/{gid}":{"delete":{"tags":["crm"],"summary":"Delete lead type","operationId":"CrmSettingsController_deleteLeadType","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"put":{"tags":["crm"],"summary":"Update lead type","operationId":"CrmSettingsController_updateLeadType","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/meta/oauth/start":{"get":{"tags":["crm"],"summary":"Start oauth","operationId":"CrmMetaController_startOAuth","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/meta/pages":{"get":{"tags":["crm"],"summary":"List pages","operationId":"CrmMetaController_listPages","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/meta/pages/{pageId}":{"delete":{"tags":["crm"],"summary":"Disconnect","operationId":"CrmMetaController_disconnect","parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]}},"/api/crm/meta/pages/{pageId}/connect":{"post":{"tags":["crm"],"summary":"Connect","operationId":"CrmMetaController_connect","parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"leadSource":{"type":"string"},"pipelineId":{"type":"string","format":"uuid"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/meta/pages/{pageId}/forms":{"get":{"tags":["crm"],"summary":"Forms","operationId":"CrmMetaController_forms","parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/meta/pages/{pageId}/forms/{formId}/mapping":{"put":{"tags":["crm"],"summary":"Save form mapping","operationId":"CrmMetaController_saveFormMapping","parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"formName":{"type":"string"},"mappings":{"type":"object","additionalProperties":{"type":"string"}},"leadSource":{"type":"string"},"pipelineId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/meta/status":{"get":{"tags":["crm"],"summary":"Status","operationId":"CrmMetaController_status","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/crm/pipelines":{"get":{"tags":["crm"],"summary":"List pipelines","operationId":"CrmSettingsController_listPipelines","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"post":{"tags":["crm"],"summary":"Create pipeline","operationId":"CrmSettingsController_createPipeline","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.CREATE"]}]}},"/api/crm/pipelines/order":{"put":{"tags":["crm"],"summary":"Reorder pipelines","operationId":"CrmSettingsController_reorderPipelines","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/pipelines/{gid}":{"delete":{"tags":["crm"],"summary":"Delete pipeline","operationId":"CrmSettingsController_deletePipeline","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.DELETE"]}]},"put":{"tags":["crm"],"summary":"Update pipeline","operationId":"CrmSettingsController_updatePipeline","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/crm/pipelines/{gid}/stages":{"get":{"tags":["crm"],"summary":"List pipeline stages","operationId":"CrmSettingsController_listPipelineStages","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]},"put":{"tags":["crm"],"summary":"Replace pipeline stages","operationId":"CrmSettingsController_replacePipelineStages","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"visible":{"type":"boolean"},"system":{"type":"boolean"},"winProbability":{"type":"integer"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.UPDATE"]}]}},"/api/custom-fields":{"get":{"tags":["custom-fields"],"summary":"List","operationId":"CustomFieldController_list","parameters":[{"name":"entityType","in":"query","required":true,"schema":{"type":"string"}},{"name":"recordGid","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.READ"]}]},"post":{"tags":["custom-fields"],"summary":"Create","operationId":"CustomFieldController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","description":"required"},"ownerGid":{"type":"string","format":"uuid"},"fieldKey":{"type":"string","description":"required"},"label":{"type":"string","description":"required"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","SELECT","PHONE","FILE"]},"options":{"type":"string"},"required":{"type":"boolean"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}},"required":["label","fieldKey","entityType"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.CREATE"]}]}},"/api/custom-fields/file":{"delete":{"tags":["custom-fields"],"summary":"Delete","operationId":"CustomFieldFileController_delete","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.DELETE"]}]}},"/api/custom-fields/upload/{entity}/{gid}/{fieldKey}":{"post":{"tags":["custom-fields"],"summary":"Upload","operationId":"CustomFieldFileController_upload","parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fieldKey","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.CREATE"]}]}},"/api/custom-fields/values/{entity}/batch":{"post":{"tags":["custom-fields"],"summary":"Batch","operationId":"BusinessCustomFieldValueController_batch","parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.CREATE"]}]}},"/api/custom-fields/values/{entity}/{recordGid}":{"get":{"tags":["custom-fields"],"summary":"Get","operationId":"BusinessCustomFieldValueController_get","parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"recordGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.READ"]}]},"put":{"tags":["custom-fields"],"summary":"Save","operationId":"BusinessCustomFieldValueController_save","parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"recordGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.UPDATE"]}]}},"/api/custom-fields/{gid}":{"delete":{"tags":["custom-fields"],"summary":"Delete","operationId":"CustomFieldController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.DELETE"]}]},"put":{"tags":["custom-fields"],"summary":"Update","operationId":"CustomFieldController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","description":"required"},"ownerGid":{"type":"string","format":"uuid"},"fieldKey":{"type":"string","description":"required"},"label":{"type":"string","description":"required"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","SELECT","PHONE","FILE"]},"options":{"type":"string"},"required":{"type":"boolean"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.custom-fields.UPDATE"]}]}},"/api/hooks/in/{token}":{"post":{"tags":["hooks"],"summary":"Receive","operationId":"IncomingWebhookController_receive","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.hooks.CREATE"]}]}},"/api/leads":{"get":{"tags":["leads"],"summary":"Get all leads","operationId":"LeadController_getAllLeads","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"leadType","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueDateStatus","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueStartDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"dueEndDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"minDealValue","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxDealValue","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]},"post":{"tags":["leads"],"summary":"Create lead","operationId":"LeadController_createLead","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"companyName":{"type":"string"},"phone":{"type":"string"},"secondaryPhone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"source":{"type":"string"},"leadType":{"type":"string"},"pipelineId":{"type":"string","format":"uuid"},"stage":{"type":"string"},"dealValue":{"type":"number"},"followUpDate":{"type":"string","format":"date"},"followUpTime":{"type":"string","example":"09:30"},"priority":{"type":"string"},"dueDate":{"type":"string","format":"date"},"assignedTo":{"type":"string"},"notes":{"type":"string"},"customFields":{"type":"object","additionalProperties":{"type":"string"}},"version":{"type":"integer"}},"required":["name","phone"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/bulk-assign":{"patch":{"tags":["leads"],"summary":"Bulk assign leads","operationId":"LeadController_bulkAssignLeads","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty"},"assignedTo":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.UPDATE"]}]}},"/api/leads/email-sender":{"get":{"tags":["leads"],"summary":"Email sender","operationId":"LeadController_emailSender","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/followups/overdue":{"get":{"tags":["leads"],"summary":"Get overdue follow ups","operationId":"LeadController_getOverdueFollowUps","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/followups/today":{"get":{"tags":["leads"],"summary":"Get today follow ups","operationId":"LeadController_getTodayFollowUps","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/followups/upcoming":{"get":{"tags":["leads"],"summary":"Get upcoming follow ups","operationId":"LeadController_getUpcomingFollowUps","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/import":{"post":{"tags":["leads"],"summary":"Import leads","operationId":"LeadController_importLeads","parameters":[{"name":"pipeline","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/import/template.csv":{"get":{"tags":["leads"],"summary":"Template csv","operationId":"LeadController_templateCsv","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/import/template.xlsx":{"get":{"tags":["leads"],"summary":"Template xlsx","operationId":"LeadController_templateXlsx","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/integrations/meetings":{"get":{"tags":["leads"],"summary":"Meeting providers","operationId":"LeadController_meetingProviders","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/meetings":{"get":{"tags":["leads"],"summary":"List meetings","operationId":"LeadController_listMeetings","parameters":[{"name":"tab","in":"query","required":false,"schema":{"type":"string","default":"today"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/pipeline":{"get":{"tags":["leads"],"summary":"Get pipeline","operationId":"LeadController_getPipeline","parameters":[{"name":"pipeline","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/pipeline/list":{"get":{"tags":["leads"],"summary":"List pipeline leads","operationId":"LeadController_listPipelineLeads","parameters":[{"name":"pipeline","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"leadType","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueDateStatus","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueStartDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"dueEndDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"minDealValue","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxDealValue","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/stage/{stage}":{"get":{"tags":["leads"],"summary":"Get leads by stage","operationId":"LeadController_getLeadsByStage","parameters":[{"name":"stage","in":"path","required":true,"schema":{"type":"string"}},{"name":"pipeline","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"leadType","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueDateStatus","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"dueStartDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"dueEndDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"minDealValue","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxDealValue","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/tasks/mine":{"get":{"tags":["leads"],"summary":"My tasks","operationId":"LeadController_myTasks","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/{gid}":{"delete":{"tags":["leads"],"summary":"Delete lead","operationId":"LeadController_deleteLead","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.DELETE"]}]},"get":{"tags":["leads"],"summary":"Get lead by gid","operationId":"LeadController_getLeadByGid","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]},"put":{"tags":["leads"],"summary":"Update lead","operationId":"LeadController_updateLead","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"companyName":{"type":"string"},"phone":{"type":"string"},"secondaryPhone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"source":{"type":"string"},"leadType":{"type":"string"},"pipelineId":{"type":"string","format":"uuid"},"stage":{"type":"string"},"dealValue":{"type":"number"},"followUpDate":{"type":"string","format":"date"},"followUpTime":{"type":"string","example":"09:30"},"priority":{"type":"string"},"dueDate":{"type":"string","format":"date"},"assignedTo":{"type":"string"},"notes":{"type":"string"},"customFields":{"type":"object","additionalProperties":{"type":"string"}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.UPDATE"]}]}},"/api/leads/{gid}/activities":{"get":{"tags":["leads"],"summary":"List activities","operationId":"LeadController_listActivities","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]},"post":{"tags":["leads"],"summary":"Add activity","operationId":"LeadController_addActivity","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"required, not blank"},"note":{"type":"string"},"activityTime":{"type":"string","format":"date-time"},"mentions":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/activities/{activityGid}":{"delete":{"tags":["leads"],"summary":"Delete activity","operationId":"LeadController_deleteActivity","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"activityGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.DELETE"]}]}},"/api/leads/{gid}/assign":{"patch":{"tags":["leads"],"summary":"Assign lead","operationId":"LeadController_assignLead","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assignedTo":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.UPDATE"]}]}},"/api/leads/{gid}/convert":{"post":{"tags":["leads"],"summary":"Convert to customer","operationId":"LeadController_convertToCustomer","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string"},"customerId":{"type":"string","format":"uuid"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/convert/preview":{"get":{"tags":["leads"],"summary":"Preview conversion","operationId":"LeadController_previewConversion","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/{gid}/documents":{"get":{"tags":["leads"],"summary":"List documents","operationId":"LeadController_listDocuments","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]},"post":{"tags":["leads"],"summary":"Upload document","operationId":"LeadController_uploadDocument","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"activityId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/documents/{docGid}":{"delete":{"tags":["leads"],"summary":"Delete document","operationId":"LeadController_deleteDocument","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"docGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.DELETE"]}]}},"/api/leads/{gid}/documents/{docGid}/link":{"get":{"tags":["leads"],"summary":"Document link","operationId":"LeadController_documentLink","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"docGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/{gid}/email":{"post":{"tags":["leads"],"summary":"Email lead","operationId":"LeadController_emailLead","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subject","in":"query","required":true,"schema":{"type":"string"}},{"name":"body","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/email-tracking":{"get":{"tags":["leads"],"summary":"Email tracking","operationId":"LeadController_emailTracking","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/{gid}/emails":{"get":{"tags":["leads"],"summary":"Lead emails","operationId":"CrmEmailController_leadEmails","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]}},"/api/leads/{gid}/follow-up/complete":{"post":{"tags":["leads"],"summary":"Complete follow up","operationId":"LeadController_completeFollowUp","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"nextFollowUpDate":{"type":"string","format":"date"},"nextFollowUpTime":{"type":"string","example":"09:30"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/meetings":{"post":{"tags":["leads"],"summary":"Create meeting","operationId":"LeadController_createMeeting","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"topic":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer"},"agenda":{"type":"string"},"inviteLead":{"type":"boolean"},"inviteUserIds":{"type":"array","items":{"type":"string","format":"uuid"}},"inviteEmails":{"type":"array","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/stage":{"patch":{"tags":["leads"],"summary":"Update stage","operationId":"LeadController_updateStage","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.UPDATE"]}]}},"/api/leads/{gid}/tasks":{"get":{"tags":["leads"],"summary":"List tasks","operationId":"LeadController_listTasks","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.READ"]}]},"post":{"tags":["leads"],"summary":"Add task","operationId":"LeadController_addTask","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"dueAt":{"type":"string","format":"date-time"},"assignedTo":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.CREATE"]}]}},"/api/leads/{gid}/tasks/{taskGid}":{"delete":{"tags":["leads"],"summary":"Delete task","operationId":"LeadController_deleteTask","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.DELETE"]}]},"patch":{"tags":["leads"],"summary":"Update task","operationId":"LeadController_updateTask","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"dueAt":{"type":"string","format":"date-time"},"assignedTo":{"type":"string","format":"uuid"},"status":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.leads.UPDATE"]}]}},"/api/v1/accounting/balance-sheet":{"get":{"tags":["accounting"],"summary":"Get balance sheet","operationId":"BalanceSheetController_getBalanceSheet","parameters":[{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/bank-reconciliation/accounts":{"get":{"tags":["accounting"],"summary":"Accounts","operationId":"BankReconciliationController_accounts","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]},"post":{"tags":["accounting"],"summary":"Create account","operationId":"BankReconciliationController_createAccount","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"bankName":{"type":"string"},"accountNumber":{"type":"string"},"openingBalance":{"type":"number"},"active":{"type":"boolean"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/accounts/{id}":{"delete":{"tags":["accounting"],"summary":"Delete account","operationId":"BankReconciliationController_deleteAccount","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.DELETE"]}]},"put":{"tags":["accounting"],"summary":"Update account","operationId":"BankReconciliationController_updateAccount","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"bankName":{"type":"string"},"accountNumber":{"type":"string"},"openingBalance":{"type":"number"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.UPDATE"]}]}},"/api/v1/accounting/bank-reconciliation/imports":{"get":{"tags":["accounting"],"summary":"Imports","operationId":"BankReconciliationController_imports","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]},"post":{"tags":["accounting"],"summary":"Import statement","operationId":"BankReconciliationController_importStatement","parameters":[{"name":"label","in":"query","required":false,"schema":{"type":"string"}},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"openingBalance","in":"query","required":false,"schema":{"type":"number"}},{"name":"closingBalance","in":"query","required":false,"schema":{"type":"number"}},{"name":"mapping","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/imports/{id}":{"delete":{"tags":["accounting"],"summary":"Delete import","operationId":"BankReconciliationController_deleteImport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.DELETE"]}]}},"/api/v1/accounting/bank-reconciliation/imports/{id}/auto-match":{"post":{"tags":["accounting"],"summary":"Auto match","operationId":"BankReconciliationController_autoMatch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/imports/{id}/lines":{"get":{"tags":["accounting"],"summary":"Lines","operationId":"BankReconciliationController_lines","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/bank-reconciliation/imports/{id}/reconcile-matched":{"post":{"tags":["accounting"],"summary":"Reconcile matched","operationId":"BankReconciliationController_reconcileMatched","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/imports/{id}/summary":{"get":{"tags":["accounting"],"summary":"Summary","operationId":"BankReconciliationController_summary","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/bank-reconciliation/lines/{lineId}/adjust":{"post":{"tags":["accounting"],"summary":"Adjust","operationId":"BankReconciliationController_adjust","parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountKey":{"type":"string"},"note":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/lines/{lineId}/candidates":{"get":{"tags":["accounting"],"summary":"Candidates","operationId":"BankReconciliationController_candidates","parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/bank-reconciliation/lines/{lineId}/ignore":{"post":{"tags":["accounting"],"summary":"Ignore","operationId":"BankReconciliationController_ignore","parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/lines/{lineId}/match":{"post":{"tags":["accounting"],"summary":"Match","operationId":"BankReconciliationController_match","parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"paymentId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/lines/{lineId}/unmatch":{"post":{"tags":["accounting"],"summary":"Unmatch","operationId":"BankReconciliationController_unmatch","parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/preview":{"post":{"tags":["accounting"],"summary":"Preview","operationId":"BankReconciliationController_preview","parameters":[{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/bank-reconciliation/template":{"get":{"tags":["accounting"],"summary":"Template","operationId":"BankReconciliationController_template","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/day-book":{"get":{"tags":["accounting"],"summary":"Get day book","operationId":"DayBookReportController_getDayBook","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/day-book/export":{"get":{"tags":["accounting"],"summary":"Export day book","operationId":"DayBookReportController_exportDayBook","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/account-types":{"get":{"tags":["accounting"],"summary":"Account types","operationId":"GlController_accountTypes","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/accounts":{"get":{"tags":["accounting"],"summary":"Accounts","operationId":"GlController_accounts","parameters":[{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]},"post":{"tags":["accounting"],"summary":"Create account","operationId":"GlController_createAccount","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"required, not blank"},"name":{"type":"string","description":"required, not blank"},"type":{"type":"string"},"subtype":{"type":"string"},"parentCode":{"type":"string"},"description":{"type":"string"}},"required":["name","code"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gl/accounts/{code}":{"delete":{"tags":["accounting"],"summary":"Delete account","operationId":"GlController_deleteAccount","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.DELETE"]}]},"put":{"tags":["accounting"],"summary":"Update account","operationId":"GlController_updateAccount","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"subtype":{"type":"string"},"parentCode":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.UPDATE"]}]}},"/api/v1/accounting/gl/accounts/{code}/transactions":{"get":{"tags":["accounting"],"summary":"Account transactions","operationId":"GlController_accountTransactions","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"0"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":"50"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/accounts/{code}/transactions.csv":{"get":{"tags":["accounting"],"summary":"Account transactions csv","operationId":"GlController_accountTransactionsCsv","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/balance-sheet":{"get":{"tags":["accounting"],"summary":"Balance sheet","operationId":"GlController_balanceSheet","parameters":[{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/chart-of-accounts":{"get":{"tags":["accounting"],"summary":"Chart of accounts","operationId":"GlController_chartOfAccounts","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/journal":{"get":{"tags":["accounting"],"summary":"Journal","operationId":"GlController_journal","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sourceType","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"0"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/journal-entries":{"post":{"tags":["accounting"],"summary":"Create journal entry","operationId":"GlController_createJournalEntry","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"narration":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"}}},"description":"required, not empty, min length 2"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gl/journal-entries/{id}/reverse":{"post":{"tags":["accounting"],"summary":"Reverse journal entry","operationId":"GlController_reverseJournalEntry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gl/opening-balances":{"get":{"tags":["accounting"],"summary":"Opening balances","operationId":"GlController_openingBalances","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]},"post":{"tags":["accounting"],"summary":"Save opening balances","operationId":"GlController_saveOpeningBalances","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"lines":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gl/period-lock":{"get":{"tags":["accounting"],"summary":"Period lock","operationId":"GlController_periodLock","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]},"put":{"tags":["accounting"],"summary":"Set period lock","operationId":"GlController_setPeriodLock","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lockUntil":{"type":"string","format":"date"},"reason":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.UPDATE"]}]}},"/api/v1/accounting/gl/period-lock/history":{"get":{"tags":["accounting"],"summary":"Period lock history","operationId":"GlController_periodLockHistory","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/profit-loss":{"get":{"tags":["accounting"],"summary":"Profit loss","operationId":"GlController_profitLoss","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gl/rebuild":{"post":{"tags":["accounting"],"summary":"Rebuild","operationId":"GlController_rebuild","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gl/trial-balance":{"get":{"tags":["accounting"],"summary":"Trial balance","operationId":"GlController_trialBalance","parameters":[{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gst/gstr1":{"get":{"tags":["accounting"],"summary":"Gstr1","operationId":"GstReturnController_gstr1","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gst/gstr1/file":{"post":{"tags":["accounting"],"summary":"File","operationId":"GstReturnController_file","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"object"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"arn":{"type":"string","description":"max length 100"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gst/gstr1/filing-status":{"get":{"tags":["accounting"],"summary":"Filing status","operationId":"GstReturnController_filingStatus","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"object"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gst/gstr1/gstn-json":{"get":{"tags":["accounting"],"summary":"Gstr1 gstn json","operationId":"GstReturnController_gstr1GstnJson","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"object"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/gst/gstr1/reopen":{"post":{"tags":["accounting"],"summary":"Reopen","operationId":"GstReturnController_reopen","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"object"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.CREATE"]}]}},"/api/v1/accounting/gst/gstr3b":{"get":{"tags":["accounting"],"summary":"Gstr3b","operationId":"GstReturnController_gstr3b","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/bank":{"get":{"tags":["accounting"],"summary":"Get bank ledger","operationId":"BankLedgerController_getBankLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/cash":{"get":{"tags":["accounting"],"summary":"Get cash ledger","operationId":"CashLedgerController_getCashLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/cgst":{"get":{"tags":["accounting"],"summary":"Get cgst ledger","operationId":"CgstLedgerController_getCgstLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/creditors":{"get":{"tags":["accounting"],"summary":"Get creditors ledger","operationId":"CreditorsLedgerController_getCreditorsLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/debtors":{"get":{"tags":["accounting"],"summary":"Get debtors ledger","operationId":"DebtorsLedgerController_getDebtorsLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/igst":{"get":{"tags":["accounting"],"summary":"Get igst ledger","operationId":"IgstLedgerController_getIgstLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/input-{head}":{"get":{"tags":["accounting"],"summary":"Get input tax ledger","operationId":"InputTaxLedgerController_getInputTaxLedger","parameters":[{"name":"head","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/purchase":{"get":{"tags":["accounting"],"summary":"Get purchase ledger","operationId":"PurchaseLedgerController_getPurchaseLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/sales":{"get":{"tags":["accounting"],"summary":"Get sales ledger","operationId":"SalesLedgerController_getSalesLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/sgst":{"get":{"tags":["accounting"],"summary":"Get sgst ledger","operationId":"SgstLedgerController_getSgstLedger","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/ledgers/summary":{"get":{"tags":["accounting"],"summary":"Get summary","operationId":"LedgerSummaryController_getSummary","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/profit-loss":{"get":{"tags":["accounting"],"summary":"Get profit loss","operationId":"ProfitLossController_getProfitLoss","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/accounting/profit-loss/export":{"get":{"tags":["accounting"],"summary":"Export profit loss","operationId":"ProfitLossController_exportProfitLoss","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.accounting.READ"]}]}},"/api/v1/assets":{"get":{"tags":["assets"],"summary":"List","operationId":"AssetController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"post":{"tags":["assets"],"summary":"Create","operationId":"AssetController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetCode":{"type":"string"},"name":{"type":"string","description":"required, not blank"},"categoryId":{"type":"string"},"brand":{"type":"string"},"model":{"type":"string"},"serialNumber":{"type":"string"},"specifications":{"type":"string"},"condition":{"type":"string"},"purchaseDate":{"type":"string","format":"date"},"purchaseCost":{"type":"number"},"salvageValue":{"type":"number"},"usefulLifeYears":{"type":"integer"},"depreciationMethod":{"type":"string"},"depreciationRate":{"type":"number"},"vendorId":{"type":"string"},"warrantyExpiry":{"type":"string","format":"date"},"location":{"type":"string"},"documents":{"type":"string"},"notes":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/approval-workflows":{"get":{"tags":["assets"],"summary":"List","operationId":"AssetApprovalWorkflowController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"post":{"tags":["assets"],"summary":"Create","operationId":"AssetApprovalWorkflowController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"appliesTo":{"type":"string"},"minAmount":{"type":"number"},"isDefault":{"type":"boolean"},"active":{"type":"boolean"},"levels":{"type":"array","items":{"type":"object","properties":{"approverUserId":{"type":"string"},"approverName":{"type":"string"}}}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/approval-workflows/{id}":{"delete":{"tags":["assets"],"summary":"Delete","operationId":"AssetApprovalWorkflowController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]},"put":{"tags":["assets"],"summary":"Update","operationId":"AssetApprovalWorkflowController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"appliesTo":{"type":"string"},"minAmount":{"type":"number"},"isDefault":{"type":"boolean"},"active":{"type":"boolean"},"levels":{"type":"array","items":{"type":"object","properties":{"approverUserId":{"type":"string"},"approverName":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.UPDATE"]}]}},"/api/v1/assets/categories":{"get":{"tags":["assets"],"summary":"List","operationId":"AssetCategoryController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"post":{"tags":["assets"],"summary":"Create","operationId":"AssetCategoryController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"},"depreciationMethod":{"type":"string"},"depreciationRate":{"type":"number"},"usefulLifeYears":{"type":"integer"},"salvagePct":{"type":"number"},"description":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/categories/{id}":{"delete":{"tags":["assets"],"summary":"Delete","operationId":"AssetCategoryController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]},"put":{"tags":["assets"],"summary":"Update","operationId":"AssetCategoryController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"},"depreciationMethod":{"type":"string"},"depreciationRate":{"type":"number"},"usefulLifeYears":{"type":"integer"},"salvagePct":{"type":"number"},"description":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.UPDATE"]}]}},"/api/v1/assets/depreciation":{"get":{"tags":["assets"],"summary":"For asset","operationId":"DepreciationController_forAsset","parameters":[{"name":"assetId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/depreciation/run":{"post":{"tags":["assets"],"summary":"Run","operationId":"DepreciationController_run","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/lookup":{"get":{"tags":["assets"],"summary":"Lookup","operationId":"AssetController_lookup","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/maintenance":{"get":{"tags":["assets"],"summary":"List","operationId":"AssetMaintenanceController_list","parameters":[{"name":"assetId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"post":{"tags":["assets"],"summary":"Create","operationId":"AssetMaintenanceController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","description":"required, not blank"},"kind":{"type":"string"},"title":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"scheduledDate":{"type":"string","format":"date"},"nextDueDate":{"type":"string","format":"date"},"cost":{"type":"number"},"vendorId":{"type":"string"},"requestedBy":{"type":"string"},"assignedTo":{"type":"string"},"recurrenceDays":{"type":"integer"}},"required":["title","assetId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/maintenance/{id}":{"delete":{"tags":["assets"],"summary":"Delete","operationId":"AssetMaintenanceController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]}},"/api/v1/assets/maintenance/{id}/status":{"post":{"tags":["assets"],"summary":"Update status","operationId":"AssetMaintenanceController_updateStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"completedDate":{"type":"string","format":"date"},"cost":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests":{"get":{"tags":["assets"],"summary":"List","operationId":"AssetRequestController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"post":{"tags":["assets"],"summary":"Create","operationId":"AssetRequestController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"requestedBy":{"type":"string"},"priority":{"type":"string"},"categoryId":{"type":"string"},"assetId":{"type":"string"},"vendorId":{"type":"string"},"quantity":{"type":"number"},"estimatedCost":{"type":"number"},"notes":{"type":"string"},"approvers":{"type":"array","items":{"type":"string"}}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests/{id}":{"delete":{"tags":["assets"],"summary":"Delete","operationId":"AssetRequestController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]},"get":{"tags":["assets"],"summary":"Get","operationId":"AssetRequestController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/requests/{id}/approve":{"post":{"tags":["assets"],"summary":"Approve","operationId":"AssetRequestController_approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests/{id}/cancel":{"post":{"tags":["assets"],"summary":"Cancel","operationId":"AssetRequestController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests/{id}/fulfil":{"post":{"tags":["assets"],"summary":"Fulfil","operationId":"AssetRequestController_fulfil","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests/{id}/reject":{"post":{"tags":["assets"],"summary":"Reject","operationId":"AssetRequestController_reject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/requests/{id}/submit":{"post":{"tags":["assets"],"summary":"Submit","operationId":"AssetRequestController_submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/settings":{"get":{"tags":["assets"],"summary":"Get","operationId":"AssetSettingsController_get","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"put":{"tags":["assets"],"summary":"Update","operationId":"AssetSettingsController_update","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"codePrefix":{"type":"string"},"codePadding":{"type":"integer"},"defaultDepreciationMethod":{"type":"string"},"warrantyReminderDays":{"type":"integer"},"requireApproval":{"type":"boolean"},"notifyApprovers":{"type":"boolean"},"autoGeneratePreventive":{"type":"boolean"},"preventiveLeadDays":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.UPDATE"]}]}},"/api/v1/assets/summary":{"get":{"tags":["assets"],"summary":"Summary","operationId":"AssetController_summary","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/{id}":{"delete":{"tags":["assets"],"summary":"Delete","operationId":"AssetController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]},"get":{"tags":["assets"],"summary":"Get","operationId":"AssetController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]},"put":{"tags":["assets"],"summary":"Update","operationId":"AssetController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetCode":{"type":"string"},"name":{"type":"string","description":"required, not blank"},"categoryId":{"type":"string"},"brand":{"type":"string"},"model":{"type":"string"},"serialNumber":{"type":"string"},"specifications":{"type":"string"},"condition":{"type":"string"},"purchaseDate":{"type":"string","format":"date"},"purchaseCost":{"type":"number"},"salvageValue":{"type":"number"},"usefulLifeYears":{"type":"integer"},"depreciationMethod":{"type":"string"},"depreciationRate":{"type":"number"},"vendorId":{"type":"string"},"warrantyExpiry":{"type":"string","format":"date"},"location":{"type":"string"},"documents":{"type":"string"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.UPDATE"]}]}},"/api/v1/assets/{id}/assign":{"post":{"tags":["assets"],"summary":"Assign","operationId":"AssetController_assign","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assigneeType":{"type":"string"},"assigneeName":{"type":"string"},"employeeId":{"type":"string"},"location":{"type":"string"},"expectedReturn":{"type":"string","format":"date"},"conditionOut":{"type":"string"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/{id}/checkin":{"post":{"tags":["assets"],"summary":"Checkin","operationId":"AssetController_checkin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditionIn":{"type":"string"},"notes":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/{id}/dispose":{"post":{"tags":["assets"],"summary":"Dispose","operationId":"AssetController_dispose","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"disposalType":{"type":"string"},"disposalValue":{"type":"number"},"date":{"type":"string","format":"date"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/{id}/documents":{"delete":{"tags":["assets"],"summary":"Delete document","operationId":"AssetController_deleteDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.DELETE"]}]},"post":{"tags":["assets"],"summary":"Upload document","operationId":"AssetController_uploadDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/assets/{id}/documents/url":{"get":{"tags":["assets"],"summary":"Document url","operationId":"AssetController_documentUrl","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/{id}/events":{"get":{"tags":["assets"],"summary":"Events","operationId":"AssetController_events","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.READ"]}]}},"/api/v1/assets/{id}/transfer":{"post":{"tags":["assets"],"summary":"Transfer","operationId":"AssetController_transfer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assigneeType":{"type":"string"},"assigneeName":{"type":"string"},"employeeId":{"type":"string"},"location":{"type":"string"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.assets.CREATE"]}]}},"/api/v1/audit-log":{"get":{"tags":["audit-log"],"summary":"List","operationId":"AuditLogController_list","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.audit-log.READ"]}]}},"/api/v1/batches/expiring":{"get":{"tags":["batches"],"summary":"Expiring","operationId":"BatchController_expiring","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.batches.READ"]}]}},"/api/v1/batches/items/{itemId}":{"get":{"tags":["batches"],"summary":"List","operationId":"BatchController_list","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.batches.READ"]}]}},"/api/v1/batches/items/{itemId}/stock-in":{"post":{"tags":["batches"],"summary":"Stock in","operationId":"BatchController_stockIn","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"batchNumber":{"type":"string"},"expiryDate":{"type":"string","format":"date"},"quantity":{"type":"number","description":"required"},"unitCost":{"type":"number"}},"required":["quantity"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.batches.CREATE"]}]}},"/api/v1/batches/items/{itemId}/tracking":{"put":{"tags":["batches"],"summary":"Set tracking","operationId":"BatchController_setTracking","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.batches.UPDATE"]}]}},"/api/v1/bills":{"get":{"tags":["bills"],"summary":"List bills","operationId":"BillController_listBills","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.READ"]}]},"post":{"tags":["bills"],"summary":"Create bill","operationId":"BillController_createBill","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"billNumber":{"type":"string","description":"max length 50"},"vendorBillNumber":{"type":"string","description":"max length 50"},"billDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string"},"quantity":{"type":"number","description":"required, >= 0.01"},"unit":{"type":"string"},"rate":{"type":"number","description":"required, >= 0.01"},"taxRate":{"type":"number","description":">= 0"},"discountPercent":{"type":"number","description":">= 0"},"glAccountId":{"type":"string","format":"uuid"}}},"description":"required, not empty"}},"required":["billDate","items","vendorId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/recurring":{"get":{"tags":["bills"],"summary":"List","operationId":"RecurringBillController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.READ"]}]},"post":{"tags":["bills"],"summary":"Create","operationId":"RecurringBillController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"vendorId":{"type":"string","format":"uuid"},"dueDays":{"type":"integer"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"rate":{"type":"number"},"taxRate":{"type":"number"},"discountPercent":{"type":"number"},"glAccountId":{"type":"string","format":"uuid"}}}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/recurring/from-bill/{billId}":{"post":{"tags":["bills"],"summary":"From bill","operationId":"RecurringBillController_fromBill","parameters":[{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"vendorId":{"type":"string","format":"uuid"},"dueDays":{"type":"integer"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"rate":{"type":"number"},"taxRate":{"type":"number"},"discountPercent":{"type":"number"},"glAccountId":{"type":"string","format":"uuid"}}}}},"required":["name"]}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/recurring/{id}":{"delete":{"tags":["bills"],"summary":"Delete","operationId":"RecurringBillController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.DELETE"]}]},"get":{"tags":["bills"],"summary":"Get","operationId":"RecurringBillController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.READ"]}]},"put":{"tags":["bills"],"summary":"Update","operationId":"RecurringBillController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"vendorId":{"type":"string","format":"uuid"},"dueDays":{"type":"integer"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"rate":{"type":"number"},"taxRate":{"type":"number"},"discountPercent":{"type":"number"},"glAccountId":{"type":"string","format":"uuid"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.UPDATE"]}]}},"/api/v1/bills/recurring/{id}/generate":{"post":{"tags":["bills"],"summary":"Generate","operationId":"RecurringBillController_generate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/recurring/{id}/toggle":{"post":{"tags":["bills"],"summary":"Toggle","operationId":"RecurringBillController_toggle","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/{id}":{"delete":{"tags":["bills"],"summary":"Delete bill","operationId":"BillController_deleteBill","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.DELETE"]}]},"get":{"tags":["bills"],"summary":"Get bill","operationId":"BillController_getBill","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.READ"]}]},"put":{"tags":["bills"],"summary":"Update bill","operationId":"BillController_updateBill","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"billNumber":{"type":"string","description":"max length 50"},"vendorBillNumber":{"type":"string","description":"max length 50"},"billDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string"},"quantity":{"type":"number","description":"required, >= 0.01"},"unit":{"type":"string"},"rate":{"type":"number","description":"required, >= 0.01"},"taxRate":{"type":"number","description":">= 0"},"discountPercent":{"type":"number","description":">= 0"},"glAccountId":{"type":"string","format":"uuid"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.UPDATE"]}]}},"/api/v1/bills/{id}/cancel":{"post":{"tags":["bills"],"summary":"Cancel bill","operationId":"BillController_cancelBill","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/{id}/payments":{"post":{"tags":["bills"],"summary":"Record payment","operationId":"BillController_recordPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"> 0"},"method":{"type":"string"},"reference":{"type":"string"},"date":{"type":"string","format":"date"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.CREATE"]}]}},"/api/v1/bills/{id}/pdf":{"get":{"tags":["bills"],"summary":"Pdf","operationId":"BillController_pdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.READ"]}]}},"/api/v1/bills/{id}/status":{"patch":{"tags":["bills"],"summary":"Update status","operationId":"BillController_updateStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.bills.UPDATE"]}]}},"/api/v1/composite-items":{"get":{"tags":["composite-items"],"summary":"List","operationId":"CompositeItemController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.composite-items.READ"]}]}},"/api/v1/composite-items/{itemId}/assemble":{"post":{"tags":["composite-items"],"summary":"Assemble","operationId":"CompositeItemController_assemble","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}},"required":["quantity"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.composite-items.CREATE"]}]}},"/api/v1/composite-items/{itemId}/components":{"get":{"tags":["composite-items"],"summary":"Get","operationId":"CompositeItemController_get","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.composite-items.READ"]}]},"put":{"tags":["composite-items"],"summary":"Set components","operationId":"CompositeItemController_setComponents","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"components":{"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.composite-items.UPDATE"]}]}},"/api/v1/composite-items/{itemId}/disassemble":{"post":{"tags":["composite-items"],"summary":"Disassemble","operationId":"CompositeItemController_disassemble","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}},"required":["quantity"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.composite-items.CREATE"]}]}},"/api/v1/credit-notes":{"get":{"tags":["credit-notes"],"summary":"List","operationId":"CreditNoteController_list","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.READ"]}]},"post":{"tags":["credit-notes"],"summary":"Create","operationId":"CreditNoteController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string","format":"uuid"},"type":{"type":"string","description":"required, not blank"},"amount":{"type":"number","description":"required, > 0"},"taxableAmount":{"type":"number"},"cgst":{"type":"number"},"sgst":{"type":"number"},"igst":{"type":"number"},"lines":{"type":"array","items":{"type":"object","properties":{"invoiceLineId":{"type":"string","format":"uuid"},"qty":{"type":"number","description":"required, > 0"},"taxableAmount":{"type":"number"},"gstRate":{"type":"number"}}}},"reason":{"type":"string"},"notes":{"type":"string"},"date":{"type":"string","format":"date"}},"required":["amount","invoiceId","type"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/credit-notes/applications":{"get":{"tags":["credit-notes"],"summary":"Applications for invoice","operationId":"CreditNoteController_applicationsForInvoice","parameters":[{"name":"invoiceId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.READ"]}]}},"/api/v1/credit-notes/applications/{applicationId}/reverse":{"post":{"tags":["credit-notes"],"summary":"Reverse application","operationId":"CreditNoteController_reverseApplication","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/credit-notes/refunds/{refundId}/reverse":{"post":{"tags":["credit-notes"],"summary":"Reverse refund","operationId":"CreditNoteController_reverseRefund","parameters":[{"name":"refundId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/credit-notes/{id}":{"delete":{"tags":["credit-notes"],"summary":"Delete","operationId":"CreditNoteController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.DELETE"]}]},"get":{"tags":["credit-notes"],"summary":"Get","operationId":"CreditNoteController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.READ"]}]}},"/api/v1/credit-notes/{id}/applications":{"post":{"tags":["credit-notes"],"summary":"Apply","operationId":"CreditNoteController_apply","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","format":"uuid"},"amount":{"type":"number","description":"required, > 0"},"appliedDate":{"type":"string","format":"date"}}},"required":["invoiceId","amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/credit-notes/{id}/cancel":{"post":{"tags":["credit-notes"],"summary":"Cancel","operationId":"CreditNoteController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/credit-notes/{id}/refunds":{"post":{"tags":["credit-notes"],"summary":"Refund","operationId":"CreditNoteController_refund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"required, > 0"},"refundDate":{"type":"string","format":"date"},"method":{"type":"string","description":"max length 50"},"reference":{"type":"string","description":"max length 200"}},"required":["amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.credit-notes.CREATE"]}]}},"/api/v1/crm/dashboard":{"get":{"tags":["crm"],"summary":"Dashboard","operationId":"CrmDashboardController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.crm.READ"]}]}},"/api/v1/customers":{"get":{"tags":["customers"],"summary":"List","operationId":"CustomerController_list","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.customers.READ"]}]},"post":{"tags":["customers"],"summary":"Create","operationId":"CustomerController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"phone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string","description":"format: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$"},"defaultSupplyType":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"status":{"type":"string"},"priceListId":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.customers.CREATE"]}]}},"/api/v1/customers/{id}":{"delete":{"tags":["customers"],"summary":"Delete","operationId":"CustomerController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.customers.DELETE"]}]},"get":{"tags":["customers"],"summary":"Get","operationId":"CustomerController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.customers.READ"]}]},"put":{"tags":["customers"],"summary":"Update","operationId":"CustomerController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"phone":{"type":"string"},"email":{"type":"string"},"gstin":{"type":"string","description":"format: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$"},"defaultSupplyType":{"type":"string"},"billingAddress":{"type":"string"},"shippingAddress":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"status":{"type":"string"},"priceListId":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.customers.UPDATE"]}]}},"/api/v1/dashboard-data/batch":{"post":{"tags":["dashboard-data"],"summary":"Batch","operationId":"DashboardDataController_batch","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.dashboard-data.CREATE"]}]}},"/api/v1/dashboard-data/catalog":{"get":{"tags":["dashboard-data"],"summary":"Catalog","operationId":"DashboardDataController_catalog","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.dashboard-data.READ"]}]}},"/api/v1/dashboard-data/query":{"post":{"tags":["dashboard-data"],"summary":"Query","operationId":"DashboardDataController_query","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.dashboard-data.CREATE"]}]}},"/api/v1/daybook":{"get":{"tags":["daybook"],"summary":"Get day book entries","operationId":"DayBookController_getDayBookEntries","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.daybook.READ"]}]}},"/api/v1/daybook/summary":{"get":{"tags":["daybook"],"summary":"Get day book summary","operationId":"DayBookController_getDayBookSummary","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.daybook.READ"]}]}},"/api/v1/document-email-settings":{"get":{"tags":["document-email-settings"],"summary":"Settings","operationId":"DocumentEmailController_settings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.document-email-settings.READ"]}]},"put":{"tags":["document-email-settings"],"summary":"Save settings","operationId":"DocumentEmailController_saveSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"senderMode":{"type":"string"},"sharedMailbox":{"type":"string"},"mailConnected":{"type":"boolean"},"remindersEnabled":{"type":"boolean"},"reminderDaysBefore":{"type":"integer"},"reminderOnDue":{"type":"boolean"},"reminderDaysAfter":{"type":"string"},"recurringAutoEmail":{"type":"boolean"},"receiptEmail":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.document-email-settings.UPDATE"]}]}},"/api/v1/document-emails":{"get":{"tags":["document-emails"],"summary":"For party","operationId":"DocumentEmailController_forParty","parameters":[{"name":"partyType","in":"query","required":true,"schema":{"type":"string"}},{"name":"partyId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.document-emails.READ"]}]}},"/api/v1/documents/{kind}/{gid}/email":{"get":{"tags":["documents"],"summary":"Draft","operationId":"DocumentEmailController_draft","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.documents.READ"]}]},"post":{"tags":["documents"],"summary":"Send","operationId":"DocumentEmailController_send","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.documents.CREATE"]}]}},"/api/v1/documents/{kind}/{gid}/emails":{"get":{"tags":["documents"],"summary":"History","operationId":"DocumentEmailController_history","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.documents.READ"]}]}},"/api/v1/documents/{kind}/{gid}/pdf":{"get":{"tags":["documents"],"summary":"Pdf","operationId":"DocumentEmailController_pdf","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.documents.READ"]}]}},"/api/v1/drive":{"get":{"tags":["drive"],"summary":"List","operationId":"DriveController_list","parameters":[{"name":"folderId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/access":{"get":{"tags":["drive"],"summary":"Access","operationId":"DriveController_access","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/activity":{"get":{"tags":["drive"],"summary":"Activity","operationId":"DriveController_activity","parameters":[{"name":"itemId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"100"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/dashboard":{"get":{"tags":["drive"],"summary":"Dashboard","operationId":"DriveController_dashboard","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files":{"post":{"tags":["drive"],"summary":"Upload","operationId":"DriveController_upload","parameters":[{"name":"folderId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/blank":{"post":{"tags":["drive"],"summary":"Create blank","operationId":"DriveController_createBlank","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"folderId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/{gid}":{"delete":{"tags":["drive"],"summary":"Delete file","operationId":"DriveController_deleteFile","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]},"get":{"tags":["drive"],"summary":"File info","operationId":"DriveController_fileInfo","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files/{gid}/download":{"get":{"tags":["drive"],"summary":"Download","operationId":"DriveController_download","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files/{gid}/editor-config":{"get":{"tags":["drive"],"summary":"Editor config","operationId":"DriveController_editorConfig","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files/{gid}/rename":{"post":{"tags":["drive"],"summary":"Rename file","operationId":"DriveController_renameFile","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/{gid}/share-links":{"get":{"tags":["drive"],"summary":"List links","operationId":"DriveShareController_listLinks","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"post":{"tags":["drive"],"summary":"Create link","operationId":"DriveShareController_createLink","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"string"},"expiresInDays":{"type":"integer"},"password":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/{gid}/shares":{"get":{"tags":["drive"],"summary":"List shares","operationId":"DriveShareController_listShares","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"post":{"tags":["drive"],"summary":"Add share","operationId":"DriveShareController_addShare","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permission":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/{gid}/stop-sharing":{"post":{"tags":["drive"],"summary":"Stop sharing","operationId":"DriveShareController_stopSharing","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/files/{gid}/versions":{"get":{"tags":["drive"],"summary":"Versions","operationId":"DriveController_versions","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files/{gid}/versions/{versionGid}/download":{"get":{"tags":["drive"],"summary":"Download version","operationId":"DriveController_downloadVersion","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"versionGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/files/{gid}/versions/{versionGid}/restore":{"post":{"tags":["drive"],"summary":"Restore version","operationId":"DriveController_restoreVersion","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"versionGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/folder-shares/{shareGid}":{"delete":{"tags":["drive"],"summary":"Remove folder share","operationId":"DriveShareController_removeFolderShare","parameters":[{"name":"shareGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]}},"/api/v1/drive/folders":{"post":{"tags":["drive"],"summary":"Create folder","operationId":"DriveController_createFolder","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parentId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/folders/{gid}":{"delete":{"tags":["drive"],"summary":"Delete folder","operationId":"DriveController_deleteFolder","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]}},"/api/v1/drive/folders/{gid}/rename":{"post":{"tags":["drive"],"summary":"Rename folder","operationId":"DriveController_renameFolder","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/folders/{gid}/requests":{"get":{"tags":["drive"],"summary":"List","operationId":"DriveFileRequestController_list","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"post":{"tags":["drive"],"summary":"Create","operationId":"DriveFileRequestController_create","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"expiresInDays":{"type":"integer"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/folders/{gid}/shares":{"get":{"tags":["drive"],"summary":"List folder shares","operationId":"DriveShareController_listFolderShares","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"post":{"tags":["drive"],"summary":"Add folder share","operationId":"DriveShareController_addFolderShare","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permission":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/folders/{gid}/stop-sharing":{"post":{"tags":["drive"],"summary":"Stop sharing folder","operationId":"DriveShareController_stopSharingFolder","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/largest":{"get":{"tags":["drive"],"summary":"Largest","operationId":"DriveController_largest","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/limits":{"get":{"tags":["drive"],"summary":"Limits","operationId":"DriveController_limits","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"put":{"tags":["drive"],"summary":"Save limits","operationId":"DriveController_saveLimits","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"defaultMb":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"limitMb":{"type":"integer"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.UPDATE"]}]}},"/api/v1/drive/me/storage":{"get":{"tags":["drive"],"summary":"My storage","operationId":"DriveController_myStorage","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/recent":{"get":{"tags":["drive"],"summary":"Recent","operationId":"DriveController_recent","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/records/{type}/{gid}":{"get":{"tags":["drive"],"summary":"Record folder","operationId":"DriveController_recordFolder","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/requests/{gid}/close":{"post":{"tags":["drive"],"summary":"Close","operationId":"DriveFileRequestController_close","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/search":{"get":{"tags":["drive"],"summary":"Search","operationId":"DriveController_search","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/share-links/{linkGid}":{"delete":{"tags":["drive"],"summary":"Revoke link","operationId":"DriveShareController_revokeLink","parameters":[{"name":"linkGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]}},"/api/v1/drive/shareable-members":{"get":{"tags":["drive"],"summary":"Members","operationId":"DriveShareController_members","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/shared-by-me":{"get":{"tags":["drive"],"summary":"Shared by me","operationId":"DriveShareController_sharedByMe","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/shared-with-me":{"get":{"tags":["drive"],"summary":"Shared with me","operationId":"DriveShareController_sharedWithMe","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/shared-with-me/folders":{"get":{"tags":["drive"],"summary":"Folders shared with me","operationId":"DriveShareController_foldersSharedWithMe","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/shares/{shareGid}":{"delete":{"tags":["drive"],"summary":"Remove share","operationId":"DriveShareController_removeShare","parameters":[{"name":"shareGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]}},"/api/v1/drive/team-drives":{"get":{"tags":["drive"],"summary":"Team drives","operationId":"DriveController_teamDrives","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]},"post":{"tags":["drive"],"summary":"Create team drive","operationId":"DriveController_createTeamDrive","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/trash":{"delete":{"tags":["drive"],"summary":"Empty trash","operationId":"DriveController_emptyTrash","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]},"get":{"tags":["drive"],"summary":"Trash","operationId":"DriveController_trash","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/drive/trash/{kind}/{gid}":{"delete":{"tags":["drive"],"summary":"Purge","operationId":"DriveController_purge","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.DELETE"]}]}},"/api/v1/drive/trash/{kind}/{gid}/restore":{"post":{"tags":["drive"],"summary":"Restore","operationId":"DriveController_restore","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.CREATE"]}]}},"/api/v1/drive/usage":{"get":{"tags":["drive"],"summary":"Usage","operationId":"DriveController_usage","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.drive.READ"]}]}},"/api/v1/email-templates":{"get":{"tags":["email-templates"],"summary":"List","operationId":"EmailTemplateController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.email-templates.READ"]}]},"post":{"tags":["email-templates"],"summary":"Create","operationId":"EmailTemplateController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"channel":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string","description":"required, not blank"}},"required":["body","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.email-templates.CREATE"]}]}},"/api/v1/email-templates/samples":{"post":{"tags":["email-templates"],"summary":"Add samples","operationId":"EmailTemplateController_addSamples","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.email-templates.CREATE"]}]}},"/api/v1/email-templates/{gid}":{"delete":{"tags":["email-templates"],"summary":"Delete","operationId":"EmailTemplateController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.email-templates.DELETE"]}]},"put":{"tags":["email-templates"],"summary":"Update","operationId":"EmailTemplateController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"channel":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string","description":"required, not blank"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.email-templates.UPDATE"]}]}},"/api/v1/expense-categories":{"get":{"tags":["expense-categories"],"summary":"List","operationId":"ExpenseCategoryController_list","parameters":[{"name":"activeOnly","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expense-categories.READ"]}]},"post":{"tags":["expense-categories"],"summary":"Create","operationId":"ExpenseCategoryController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"glCode":{"type":"string"},"monthlyLimit":{"type":"number"},"perExpenseLimit":{"type":"number"},"receiptRequiredAbove":{"type":"number"},"gstEligible":{"type":"boolean"},"color":{"type":"string"},"sortOrder":{"type":"integer"},"active":{"type":"boolean"},"glAccountId":{"type":"string","format":"uuid"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expense-categories.CREATE"]}]}},"/api/v1/expense-categories/gl-accounts":{"get":{"tags":["expense-categories"],"summary":"Gl accounts","operationId":"ExpenseCategoryController_glAccounts","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expense-categories.READ"]}]}},"/api/v1/expense-categories/{id}":{"delete":{"tags":["expense-categories"],"summary":"Delete","operationId":"ExpenseCategoryController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expense-categories.DELETE"]}]},"put":{"tags":["expense-categories"],"summary":"Update","operationId":"ExpenseCategoryController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"glCode":{"type":"string"},"monthlyLimit":{"type":"number"},"perExpenseLimit":{"type":"number"},"receiptRequiredAbove":{"type":"number"},"gstEligible":{"type":"boolean"},"color":{"type":"string"},"sortOrder":{"type":"integer"},"active":{"type":"boolean"},"glAccountId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expense-categories.UPDATE"]}]}},"/api/v1/expenses":{"get":{"tags":["expenses"],"summary":"List","operationId":"ExpenseController_list","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"mine"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"post":{"tags":["expenses"],"summary":"Create","operationId":"ExpenseController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank"},"notes":{"type":"string"},"reimburseViaPayroll":{"type":"boolean"},"projectId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid"},"expenseDate":{"type":"string","format":"date"},"merchant":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"gstRate":{"type":"number"},"paidVia":{"type":"string"},"billable":{"type":"boolean"},"projectId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"isMileage":{"type":"boolean"},"distanceKm":{"type":"number"},"ratePerKm":{"type":"number"},"receiptObjectKey":{"type":"string"},"receiptName":{"type":"string"},"receiptContentType":{"type":"string"},"receiptSize":{"type":"integer"}}}}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/approval-workflows":{"get":{"tags":["expenses"],"summary":"List","operationId":"ExpenseApprovalWorkflowController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"post":{"tags":["expenses"],"summary":"Create","operationId":"ExpenseApprovalWorkflowController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"minAmount":{"type":"number"},"isDefault":{"type":"boolean"},"active":{"type":"boolean"},"levels":{"type":"array","items":{"type":"object","properties":{"approverUserId":{"type":"string"},"approverName":{"type":"string"}}}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/approval-workflows/{id}":{"delete":{"tags":["expenses"],"summary":"Delete","operationId":"ExpenseApprovalWorkflowController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.DELETE"]}]},"put":{"tags":["expenses"],"summary":"Update","operationId":"ExpenseApprovalWorkflowController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"minAmount":{"type":"number"},"isDefault":{"type":"boolean"},"active":{"type":"boolean"},"levels":{"type":"array","items":{"type":"object","properties":{"approverUserId":{"type":"string"},"approverName":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.UPDATE"]}]}},"/api/v1/expenses/dashboard":{"get":{"tags":["expenses"],"summary":"Dashboard","operationId":"ExpenseController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]}},"/api/v1/expenses/receipts":{"post":{"tags":["expenses"],"summary":"Upload receipt","operationId":"ExpenseController_uploadReceipt","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/recurring":{"get":{"tags":["expenses"],"summary":"List","operationId":"RecurringExpenseController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"post":{"tags":["expenses"],"summary":"Create","operationId":"RecurringExpenseController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"categoryId":{"type":"string","format":"uuid"},"merchant":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"gstRate":{"type":"number"},"paidThrough":{"type":"string"},"billable":{"type":"boolean"},"customerId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/recurring/from-claim/{claimId}":{"post":{"tags":["expenses"],"summary":"From claim","operationId":"RecurringExpenseController_fromClaim","parameters":[{"name":"claimId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"categoryId":{"type":"string","format":"uuid"},"merchant":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"gstRate":{"type":"number"},"paidThrough":{"type":"string"},"billable":{"type":"boolean"},"customerId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"}},"required":["name"]}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/recurring/{id}":{"delete":{"tags":["expenses"],"summary":"Delete","operationId":"RecurringExpenseController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.DELETE"]}]},"get":{"tags":["expenses"],"summary":"Get","operationId":"RecurringExpenseController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"put":{"tags":["expenses"],"summary":"Update","operationId":"RecurringExpenseController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"categoryId":{"type":"string","format":"uuid"},"merchant":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"gstRate":{"type":"number"},"paidThrough":{"type":"string"},"billable":{"type":"boolean"},"customerId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"frequency":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"nextDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.UPDATE"]}]}},"/api/v1/expenses/recurring/{id}/generate":{"post":{"tags":["expenses"],"summary":"Generate","operationId":"RecurringExpenseController_generate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/recurring/{id}/toggle":{"post":{"tags":["expenses"],"summary":"Toggle","operationId":"RecurringExpenseController_toggle","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/settings":{"get":{"tags":["expenses"],"summary":"Get settings","operationId":"ExpenseController_getSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"put":{"tags":["expenses"],"summary":"Update settings","operationId":"ExpenseController_updateSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.UPDATE"]}]}},"/api/v1/expenses/{id}":{"delete":{"tags":["expenses"],"summary":"Delete","operationId":"ExpenseController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.DELETE"]}]},"get":{"tags":["expenses"],"summary":"Get","operationId":"ExpenseController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.READ"]}]},"put":{"tags":["expenses"],"summary":"Update","operationId":"ExpenseController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank"},"notes":{"type":"string"},"reimburseViaPayroll":{"type":"boolean"},"projectId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid"},"expenseDate":{"type":"string","format":"date"},"merchant":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"gstRate":{"type":"number"},"paidVia":{"type":"string"},"billable":{"type":"boolean"},"projectId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"isMileage":{"type":"boolean"},"distanceKm":{"type":"number"},"ratePerKm":{"type":"number"},"receiptObjectKey":{"type":"string"},"receiptName":{"type":"string"},"receiptContentType":{"type":"string"},"receiptSize":{"type":"integer"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.UPDATE"]}]}},"/api/v1/expenses/{id}/approve":{"post":{"tags":["expenses"],"summary":"Approve","operationId":"ExpenseController_approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/{id}/cancel":{"post":{"tags":["expenses"],"summary":"Cancel","operationId":"ExpenseController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/{id}/finance-approve":{"post":{"tags":["expenses"],"summary":"Finance approve","operationId":"ExpenseController_financeApprove","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/{id}/reimburse":{"post":{"tags":["expenses"],"summary":"Reimburse","operationId":"ExpenseController_reimburse","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string"},"reference":{"type":"string"},"date":{"type":"string","format":"date"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/{id}/reject":{"post":{"tags":["expenses"],"summary":"Reject","operationId":"ExpenseController_reject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/expenses/{id}/submit":{"post":{"tags":["expenses"],"summary":"Submit","operationId":"ExpenseController_submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.expenses.CREATE"]}]}},"/api/v1/health":{"get":{"tags":["health"],"summary":"Health","operationId":"HealthController_health","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.health.READ"]}]}},"/api/v1/import-jobs":{"get":{"tags":["import-jobs"],"summary":"Recent","operationId":"ImportJobController_recent","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.import-jobs.READ"]}]}},"/api/v1/import-jobs/{id}":{"get":{"tags":["import-jobs"],"summary":"Get","operationId":"ImportJobController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.import-jobs.READ"]}]}},"/api/v1/import-jobs/{id}/cancel":{"post":{"tags":["import-jobs"],"summary":"Cancel","operationId":"ImportJobController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.import-jobs.CREATE"]}]}},"/api/v1/import-jobs/{id}/confirm":{"post":{"tags":["import-jobs"],"summary":"Confirm","operationId":"ImportJobController_confirm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mapping":{"type":"object","additionalProperties":{"type":"string"}},"label":{"type":"string"},"bankAccountId":{"type":"string","format":"uuid"},"openingBalance":{"type":"number"},"closingBalance":{"type":"number"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.import-jobs.CREATE"]}]}},"/api/v1/import-jobs/{id}/errors.csv":{"get":{"tags":["import-jobs"],"summary":"Errors","operationId":"ImportJobController_errors","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.import-jobs.READ"]}]}},"/api/v1/integrations/catalog":{"get":{"tags":["integrations"],"summary":"Catalog","operationId":"IntegrationController_catalog","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]}},"/api/v1/integrations/connections":{"get":{"tags":["integrations"],"summary":"List","operationId":"IntegrationController_list","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]},"post":{"tags":["integrations"],"summary":"Create","operationId":"IntegrationController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string","description":"required, not blank, max length 120"},"enabled":{"type":"boolean"},"targetUrl":{"type":"string","description":"max length 2000"},"events":{"type":"array","items":{"type":"string"}},"inboundAction":{"type":"string"},"userGids":{"type":"array","items":{"type":"string"}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/connections/{id}":{"delete":{"tags":["integrations"],"summary":"Delete","operationId":"IntegrationController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.DELETE"]}]},"get":{"tags":["integrations"],"summary":"Get","operationId":"IntegrationController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]},"put":{"tags":["integrations"],"summary":"Update","operationId":"IntegrationController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string","description":"required, not blank, max length 120"},"enabled":{"type":"boolean"},"targetUrl":{"type":"string","description":"max length 2000"},"events":{"type":"array","items":{"type":"string"}},"inboundAction":{"type":"string"},"userGids":{"type":"array","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.UPDATE"]}]}},"/api/v1/integrations/connections/{id}/deliveries":{"get":{"tags":["integrations"],"summary":"Deliveries","operationId":"IntegrationController_deliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]}},"/api/v1/integrations/connections/{id}/enable":{"post":{"tags":["integrations"],"summary":"Enable","operationId":"IntegrationController_enable","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/connections/{id}/regenerate-secret":{"post":{"tags":["integrations"],"summary":"Regenerate","operationId":"IntegrationController_regenerate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/connections/{id}/test":{"post":{"tags":["integrations"],"summary":"Test","operationId":"IntegrationController_test","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/deliveries/{id}/resend":{"post":{"tags":["integrations"],"summary":"Resend","operationId":"IntegrationController_resend","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/events/{key}/sample":{"get":{"tags":["integrations"],"summary":"Sample","operationId":"IntegrationController_sample","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]}},"/api/v1/integrations/hooks":{"post":{"tags":["integrations"],"summary":"Subscribe hook","operationId":"IntegrationController_subscribeHook","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string"},"targetUrl":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/hooks/{id}":{"delete":{"tags":["integrations"],"summary":"Unsubscribe hook","operationId":"IntegrationController_unsubscribeHook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.DELETE"]}]}},"/api/v1/integrations/mail-links":{"get":{"tags":["integrations"],"summary":"Overview","operationId":"MailLinkController_overview","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]},"post":{"tags":["integrations"],"summary":"Create","operationId":"MailLinkController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"string"},"userId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/mail-links/mailboxes":{"delete":{"tags":["integrations"],"summary":"Delete mailbox","operationId":"MailLinkController_deleteMailbox","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.DELETE"]}]},"post":{"tags":["integrations"],"summary":"Create mailbox","operationId":"MailLinkController_createMailbox","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/integrations/mail-links/usage":{"get":{"tags":["integrations"],"summary":"Usage","operationId":"MailLinkController_usage","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.READ"]}]}},"/api/v1/integrations/mail-links/{id}":{"delete":{"tags":["integrations"],"summary":"Delete","operationId":"MailLinkController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.DELETE"]}]}},"/api/v1/integrations/oauth/start":{"post":{"tags":["integrations"],"summary":"Start oauth","operationId":"IntegrationController_startOAuth","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"connectionId":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.integrations.CREATE"]}]}},"/api/v1/inventory-adjustments":{"get":{"tags":["inventory-adjustments"],"summary":"List","operationId":"InventoryAdjustmentController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory-adjustments.READ"]}]},"post":{"tags":["inventory-adjustments"],"summary":"Create","operationId":"InventoryAdjustmentController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"adjustmentDate":{"type":"string","format":"date"},"reason":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}},"description":"required, not empty"}},"required":["items","adjustmentDate"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory-adjustments.CREATE"]}]}},"/api/v1/inventory-adjustments/{id}":{"get":{"tags":["inventory-adjustments"],"summary":"Get","operationId":"InventoryAdjustmentController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory-adjustments.READ"]}]}},"/api/v1/inventory-adjustments/{id}/cancel":{"post":{"tags":["inventory-adjustments"],"summary":"Cancel","operationId":"InventoryAdjustmentController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory-adjustments.CREATE"]}]}},"/api/v1/inventory/add-stock":{"post":{"tags":["inventory"],"summary":"Add stock","operationId":"InventoryController_addStock","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required, >= 1"}},"required":["quantity","itemId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/barcode-preview":{"get":{"tags":["inventory"],"summary":"Barcode preview","operationId":"InventoryController_barcodePreview","parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","default":"CODE_128"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/categories":{"get":{"tags":["inventory"],"summary":"List categories","operationId":"InventoryController_listCategories","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create category","operationId":"InventoryController_createCategory","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/categories/{id}":{"delete":{"tags":["inventory"],"summary":"Delete category","operationId":"InventoryController_deleteCategory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.DELETE"]}]},"put":{"tags":["inventory"],"summary":"Update category","operationId":"InventoryController_updateCategory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/custom-fields":{"get":{"tags":["inventory"],"summary":"List custom fields","operationId":"InventoryController_listCustomFields","parameters":[{"name":"activeOnly","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create custom field","operationId":"InventoryController_createCustomField","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"required, not blank"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","SELECT","PHONE","FILE"]},"options":{"type":"string"},"required":{"type":"boolean"},"active":{"type":"boolean"},"sortOrder":{"type":"integer"}},"required":["label"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/custom-fields/{id}":{"delete":{"tags":["inventory"],"summary":"Delete custom field","operationId":"InventoryController_deleteCustomField","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.DELETE"]}]},"put":{"tags":["inventory"],"summary":"Update custom field","operationId":"InventoryController_updateCustomField","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"required, not blank"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","SELECT","PHONE","FILE"]},"options":{"type":"string"},"required":{"type":"boolean"},"active":{"type":"boolean"},"sortOrder":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/dashboard":{"get":{"tags":["inventory"],"summary":"Dashboard","operationId":"InventoryDashboardController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/items":{"get":{"tags":["inventory"],"summary":"List items","operationId":"InventoryController_listItems","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"trackInventory","in":"query","required":false,"schema":{"type":"boolean","default":"true"}},{"name":"lowStock","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create item","operationId":"InventoryController_createItem","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"sku":{"type":"string","description":"required, not blank"},"barcode":{"type":"string"},"autoGenerateBarcode":{"type":"boolean"},"customFields":{"type":"object","additionalProperties":{"type":"string"}},"category":{"type":"string"},"hsn":{"type":"string"},"price":{"type":"number","description":">= 0"},"cost":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"unit":{"type":"string"},"purchaseUnit":{"type":"string"},"uomConversion":{"type":"number"},"onHand":{"type":"number","description":">= 0"},"openingStocks":{"type":"array","items":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"qty":{"type":"number","description":">= 0"}}}},"reorderLevel":{"type":"number","description":">= 0"},"trackInventory":{"type":"boolean"}},"required":["sku","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/import":{"post":{"tags":["inventory"],"summary":"Import items","operationId":"InventoryController_importItems","parameters":[{"name":"warehouseId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stockMode","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/import-template":{"get":{"tags":["inventory"],"summary":"Item import template","operationId":"InventoryController_itemImportTemplate","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/items/{id}":{"get":{"tags":["inventory"],"summary":"Get item","operationId":"InventoryController_getItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"put":{"tags":["inventory"],"summary":"Update item","operationId":"InventoryController_updateItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"sku":{"type":"string","description":"required, not blank"},"barcode":{"type":"string"},"autoGenerateBarcode":{"type":"boolean"},"customFields":{"type":"object","additionalProperties":{"type":"string"}},"category":{"type":"string"},"hsn":{"type":"string"},"price":{"type":"number","description":">= 0"},"cost":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"unit":{"type":"string"},"purchaseUnit":{"type":"string"},"uomConversion":{"type":"number"},"onHand":{"type":"number","description":">= 0"},"openingStocks":{"type":"array","items":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"qty":{"type":"number","description":">= 0"}}}},"reorderLevel":{"type":"number","description":">= 0"},"trackInventory":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/items/{id}/barcode":{"post":{"tags":["inventory"],"summary":"Generate barcode","operationId":"InventoryController_generateBarcode","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/{id}/image":{"get":{"tags":["inventory"],"summary":"Get item image","operationId":"InventoryController_getItemImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Upload item image","operationId":"InventoryController_uploadItemImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/{id}/image/remove":{"post":{"tags":["inventory"],"summary":"Remove item image","operationId":"InventoryController_removeItemImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/{id}/stock-adjustments":{"post":{"tags":["inventory"],"summary":"Adjust stock","operationId":"InventoryController_adjustStock","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"qty":{"type":"number","description":"required"},"warehouseId":{"type":"string","format":"uuid"},"type":{"type":"string"},"reason":{"type":"string"},"reference":{"type":"string"},"unitCost":{"type":"number","description":">= 0"}},"required":["qty"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/items/{id}/stock-movements":{"get":{"tags":["inventory"],"summary":"List movements","operationId":"InventoryController_listMovements","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/items/{itemId}/custom-fields/{fieldKey}/file":{"get":{"tags":["inventory"],"summary":"Get item custom field file","operationId":"InventoryController_getItemCustomFieldFile","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fieldKey","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/items/{itemId}/custom-fields/{fieldKey}/upload":{"post":{"tags":["inventory"],"summary":"Upload item custom field file","operationId":"InventoryController_uploadItemCustomFieldFile","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fieldKey","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/label-templates":{"get":{"tags":["inventory"],"summary":"List label templates","operationId":"InventoryController_listLabelTemplates","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create label template","operationId":"InventoryController_createLabelTemplate","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"pageType":{"type":"string"},"labelWidthMm":{"type":"number"},"labelHeightMm":{"type":"number"},"columns":{"type":"integer"},"marginTopMm":{"type":"number"},"marginLeftMm":{"type":"number"},"hGapMm":{"type":"number"},"vGapMm":{"type":"number"},"symbology":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"showBorder":{"type":"boolean"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/label-templates/{id}":{"delete":{"tags":["inventory"],"summary":"Delete label template","operationId":"InventoryController_deleteLabelTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.DELETE"]}]},"put":{"tags":["inventory"],"summary":"Update label template","operationId":"InventoryController_updateLabelTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"pageType":{"type":"string"},"labelWidthMm":{"type":"number"},"labelHeightMm":{"type":"number"},"columns":{"type":"integer"},"marginTopMm":{"type":"number"},"marginLeftMm":{"type":"number"},"hGapMm":{"type":"number"},"vGapMm":{"type":"number"},"symbology":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"showBorder":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/labels":{"post":{"tags":["inventory"],"summary":"Print labels","operationId":"InventoryController_printLabels","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"qty":{"type":"integer"}}}},"templateId":{"type":"string","format":"uuid"},"pageType":{"type":"string"},"labelWidthMm":{"type":"number"},"labelHeightMm":{"type":"number"},"columns":{"type":"integer"},"marginTopMm":{"type":"number"},"marginLeftMm":{"type":"number"},"hGapMm":{"type":"number"},"vGapMm":{"type":"number"},"symbology":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"showBorder":{"type":"boolean"},"startOffset":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/reconcile-onhand":{"post":{"tags":["inventory"],"summary":"Reconcile on hand","operationId":"InventoryController_reconcileOnHand","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/stock-settings":{"get":{"tags":["inventory"],"summary":"Get stock settings","operationId":"InventoryController_getStockSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"put":{"tags":["inventory"],"summary":"Update stock settings","operationId":"InventoryController_updateStockSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/units":{"get":{"tags":["inventory"],"summary":"List units","operationId":"InventoryController_listUnits","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create unit","operationId":"InventoryController_createUnit","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/units/{id}":{"delete":{"tags":["inventory"],"summary":"Delete unit","operationId":"InventoryController_deleteUnit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.DELETE"]}]},"put":{"tags":["inventory"],"summary":"Update unit","operationId":"InventoryController_updateUnit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"displayOrder":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/valuation":{"get":{"tags":["inventory"],"summary":"List valuation","operationId":"InventoryController_listValuation","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"method","in":"query","required":false,"schema":{"type":"string","default":"avg"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/warehouses":{"get":{"tags":["inventory"],"summary":"List warehouses","operationId":"InventoryController_listWarehouses","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]},"post":{"tags":["inventory"],"summary":"Create warehouse","operationId":"InventoryController_createWarehouse","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/warehouses/assign":{"post":{"tags":["inventory"],"summary":"Assign unassigned stock","operationId":"InventoryController_assignUnassignedStock","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"itemIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty"},"reference":{"type":"string"}},"required":["itemIds","warehouseId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/warehouses/import-template":{"get":{"tags":["inventory"],"summary":"Warehouse import template","operationId":"InventoryController_warehouseImportTemplate","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/inventory/warehouses/transfers":{"post":{"tags":["inventory"],"summary":"Transfer stock","operationId":"InventoryController_transferStock","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"fromWarehouseId":{"type":"string","format":"uuid"},"toWarehouseId":{"type":"string","format":"uuid"},"qty":{"type":"number","description":"required, > 0"},"reference":{"type":"string"}},"required":["toWarehouseId","fromWarehouseId","itemId","qty"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/warehouses/{id}":{"delete":{"tags":["inventory"],"summary":"Delete warehouse","operationId":"InventoryController_deleteWarehouse","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.DELETE"]}]},"put":{"tags":["inventory"],"summary":"Update warehouse","operationId":"InventoryController_updateWarehouse","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.UPDATE"]}]}},"/api/v1/inventory/warehouses/{id}/import":{"post":{"tags":["inventory"],"summary":"Import warehouse items","operationId":"InventoryController_importWarehouseItems","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stockMode","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.CREATE"]}]}},"/api/v1/inventory/warehouses/{id}/stock":{"get":{"tags":["inventory"],"summary":"List warehouse stock","operationId":"InventoryController_listWarehouseStock","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.inventory.READ"]}]}},"/api/v1/invoices":{"get":{"tags":["invoices"],"summary":"List","operationId":"InvoiceController_list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"hasIrn","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"posOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"archivedOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]},"post":{"tags":["invoices"],"summary":"Create","operationId":"InvoiceController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"poRef":{"type":"string"},"supplyType":{"type":"string"},"reverseCharge":{"type":"boolean"},"recurringProfileId":{"type":"string","format":"uuid"},"occurrenceDate":{"type":"string","format":"date"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/archive":{"post":{"tags":["invoices"],"summary":"Archive invoices","operationId":"InvoiceController_archiveInvoices","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty"},"archived":{"type":"boolean"}},"required":["ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/preview-pdf":{"post":{"tags":["invoices"],"summary":"Preview pdf","operationId":"InvoiceController_previewPdf","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"gstin":{"type":"string"},"pan":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"bankAccountNo":{"type":"string"},"bankName":{"type":"string"},"bankIfsc":{"type":"string"},"bankAddress":{"type":"string"},"accentColor":{"type":"string"},"logoUrl":{"type":"string"},"invoiceFooter":{"type":"string"},"invoiceTemplate":{"type":"string"},"termsAndConditions":{"type":"string"},"invoiceLayoutConfig":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/quick":{"post":{"tags":["invoices"],"summary":"Quick","operationId":"InvoiceController_quick","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerName":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"customerPhone":{"type":"string"},"customerState":{"type":"string"},"supplyType":{"type":"string"},"reverseCharge":{"type":"boolean"},"issueImmediately":{"type":"boolean"},"paidNow":{"type":"boolean"},"paymentMethod":{"type":"string"},"warehouseId":{"type":"string","format":"uuid"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/register/pdf":{"post":{"tags":["invoices"],"summary":"Sales register pdf","operationId":"InvoiceController_salesRegisterPdf","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string"},"posOnly":{"type":"boolean"},"q":{"type":"string"},"sortBy":{"type":"string"},"sortDir":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"required"},"label":{"type":"string","description":"required"},"fieldKey":{"type":"string"}}},"description":"required, not empty"}},"required":["startDate","endDate","columns"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/search":{"get":{"tags":["invoices"],"summary":"Search invoices","operationId":"InvoiceController_searchInvoices","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]}},"/api/v1/invoices/{id}":{"delete":{"tags":["invoices"],"summary":"Delete draft","operationId":"InvoiceController_deleteDraft","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.DELETE"]}]},"get":{"tags":["invoices"],"summary":"Get","operationId":"InvoiceController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]},"put":{"tags":["invoices"],"summary":"Update","operationId":"InvoiceController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"poRef":{"type":"string"},"supplyType":{"type":"string"},"reverseCharge":{"type":"boolean"},"recurringProfileId":{"type":"string","format":"uuid"},"occurrenceDate":{"type":"string","format":"date"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.UPDATE"]}]}},"/api/v1/invoices/{id}/cancel":{"post":{"tags":["invoices"],"summary":"Cancel","operationId":"InvoiceController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/email":{"get":{"tags":["invoices"],"summary":"Email draft","operationId":"InvoiceController_emailDraft","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]},"post":{"tags":["invoices"],"summary":"Email","operationId":"InvoiceController_email","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/issue":{"post":{"tags":["invoices"],"summary":"Issue","operationId":"InvoiceController_issue","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/payments":{"post":{"tags":["invoices"],"summary":"Payment","operationId":"InvoiceController_payment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":">= 0"},"method":{"type":"string"},"reference":{"type":"string"},"date":{"type":"string","format":"date"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/payments/{paymentId}/reverse":{"post":{"tags":["invoices"],"summary":"Reverse payment","operationId":"InvoiceController_reversePayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"paymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reversalDate":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/pdf":{"get":{"tags":["invoices"],"summary":"Pdf","operationId":"InvoiceController_pdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]}},"/api/v1/invoices/{id}/ship":{"post":{"tags":["invoices"],"summary":"Ship","operationId":"InvoiceController_ship","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"warehouseId":{"type":"string","format":"uuid"},"shipDate":{"type":"string","format":"date"},"carrier":{"type":"string"},"trackingNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"invoiceLineId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}},"description":"required, not empty"}},"required":["items"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.CREATE"]}]}},"/api/v1/invoices/{id}/shipments":{"get":{"tags":["invoices"],"summary":"Fulfilment","operationId":"InvoiceController_fulfilment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.READ"]}]}},"/api/v1/invoices/{id}/shipping":{"patch":{"tags":["invoices"],"summary":"Update shipping","operationId":"InvoiceController_updateShipping","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"carrier":{"type":"string"},"trackingNumber":{"type":"string"},"shipDate":{"type":"string","format":"date"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.UPDATE"]}]}},"/api/v1/invoices/{id}/terms":{"patch":{"tags":["invoices"],"summary":"Update terms","operationId":"InvoiceController_updateTerms","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"poRef":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.invoices.UPDATE"]}]}},"/api/v1/manufacturing/boms":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"BomController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"BomController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"itemId":{"type":"string","description":"required, not blank"},"outputQty":{"type":"number"},"status":{"type":"string"},"isDefault":{"type":"boolean"},"operations":{"type":"string"},"notes":{"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"quantity":{"type":"number"},"scrapPct":{"type":"number"},"notes":{"type":"string"}}}},"routing":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer"},"operationName":{"type":"string"},"workstationId":{"type":"string"},"timeMins":{"type":"number"}}}}},"required":["itemId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/boms/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"BomController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"get":{"tags":["manufacturing"],"summary":"Get","operationId":"BomController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"put":{"tags":["manufacturing"],"summary":"Update","operationId":"BomController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"itemId":{"type":"string","description":"required, not blank"},"outputQty":{"type":"number"},"status":{"type":"string"},"isDefault":{"type":"boolean"},"operations":{"type":"string"},"notes":{"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"quantity":{"type":"number"},"scrapPct":{"type":"number"},"notes":{"type":"string"}}}},"routing":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer"},"operationName":{"type":"string"},"workstationId":{"type":"string"},"timeMins":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.UPDATE"]}]}},"/api/v1/manufacturing/job-cards":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"JobCardController_list","parameters":[{"name":"workOrderId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"JobCardController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workOrderId":{"type":"string","description":"required, not blank"},"operationName":{"type":"string","description":"required, not blank"},"workstationId":{"type":"string"},"seq":{"type":"integer"},"plannedQty":{"type":"number"},"completedQty":{"type":"number"},"status":{"type":"string"},"notes":{"type":"string"}},"required":["workOrderId","operationName"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/job-cards/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"JobCardController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"put":{"tags":["manufacturing"],"summary":"Update","operationId":"JobCardController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workOrderId":{"type":"string","description":"required, not blank"},"operationName":{"type":"string","description":"required, not blank"},"workstationId":{"type":"string"},"seq":{"type":"integer"},"plannedQty":{"type":"number"},"completedQty":{"type":"number"},"status":{"type":"string"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.UPDATE"]}]}},"/api/v1/manufacturing/job-cards/{id}/qc":{"post":{"tags":["manufacturing"],"summary":"Update qc","operationId":"JobCardController_updateQc","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"qcStatus":{"type":"string"},"qcNotes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/job-cards/{id}/status":{"post":{"tags":["manufacturing"],"summary":"Update status","operationId":"JobCardController_updateStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"completedQty":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/material-requests":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"MaterialRequestController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"MaterialRequestController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string"},"requiredBy":{"type":"string","format":"date"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"quantity":{"type":"number"},"warehouseId":{"type":"string"},"notes":{"type":"string"}}},"description":"required, not empty"}},"required":["items"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/material-requests/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"MaterialRequestController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"get":{"tags":["manufacturing"],"summary":"Get","operationId":"MaterialRequestController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/material-requests/{id}/create-po":{"post":{"tags":["manufacturing"],"summary":"Create po","operationId":"MaterialRequestController_createPo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/material-requests/{id}/status":{"post":{"tags":["manufacturing"],"summary":"Update status","operationId":"MaterialRequestController_updateStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/production-plans":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"ProductionPlanController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"ProductionPlanController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceWarehouseId":{"type":"string"},"targetWarehouseId":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"bomId":{"type":"string"},"plannedQty":{"type":"number"}}},"description":"required, not empty"}},"required":["items"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/production-plans/sales-demand":{"get":{"tags":["manufacturing"],"summary":"Sales demand","operationId":"ProductionPlanController_salesDemand","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/production-plans/suggestions":{"get":{"tags":["manufacturing"],"summary":"Suggestions","operationId":"ProductionPlanController_suggestions","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/production-plans/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"ProductionPlanController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"get":{"tags":["manufacturing"],"summary":"Get","operationId":"ProductionPlanController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"put":{"tags":["manufacturing"],"summary":"Update","operationId":"ProductionPlanController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceWarehouseId":{"type":"string"},"targetWarehouseId":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"bomId":{"type":"string"},"plannedQty":{"type":"number"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.UPDATE"]}]}},"/api/v1/manufacturing/production-plans/{id}/cancel":{"post":{"tags":["manufacturing"],"summary":"Cancel","operationId":"ProductionPlanController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/production-plans/{id}/material-request":{"post":{"tags":["manufacturing"],"summary":"Create material request","operationId":"ProductionPlanController_createMaterialRequest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/production-plans/{id}/work-orders":{"post":{"tags":["manufacturing"],"summary":"Create work orders","operationId":"ProductionPlanController_createWorkOrders","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/subcontract-orders":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"SubcontractController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"SubcontractController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","description":"required, not blank"},"itemId":{"type":"string"},"bomId":{"type":"string"},"qty":{"type":"number","description":"required, > 0"},"sourceWarehouseId":{"type":"string"},"targetWarehouseId":{"type":"string"},"subcontractCharge":{"type":"number"},"notes":{"type":"string"}},"required":["vendorId","qty"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/subcontract-orders/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"SubcontractController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"get":{"tags":["manufacturing"],"summary":"Get","operationId":"SubcontractController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/subcontract-orders/{id}/cancel":{"post":{"tags":["manufacturing"],"summary":"Cancel","operationId":"SubcontractController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/subcontract-orders/{id}/receive":{"post":{"tags":["manufacturing"],"summary":"Receive","operationId":"SubcontractController_receive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/subcontract-orders/{id}/send":{"post":{"tags":["manufacturing"],"summary":"Send","operationId":"SubcontractController_send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/work-orders":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"WorkOrderController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"WorkOrderController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bomId":{"type":"string"},"itemId":{"type":"string"},"plannedQty":{"type":"number","description":"required, > 0"},"sourceWarehouseId":{"type":"string"},"targetWarehouseId":{"type":"string"},"plannedStartDate":{"type":"string","format":"date"},"plannedEndDate":{"type":"string","format":"date"},"notes":{"type":"string"}},"required":["plannedQty"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/work-orders/summary":{"get":{"tags":["manufacturing"],"summary":"Summary","operationId":"WorkOrderController_summary","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/work-orders/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"WorkOrderController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"get":{"tags":["manufacturing"],"summary":"Get","operationId":"WorkOrderController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/work-orders/{id}/cancel":{"post":{"tags":["manufacturing"],"summary":"Cancel","operationId":"WorkOrderController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/work-orders/{id}/complete":{"post":{"tags":["manufacturing"],"summary":"Complete","operationId":"WorkOrderController_complete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"produceQty":{"type":"number"},"scrapQty":{"type":"number"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/work-orders/{id}/start":{"post":{"tags":["manufacturing"],"summary":"Start","operationId":"WorkOrderController_start","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/workstations":{"get":{"tags":["manufacturing"],"summary":"List","operationId":"WorkstationController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]},"post":{"tags":["manufacturing"],"summary":"Create","operationId":"WorkstationController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"active":{"type":"boolean"},"capacityMinsPerDay":{"type":"number"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.CREATE"]}]}},"/api/v1/manufacturing/workstations/capacity":{"get":{"tags":["manufacturing"],"summary":"Capacity","operationId":"WorkstationController_capacity","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.READ"]}]}},"/api/v1/manufacturing/workstations/{id}":{"delete":{"tags":["manufacturing"],"summary":"Delete","operationId":"WorkstationController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.DELETE"]}]},"put":{"tags":["manufacturing"],"summary":"Update","operationId":"WorkstationController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"active":{"type":"boolean"},"capacityMinsPerDay":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.manufacturing.UPDATE"]}]}},"/api/v1/me/attendance/check-in":{"post":{"tags":["me"],"summary":"Check in","operationId":"MeController_checkIn","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"selfie":{"type":"string"},"address":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.CREATE"]}]}},"/api/v1/me/attendance/check-out":{"post":{"tags":["me"],"summary":"Check out","operationId":"MeController_checkOut","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"selfie":{"type":"string"},"address":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.CREATE"]}]}},"/api/v1/me/attendance/summary":{"get":{"tags":["me"],"summary":"Summary","operationId":"MeController_summary","parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/attendance/today":{"get":{"tags":["me"],"summary":"Today","operationId":"MeController_today","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/leave/balances":{"get":{"tags":["me"],"summary":"Balances","operationId":"MeController_balances","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/leave/requests":{"get":{"tags":["me"],"summary":"My leave","operationId":"MeController_myLeave","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]},"post":{"tags":["me"],"summary":"Apply leave","operationId":"MeController_applyLeave","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"leaveTypeGid":{"type":"string"},"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"days":{"type":"number"},"reason":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.CREATE"]}]}},"/api/v1/me/leave/types":{"get":{"tags":["me"],"summary":"Leave types","operationId":"MeController_leaveTypes","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/payslips":{"get":{"tags":["me"],"summary":"Payslips","operationId":"MeController_payslips","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/payslips/{slipGid}/pdf":{"get":{"tags":["me"],"summary":"Payslip pdf","operationId":"MeController_payslipPdf","parameters":[{"name":"slipGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/profile":{"get":{"tags":["me"],"summary":"Profile","operationId":"MeController_profile","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/team":{"get":{"tags":["me"],"summary":"Team","operationId":"MeController_team","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/team/leave":{"get":{"tags":["me"],"summary":"Team leave","operationId":"MeController_teamLeave","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.READ"]}]}},"/api/v1/me/team/leave/{reqGid}/approve":{"post":{"tags":["me"],"summary":"Approve","operationId":"MeController_approve","parameters":[{"name":"reqGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.CREATE"]}]}},"/api/v1/me/team/leave/{reqGid}/reject":{"post":{"tags":["me"],"summary":"Reject","operationId":"MeController_reject","parameters":[{"name":"reqGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.me.CREATE"]}]}},"/api/v1/notifications":{"delete":{"tags":["notifications"],"summary":"Dismiss all","operationId":"NotificationController_dismissAll","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.DELETE"]}]},"get":{"tags":["notifications"],"summary":"List","operationId":"NotificationController_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"beforeId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.READ"]}]}},"/api/v1/notifications/page":{"get":{"tags":["notifications"],"summary":"Page","operationId":"NotificationController_page","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"beforeId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.READ"]}]}},"/api/v1/notifications/preferences":{"get":{"tags":["notifications"],"summary":"Preferences","operationId":"NotificationController_preferences","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.READ"]}]},"put":{"tags":["notifications"],"summary":"Update preferences","operationId":"NotificationController_updatePreferences","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":{"type":"object","properties":{"inApp":{"type":"boolean","description":"required"},"email":{"type":"boolean","description":"required"}}},"description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.UPDATE"]}]}},"/api/v1/notifications/push/subscribe":{"post":{"tags":["notifications"],"summary":"Subscribe push","operationId":"NotificationController_subscribePush","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"required, not blank"},"keys":{"type":"object","properties":{"p256dh":{"type":"string","description":"required, not blank"},"auth":{"type":"string","description":"required, not blank"}},"description":"required"}},"required":["keys","endpoint"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.CREATE"]}]}},"/api/v1/notifications/push/unsubscribe":{"post":{"tags":["notifications"],"summary":"Unsubscribe push","operationId":"NotificationController_unsubscribePush","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"required, not blank"}},"required":["endpoint"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.CREATE"]}]}},"/api/v1/notifications/push/vapid-public-key":{"get":{"tags":["notifications"],"summary":"Vapid public key","operationId":"NotificationController_vapidPublicKey","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.READ"]}]}},"/api/v1/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark all read","operationId":"NotificationController_markAllRead","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.CREATE"]}]}},"/api/v1/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Unread count","operationId":"NotificationController_unreadCount","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.READ"]}]}},"/api/v1/notifications/{id}":{"delete":{"tags":["notifications"],"summary":"Dismiss","operationId":"NotificationController_dismiss","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.DELETE"]}]}},"/api/v1/notifications/{id}/read":{"patch":{"tags":["notifications"],"summary":"Mark read","operationId":"NotificationController_markRead","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.notifications.UPDATE"]}]}},"/api/v1/organizations":{"get":{"tags":["settings"],"summary":"List organizations","operationId":"OrganizationController_listOrganizations","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":[]}]}},"/api/v1/organizations/invitations":{"post":{"tags":["settings"],"summary":"Invite","operationId":"TeamController_invite","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"required, not blank, valid email"},"name":{"type":"string","description":"required, not blank"},"role":{"type":"string"},"roleName":{"type":"string"},"organizationIds":{"type":"array","items":{"type":"string"},"description":"required, not empty"},"menuKeys":{"type":"array","items":{"type":"string"}},"permissionsByOrganization":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"roleId":{"type":"string","format":"uuid"}},"required":["name","email","organizationIds"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/organizations/invitations/{id}":{"delete":{"tags":["settings"],"summary":"Revoke","operationId":"TeamController_revoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.DELETE"]}]}},"/api/v1/organizations/invitations/{id}/resend":{"post":{"tags":["settings"],"summary":"Resend","operationId":"TeamController_resend","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/organizations/memberships/{id}":{"delete":{"tags":["settings"],"summary":"Remove membership","operationId":"TeamController_removeMembership","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.DELETE"]}]},"patch":{"tags":["settings"],"summary":"Update membership","operationId":"TeamController_updateMembership","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string"},"roleName":{"type":"string"},"menuKeys":{"type":"array","items":{"type":"string"}},"roleId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.UPDATE"]}]}},"/api/v1/organizations/roles/{roleId}":{"delete":{"tags":["settings"],"summary":"Delete","operationId":"RoleController_delete","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.DELETE"]}]},"get":{"tags":["settings"],"summary":"Get","operationId":"RoleController_get","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]},"put":{"tags":["settings"],"summary":"Update","operationId":"RoleController_update","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"menuKeys":{"type":"array","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.UPDATE"]}]}},"/api/v1/organizations/roles/{roleId}/review":{"post":{"tags":["settings"],"summary":"Review","operationId":"RoleController_review","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/organizations/{id}":{"get":{"tags":["settings"],"summary":"Get organization","operationId":"OrganizationController_getOrganization","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":[]}]},"post":{"tags":["settings"],"summary":"Update organization","operationId":"OrganizationController_updateOrganization","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string","format":"uuid"},"name":{"type":"string","description":"required"},"legalName":{"type":"string"},"gstin":{"type":"string"},"pan":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"bankAccountNo":{"type":"string"},"bankName":{"type":"string"},"bankIfsc":{"type":"string"},"bankAddress":{"type":"string"},"financialYearStart":{"type":"string"},"taxPreference":{"type":"string"},"logoUrl":{"type":"string"},"accentColor":{"type":"string"},"invoiceFooter":{"type":"string"},"invoiceTemplate":{"type":"string"},"deliveryNoteTemplate":{"type":"string"},"deliveryNoteFooter":{"type":"string"},"deliveryNoteAccent":{"type":"string"},"deliveryNoteLogoUrl":{"type":"string"},"deliveryProvider":{"type":"string"},"deliveryApiUrl":{"type":"string"},"deliveryApiKey":{"type":"string"},"deliveryApiEnabled":{"type":"boolean"},"deliveryApiConfig":{"type":"string"},"payslipTemplate":{"type":"string"},"payslipNote":{"type":"string"},"termsAndConditions":{"type":"string"},"invoiceLayoutConfig":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"},"booksLockedUntil":{"type":"string","format":"date"},"booksLockedByUserId":{"type":"integer"},"booksLockedAt":{"type":"string","format":"date-time"},"openingBalanceDate":{"type":"string","format":"date"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/organizations/{id}/directory":{"get":{"tags":["settings"],"summary":"Directory","operationId":"TeamController_directory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{id}/invitations":{"get":{"tags":["settings"],"summary":"Invitations","operationId":"TeamController_invitations","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{id}/members":{"get":{"tags":["settings"],"summary":"Members","operationId":"TeamController_members","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{id}/permissions":{"get":{"tags":["settings"],"summary":"Permissions","operationId":"TeamController_permissions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{id}/roles":{"get":{"tags":["settings"],"summary":"List","operationId":"RoleController_list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]},"post":{"tags":["settings"],"summary":"Create","operationId":"RoleController_create","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"menuKeys":{"type":"array","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/organizations/{id}/seat-usage":{"get":{"tags":["settings"],"summary":"Seat usage","operationId":"TeamController_seatUsage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{id}/settings":{"get":{"tags":["settings"],"summary":"Get settings","operationId":"OrganizationController_getSettings","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.READ"]}]}},"/api/v1/organizations/{orgGid}/transfer-ownership":{"post":{"tags":["settings"],"summary":"Transfer","operationId":"OwnershipTransferController_transfer","parameters":[{"name":"orgGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"membershipId":{"type":"string","format":"uuid"},"confirmName":{"type":"string","description":"required, not blank"}},"required":["confirmName","membershipId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.settings.CREATE"]}]}},"/api/v1/payables/aging":{"get":{"tags":["payables"],"summary":"Get payables aging","operationId":"PayablesController_getPayablesAging","parameters":[{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payables.READ"]}]}},"/api/v1/payables/bills":{"get":{"tags":["payables"],"summary":"Get payable bills","operationId":"PayablesController_getPayableBills","parameters":[{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"overdue","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payables.READ"]}]}},"/api/v1/payables/by-vendor":{"get":{"tags":["payables"],"summary":"Get payables by vendor","operationId":"PayablesController_getPayablesByVendor","parameters":[{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payables.READ"]}]}},"/api/v1/payables/summary":{"get":{"tags":["payables"],"summary":"Get payables summary","operationId":"PayablesController_getPayablesSummary","parameters":[{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payables.READ"]}]}},"/api/v1/payroll/access":{"get":{"tags":["payroll"],"summary":"Payroll access","operationId":"AddonFeatureAccessController_payrollAccess","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/appraisals":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrAppraisalController_list","parameters":[{"name":"cycleGid","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrAppraisalController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cycleGid":{"type":"string"},"employeeGid":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/appraisals/cycles":{"get":{"tags":["payroll"],"summary":"List cycles","operationId":"HrAppraisalController_listCycles","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create cycle","operationId":"HrAppraisalController_createCycle","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"status":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/appraisals/cycles/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete cycle","operationId":"HrAppraisalController_deleteCycle","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update cycle","operationId":"HrAppraisalController_updateCycle","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"status":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/appraisals/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrAppraisalController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrAppraisalController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrAppraisalController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overallRating":{"type":"integer"},"selfComments":{"type":"string"},"reviewerComments":{"type":"string"},"status":{"type":"string"},"ratings":{"type":"array","items":{"type":"object","properties":{"competency":{"type":"string"},"rating":{"type":"integer"},"comment":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/appraisals/{gid}/complete":{"post":{"tags":["payroll"],"summary":"Complete","operationId":"HrAppraisalController_complete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/assets":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrAssetController_list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrAssetController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetTag":{"type":"string"},"name":{"type":"string","description":"required"},"category":{"type":"string"},"serialNumber":{"type":"string"},"purchaseDate":{"type":"string","format":"date"},"purchaseCost":{"type":"number"},"vendor":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/assets/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrAssetController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrAssetController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrAssetController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetTag":{"type":"string"},"name":{"type":"string","description":"required"},"category":{"type":"string"},"serialNumber":{"type":"string"},"purchaseDate":{"type":"string","format":"date"},"purchaseCost":{"type":"number"},"vendor":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/assets/{gid}/assign":{"post":{"tags":["payroll"],"summary":"Assign","operationId":"HrAssetController_assign","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"conditionNote":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/assets/{gid}/return":{"post":{"tags":["payroll"],"summary":"Return asset","operationId":"HrAssetController_returnAsset","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditionNote":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance":{"get":{"tags":["payroll"],"summary":"For date","operationId":"HrAttendanceController_forDate","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Mark","operationId":"HrAttendanceController_mark","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"employeeGid":{"type":"string"},"date":{"type":"string","format":"date"},"status":{"type":"string"},"remarks":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/check-in":{"post":{"tags":["payroll"],"summary":"Check in","operationId":"HrAttendanceController_checkIn","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/check-out":{"post":{"tags":["payroll"],"summary":"Check out","operationId":"HrAttendanceController_checkOut","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/config":{"get":{"tags":["payroll"],"summary":"Get config","operationId":"HrAttendanceController_getConfig","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"put":{"tags":["payroll"],"summary":"Update config","operationId":"HrAttendanceController_updateConfig","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fullDayHours":{"type":"number"},"halfDayHours":{"type":"number"},"shiftStart":{"type":"string"},"shiftEnd":{"type":"string"},"graceMinutes":{"type":"integer"},"workweek":{"type":"string"},"autoStatus":{"type":"boolean"},"webCheckin":{"type":"boolean"},"ipWhitelist":{"type":"string"},"timezone":{"type":"string"},"officeLat":{"type":"number"},"officeLng":{"type":"number"},"geofenceRadiusM":{"type":"integer"},"requireGeofence":{"type":"boolean"},"requireSelfie":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/attendance/import":{"post":{"tags":["payroll"],"summary":"Import file","operationId":"HrAttendanceController_importFile","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/import/preview":{"post":{"tags":["payroll"],"summary":"Import preview","operationId":"HrAttendanceController_importPreview","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/regularizations":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrRegularizationController_list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Apply","operationId":"HrRegularizationController_apply","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"attDate":{"type":"string","format":"date"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/regularizations/{gid}/approve":{"post":{"tags":["payroll"],"summary":"Approve","operationId":"HrRegularizationController_approve","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/regularizations/{gid}/reject":{"post":{"tags":["payroll"],"summary":"Reject","operationId":"HrRegularizationController_reject","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/attendance/summary":{"get":{"tags":["payroll"],"summary":"Summary","operationId":"HrAttendanceController_summary","parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/attendance/today":{"get":{"tags":["payroll"],"summary":"Today","operationId":"HrAttendanceController_today","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/checklist-templates":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrChecklistTemplateController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrChecklistTemplateController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"active":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"sortOrder":{"type":"integer"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/checklist-templates/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrChecklistTemplateController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrChecklistTemplateController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"active":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"sortOrder":{"type":"integer"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/checklists":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrChecklistController_list","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Start","operationId":"HrChecklistController_start","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"templateGid":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/checklists/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrChecklistController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrChecklistController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/checklists/{gid}/tasks/{taskGid}":{"patch":{"tags":["payroll"],"summary":"Toggle task","operationId":"HrChecklistController_toggleTask","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskGid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/dashboard":{"get":{"tags":["payroll"],"summary":"Get","operationId":"HrDashboardController_get","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/departments":{"get":{"tags":["payroll"],"summary":"List departments","operationId":"HrOrgController_listDepartments","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create department","operationId":"HrOrgController_createDepartment","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/departments/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete department","operationId":"HrOrgController_deleteDepartment","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update department","operationId":"HrOrgController_updateDepartment","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/designations":{"get":{"tags":["payroll"],"summary":"List designations","operationId":"HrOrgController_listDesignations","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create designation","operationId":"HrOrgController_createDesignation","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"title":{"type":"string"},"departmentGid":{"type":"string"},"departmentName":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/designations/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete designation","operationId":"HrOrgController_deleteDesignation","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update designation","operationId":"HrOrgController_updateDesignation","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"title":{"type":"string"},"departmentGid":{"type":"string"},"departmentName":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/devices":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrDeviceController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrDeviceController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"serialNo":{"type":"string"},"location":{"type":"string"},"ipWhitelist":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/devices/punches":{"get":{"tags":["payroll"],"summary":"Punches","operationId":"HrDeviceController_punches","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"50"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/devices/unmapped-count":{"get":{"tags":["payroll"],"summary":"Unmapped","operationId":"HrDeviceController_unmapped","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/devices/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrDeviceController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrDeviceController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"serialNo":{"type":"string"},"location":{"type":"string"},"ipWhitelist":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/devices/{gid}/active":{"post":{"tags":["payroll"],"summary":"Set active","operationId":"HrDeviceController_setActive","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"active","in":"query","required":true,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/devices/{gid}/regenerate-token":{"post":{"tags":["payroll"],"summary":"Regenerate","operationId":"HrDeviceController_regenerate","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/documents":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrDocumentController_list","parameters":[{"name":"employeeGid","in":"query","required":false,"schema":{"type":"string"}},{"name":"expiringOnly","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Upload","operationId":"HrDocumentController_upload","parameters":[{"name":"employeeGid","in":"query","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"docType","in":"query","required":false,"schema":{"type":"string"}},{"name":"docNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"issueDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"expiryDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"notes","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/documents/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrDocumentController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]}},"/api/v1/payroll/employees":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrEmployeeController_list","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrEmployeeController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"employeeCode":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"dob":{"type":"string","format":"date"},"gender":{"type":"string"},"address":{"type":"string"},"departmentGid":{"type":"string"},"departmentName":{"type":"string"},"designationGid":{"type":"string"},"designationTitle":{"type":"string"},"dateOfJoining":{"type":"string","format":"date"},"employmentType":{"type":"string"},"status":{"type":"string"},"dateOfExit":{"type":"string","format":"date"},"bankAccountNo":{"type":"string"},"ifsc":{"type":"string"},"bankName":{"type":"string"},"pan":{"type":"string"},"uan":{"type":"string"},"pfNumber":{"type":"string"},"esiNumber":{"type":"string"},"biometricId":{"type":"string"},"shiftGid":{"type":"string"},"shiftName":{"type":"string"},"loginEmail":{"type":"string"},"role":{"type":"string"},"reportingManagerGid":{"type":"string"},"reportingManagerName":{"type":"string"},"accountStatus":{"type":"string"},"locationGid":{"type":"string"},"locationName":{"type":"string"},"monthlyGross":{"type":"number"},"salaryStructure":{"type":"object","properties":{"effectiveFrom":{"type":"string","format":"date"},"ctcAnnual":{"type":"number"},"pfApplicable":{"type":"boolean"},"esiApplicable":{"type":"boolean"},"ptApplicable":{"type":"boolean"},"components":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"calcType":{"type":"string"},"value":{"type":"number"}}}}}},"workState":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/employees/import":{"post":{"tags":["payroll"],"summary":"Import employees","operationId":"HrEmployeeController_importEmployees","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/employees/import/template.csv":{"get":{"tags":["payroll"],"summary":"Template csv","operationId":"HrEmployeeController_templateCsv","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/employees/import/template.xlsx":{"get":{"tags":["payroll"],"summary":"Template xlsx","operationId":"HrEmployeeController_templateXlsx","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/employees/professional-tax-estimate":{"get":{"tags":["payroll"],"summary":"Estimate","operationId":"HrProfessionalTaxController_estimate","parameters":[{"name":"gross","in":"query","required":true,"schema":{"type":"number"}},{"name":"workState","in":"query","required":false,"schema":{"type":"string"}},{"name":"gender","in":"query","required":false,"schema":{"type":"string"}},{"name":"dob","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"month","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/employees/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrEmployeeController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrEmployeeController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrEmployeeController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"employeeCode":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"dob":{"type":"string","format":"date"},"gender":{"type":"string"},"address":{"type":"string"},"departmentGid":{"type":"string"},"departmentName":{"type":"string"},"designationGid":{"type":"string"},"designationTitle":{"type":"string"},"dateOfJoining":{"type":"string","format":"date"},"employmentType":{"type":"string"},"status":{"type":"string"},"dateOfExit":{"type":"string","format":"date"},"bankAccountNo":{"type":"string"},"ifsc":{"type":"string"},"bankName":{"type":"string"},"pan":{"type":"string"},"uan":{"type":"string"},"pfNumber":{"type":"string"},"esiNumber":{"type":"string"},"biometricId":{"type":"string"},"shiftGid":{"type":"string"},"shiftName":{"type":"string"},"loginEmail":{"type":"string"},"role":{"type":"string"},"reportingManagerGid":{"type":"string"},"reportingManagerName":{"type":"string"},"accountStatus":{"type":"string"},"locationGid":{"type":"string"},"locationName":{"type":"string"},"monthlyGross":{"type":"number"},"salaryStructure":{"type":"object","properties":{"effectiveFrom":{"type":"string","format":"date"},"ctcAnnual":{"type":"number"},"pfApplicable":{"type":"boolean"},"esiApplicable":{"type":"boolean"},"ptApplicable":{"type":"boolean"},"components":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"calcType":{"type":"string"},"value":{"type":"number"}}}}}},"workState":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/employees/{gid}/account/disable":{"post":{"tags":["payroll"],"summary":"Disable account","operationId":"HrEmployeeController_disableAccount","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/employees/{gid}/account/pin":{"post":{"tags":["payroll"],"summary":"Gen pin","operationId":"HrEmployeeController_genPin","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/employees/{gid}/salary-structure":{"put":{"tags":["payroll"],"summary":"Set salary structure","operationId":"HrEmployeeController_setSalaryStructure","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effectiveFrom":{"type":"string","format":"date"},"ctcAnnual":{"type":"number"},"pfApplicable":{"type":"boolean"},"esiApplicable":{"type":"boolean"},"ptApplicable":{"type":"boolean"},"components":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"calcType":{"type":"string"},"value":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/holidays":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrHolidayController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrHolidayController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"date":{"type":"string","format":"date"},"type":{"type":"string"},"recurring":{"type":"boolean"},"description":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/holidays/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrHolidayController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrHolidayController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"date":{"type":"string","format":"date"},"type":{"type":"string"},"recurring":{"type":"boolean"},"description":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/leave/balances":{"get":{"tags":["payroll"],"summary":"Balances","operationId":"HrLeaveController_balances","parameters":[{"name":"employeeGid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/leave/requests":{"get":{"tags":["payroll"],"summary":"List requests","operationId":"HrLeaveController_listRequests","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Apply","operationId":"HrLeaveController_apply","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"leaveTypeGid":{"type":"string"},"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"days":{"type":"number"},"reason":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/leave/requests/{gid}/approve":{"post":{"tags":["payroll"],"summary":"Approve","operationId":"HrLeaveController_approve","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/leave/requests/{gid}/reject":{"post":{"tags":["payroll"],"summary":"Reject","operationId":"HrLeaveController_reject","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/leave/types":{"get":{"tags":["payroll"],"summary":"List types","operationId":"HrLeaveController_listTypes","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create type","operationId":"HrLeaveController_createType","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"paid":{"type":"boolean"},"annualQuota":{"type":"number"},"carryForward":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/leave/types/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete type","operationId":"HrLeaveController_deleteType","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update type","operationId":"HrLeaveController_updateType","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"paid":{"type":"boolean"},"annualQuota":{"type":"number"},"carryForward":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/letter-templates":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrLetterTemplateController_list","parameters":[{"name":"activeOnly","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrLetterTemplateController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/letter-templates/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrLetterTemplateController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrLetterTemplateController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/letters":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrLetterController_list","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Generate","operationId":"HrLetterController_generate","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"templateGid":{"type":"string"},"issueDate":{"type":"string","format":"date"},"subject":{"type":"string"},"body":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/letters/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrLetterController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrLetterController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/letters/{gid}/pdf":{"get":{"tags":["payroll"],"summary":"Pdf","operationId":"HrLetterController_pdf","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/locations":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrLocationController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrLocationController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"radiusM":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/locations/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrLocationController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrLocationController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"radiusM":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/payslips/preview-pdf":{"post":{"tags":["payroll"],"summary":"Preview pdf","operationId":"HrPayslipController_previewPdf","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payslipTemplate":{"type":"string"},"accentColor":{"type":"string"},"logoUrl":{"type":"string"},"payslipNote":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/payslips/{gid}":{"get":{"tags":["payroll"],"summary":"Get","operationId":"HrPayslipController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/payslips/{gid}/pdf":{"get":{"tags":["payroll"],"summary":"Pdf","operationId":"HrPayslipController_pdf","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/requests":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrRequestController_list","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrRequestController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"employeeGid":{"type":"string"},"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"days":{"type":"number"},"reason":{"type":"string"},"destination":{"type":"string"},"purpose":{"type":"string"},"travelMode":{"type":"string"},"estimatedCost":{"type":"number"},"advanceRequested":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/requests/{gid}/approve":{"post":{"tags":["payroll"],"summary":"Approve","operationId":"HrRequestController_approve","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/requests/{gid}/cancel":{"post":{"tags":["payroll"],"summary":"Cancel","operationId":"HrRequestController_cancel","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/requests/{gid}/reject":{"post":{"tags":["payroll"],"summary":"Reject","operationId":"HrRequestController_reject","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/runs":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrPayrollController_list","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrPayrollController_create","parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/runs/preview":{"get":{"tags":["payroll"],"summary":"Preview","operationId":"HrPayrollController_preview","parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/runs/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrPayrollController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"get":{"tags":["payroll"],"summary":"Get","operationId":"HrPayrollController_get","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/runs/{gid}/approve":{"post":{"tags":["payroll"],"summary":"Approve","operationId":"HrPayrollController_approve","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/runs/{gid}/mark-paid":{"post":{"tags":["payroll"],"summary":"Mark paid","operationId":"HrPayrollController_markPaid","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paidDate":{"type":"string","format":"date"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/salary-revisions":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrSalaryRevisionController_list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrSalaryRevisionController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"proposedCtc":{"type":"number"},"effectiveDate":{"type":"string","format":"date"},"reason":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/salary-revisions/{gid}/apply":{"post":{"tags":["payroll"],"summary":"Apply","operationId":"HrSalaryRevisionController_apply","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/salary-revisions/{gid}/approve":{"post":{"tags":["payroll"],"summary":"Approve","operationId":"HrSalaryRevisionController_approve","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/salary-revisions/{gid}/cancel":{"post":{"tags":["payroll"],"summary":"Cancel","operationId":"HrSalaryRevisionController_cancel","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/salary-revisions/{gid}/reject":{"post":{"tags":["payroll"],"summary":"Reject","operationId":"HrSalaryRevisionController_reject","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/shifts":{"get":{"tags":["payroll"],"summary":"List","operationId":"HrShiftController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create","operationId":"HrShiftController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"fullDayHours":{"type":"number"},"halfDayHours":{"type":"number"},"graceMinutes":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/shifts/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete","operationId":"HrShiftController_delete","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrShiftController_update","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string"},"name":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"fullDayHours":{"type":"number"},"halfDayHours":{"type":"number"},"graceMinutes":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/statutory-config":{"get":{"tags":["payroll"],"summary":"Get","operationId":"HrStatutoryController_get","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"put":{"tags":["payroll"],"summary":"Update","operationId":"HrStatutoryController_update","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pfEmployeePct":{"type":"number"},"pfEmployerPct":{"type":"number"},"pfWageCeiling":{"type":"number"},"esiEmployeePct":{"type":"number"},"esiEmployerPct":{"type":"number"},"esiWageCeiling":{"type":"number"},"ptMonthly":{"type":"number"},"tdsMode":{"type":"string"},"ptMethod":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/statutory-config/professional-tax":{"get":{"tags":["payroll"],"summary":"Settings","operationId":"HrProfessionalTaxController_settings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]}},"/api/v1/payroll/statutory-config/professional-tax/states/{stateCode}":{"delete":{"tags":["payroll"],"summary":"Reset","operationId":"HrProfessionalTaxController_reset","parameters":[{"name":"stateCode","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Save","operationId":"HrProfessionalTaxController_save","parameters":[{"name":"stateCode","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stateCode":{"type":"string"},"stateName":{"type":"string"},"levied":{"type":"boolean"},"basis":{"type":"string"},"seniorExemptAge":{"type":"integer"},"slabs":{"type":"array","items":{"type":"object","properties":{"gender":{"type":"string"},"upTo":{"type":"number"},"amount":{"type":"number"},"febAmount":{"type":"number"}}}},"note":{"type":"string"},"customised":{"type":"boolean"},"hasBuiltIn":{"type":"boolean"},"inUse":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/training/courses":{"get":{"tags":["payroll"],"summary":"List courses","operationId":"HrTrainingController_listCourses","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create course","operationId":"HrTrainingController_createCourse","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"provider":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"durationHours":{"type":"number"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/training/courses/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete course","operationId":"HrTrainingController_deleteCourse","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update course","operationId":"HrTrainingController_updateCourse","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"provider":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"durationHours":{"type":"number"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/training/enrollments":{"get":{"tags":["payroll"],"summary":"List enrollments","operationId":"HrTrainingController_listEnrollments","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create enrollment","operationId":"HrTrainingController_createEnrollment","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"courseGid":{"type":"string"},"status":{"type":"string"},"enrolledDate":{"type":"string","format":"date"},"completedDate":{"type":"string","format":"date"},"score":{"type":"number"},"certificateNo":{"type":"string"},"certificateExpiry":{"type":"string","format":"date"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/training/enrollments/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete enrollment","operationId":"HrTrainingController_deleteEnrollment","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update enrollment","operationId":"HrTrainingController_updateEnrollment","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"courseGid":{"type":"string"},"status":{"type":"string"},"enrolledDate":{"type":"string","format":"date"},"completedDate":{"type":"string","format":"date"},"score":{"type":"number"},"certificateNo":{"type":"string"},"certificateExpiry":{"type":"string","format":"date"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/payroll/training/skill-matrix":{"get":{"tags":["payroll"],"summary":"List matrix","operationId":"HrTrainingController_listMatrix","parameters":[{"name":"employeeGid","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Upsert matrix","operationId":"HrTrainingController_upsertMatrix","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employeeGid":{"type":"string"},"skillGid":{"type":"string"},"proficiency":{"type":"string"},"rating":{"type":"integer"},"note":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/training/skill-matrix/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete matrix","operationId":"HrTrainingController_deleteMatrix","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]}},"/api/v1/payroll/training/skills":{"get":{"tags":["payroll"],"summary":"List skills","operationId":"HrTrainingController_listSkills","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.READ"]}]},"post":{"tags":["payroll"],"summary":"Create skill","operationId":"HrTrainingController_createSkill","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.CREATE"]}]}},"/api/v1/payroll/training/skills/{gid}":{"delete":{"tags":["payroll"],"summary":"Delete skill","operationId":"HrTrainingController_deleteSkill","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.DELETE"]}]},"put":{"tags":["payroll"],"summary":"Update skill","operationId":"HrTrainingController_updateSkill","parameters":[{"name":"gid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.payroll.UPDATE"]}]}},"/api/v1/plans":{"get":{"tags":["plans"],"summary":"Current plan","operationId":"PlanCatalogController_currentPlan","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.plans.READ"]}]}},"/api/v1/plans/all":{"get":{"tags":["plans"],"summary":"All plans","operationId":"PlanCatalogController_allPlans","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.plans.READ"]}]}},"/api/v1/pos/catalog":{"get":{"tags":["pos"],"summary":"Catalog","operationId":"PosController_catalog","parameters":[{"name":"registerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"0"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":"200"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/checkout":{"post":{"tags":["pos"],"summary":"Checkout","operationId":"PosController_checkout","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"registerId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"qty":{"type":"number","description":"required"},"rate":{"type":"number"},"discount":{"type":"number"}}},"description":"required"},"tenders":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string","description":"required"},"amount":{"type":"number","description":"required"},"reference":{"type":"string"}}},"description":"required"},"notes":{"type":"string"},"idempotencyKey":{"type":"string"},"couponCode":{"type":"string"},"redeemPoints":{"type":"integer"},"orderDiscount":{"type":"number"},"invoiceNo":{"type":"string"},"offline":{"type":"boolean"}},"required":["tenders","lines","registerId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/coupons":{"get":{"tags":["pos"],"summary":"Coupons","operationId":"PosController_coupons","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]},"post":{"tags":["pos"],"summary":"Create coupon","operationId":"PosController_createCoupon","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"discountType":{"type":"string","description":"required, not blank"},"value":{"type":"number","description":"required"},"minAmount":{"type":"number"},"maxDiscount":{"type":"number"},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"maxRedemptions":{"type":"integer"},"active":{"type":"boolean"}},"required":["code","discountType","value"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/coupons/validate":{"get":{"tags":["pos"],"summary":"Validate coupon","operationId":"PosController_validateCoupon","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}},{"name":"amount","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/coupons/{id}":{"put":{"tags":["pos"],"summary":"Update coupon","operationId":"PosController_updateCoupon","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"required, not blank"},"description":{"type":"string"},"discountType":{"type":"string","description":"required, not blank"},"value":{"type":"number","description":"required"},"minAmount":{"type":"number"},"maxDiscount":{"type":"number"},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"maxRedemptions":{"type":"integer"},"active":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.UPDATE"]}]}},"/api/v1/pos/customers":{"get":{"tags":["pos"],"summary":"Customers","operationId":"PosController_customers","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/dashboard":{"get":{"tags":["pos"],"summary":"Dashboard","operationId":"PosController_dashboard","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/invoice-numbers":{"post":{"tags":["pos"],"summary":"Reserve invoice numbers","operationId":"PosController_reserveInvoiceNumbers","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/items":{"get":{"tags":["pos"],"summary":"Items","operationId":"PosController_items","parameters":[{"name":"registerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/loyalty/config":{"get":{"tags":["pos"],"summary":"Loyalty config","operationId":"PosController_loyaltyConfig","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]},"put":{"tags":["pos"],"summary":"Set loyalty config","operationId":"PosController_setLoyaltyConfig","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"earnRate":{"type":"number"},"redeemValue":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.UPDATE"]}]}},"/api/v1/pos/loyalty/points":{"get":{"tags":["pos"],"summary":"Customer points","operationId":"PosController_customerPoints","parameters":[{"name":"customerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/promotions":{"get":{"tags":["pos"],"summary":"Promotions","operationId":"PosController_promotions","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]},"post":{"tags":["pos"],"summary":"Create promotion","operationId":"PosController_createPromotion","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"type":{"type":"string","description":"required"},"priority":{"type":"integer"},"active":{"type":"boolean"},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"weekdays":{"type":"string"},"timeStart":{"type":"string","example":"09:30"},"timeEnd":{"type":"string","example":"09:30"},"warehouseId":{"type":"string","format":"uuid"},"registerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"percent":{"type":"number"},"amount":{"type":"number"},"minAmount":{"type":"number"},"buyQty":{"type":"integer"},"getQty":{"type":"integer"},"rewardItemId":{"type":"string","format":"uuid"},"targets":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"category":{"type":"string"},"qty":{"type":"number"}}}}},"required":["type","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/promotions/lookup":{"get":{"tags":["pos"],"summary":"Promotion lookup","operationId":"PosController_promotionLookup","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/promotions/snapshot":{"get":{"tags":["pos"],"summary":"Promotion snapshot","operationId":"PosController_promotionSnapshot","parameters":[{"name":"registerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/promotions/{id}":{"delete":{"tags":["pos"],"summary":"Delete promotion","operationId":"PosController_deletePromotion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.DELETE"]}]},"put":{"tags":["pos"],"summary":"Update promotion","operationId":"PosController_updatePromotion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required"},"type":{"type":"string","description":"required"},"priority":{"type":"integer"},"active":{"type":"boolean"},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"weekdays":{"type":"string"},"timeStart":{"type":"string","example":"09:30"},"timeEnd":{"type":"string","example":"09:30"},"warehouseId":{"type":"string","format":"uuid"},"registerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"percent":{"type":"number"},"amount":{"type":"number"},"minAmount":{"type":"number"},"buyQty":{"type":"integer"},"getQty":{"type":"integer"},"rewardItemId":{"type":"string","format":"uuid"},"targets":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"category":{"type":"string"},"qty":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.UPDATE"]}]}},"/api/v1/pos/registers":{"get":{"tags":["pos"],"summary":"Registers","operationId":"PosController_registers","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]},"post":{"tags":["pos"],"summary":"Create register","operationId":"PosController_createRegister","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"},"warehouseId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"receiptHeader":{"type":"string"},"receiptFooter":{"type":"string"},"receiptPaper":{"type":"string"},"showTaxBreakup":{"type":"boolean"},"allowLineDiscount":{"type":"boolean"},"allowPriceEdit":{"type":"boolean"},"requireCustomer":{"type":"boolean"},"defaultCustomer":{"type":"string"},"defaultTender":{"type":"string"},"openingFloat":{"type":"number"},"autoPrint":{"type":"boolean"},"allowDecimalQty":{"type":"boolean"},"maxDiscountPct":{"type":"number"},"blindClose":{"type":"boolean"}},"required":["name","warehouseId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/registers/{id}":{"put":{"tags":["pos"],"summary":"Update register","operationId":"PosController_updateRegister","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"code":{"type":"string"},"warehouseId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"receiptHeader":{"type":"string"},"receiptFooter":{"type":"string"},"receiptPaper":{"type":"string"},"showTaxBreakup":{"type":"boolean"},"allowLineDiscount":{"type":"boolean"},"allowPriceEdit":{"type":"boolean"},"requireCustomer":{"type":"boolean"},"defaultCustomer":{"type":"string"},"defaultTender":{"type":"string"},"openingFloat":{"type":"number"},"autoPrint":{"type":"boolean"},"allowDecimalQty":{"type":"boolean"},"maxDiscountPct":{"type":"number"},"blindClose":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.UPDATE"]}]}},"/api/v1/pos/returns":{"post":{"tags":["pos"],"summary":"Process return","operationId":"PosController_processReturn","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"registerId":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","format":"uuid"},"reason":{"type":"string"},"refundCash":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"itemName":{"type":"string"},"quantity":{"type":"number","description":"required"},"rate":{"type":"number"},"gstRate":{"type":"number"}}},"description":"required"}},"required":["invoiceId","registerId","items"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/sales/recent":{"get":{"tags":["pos"],"summary":"Recent sales","operationId":"PosController_recentSales","parameters":[{"name":"registerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/sales/{invoiceNo}":{"get":{"tags":["pos"],"summary":"Lookup sale","operationId":"PosController_lookupSale","parameters":[{"name":"invoiceNo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/sales/{invoiceNo}/email":{"post":{"tags":["pos"],"summary":"Email receipt","operationId":"PosController_emailReceipt","parameters":[{"name":"invoiceNo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/sales/{invoiceNo}/receipt":{"get":{"tags":["pos"],"summary":"Sale receipt","operationId":"PosController_saleReceipt","parameters":[{"name":"invoiceNo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/sessions/current":{"get":{"tags":["pos"],"summary":"Current session","operationId":"PosController_currentSession","parameters":[{"name":"registerId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/sessions/open":{"post":{"tags":["pos"],"summary":"Open session","operationId":"PosController_openSession","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"registerId":{"type":"string","format":"uuid"},"openingFloat":{"type":"number"}},"required":["registerId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/sessions/{id}/cash":{"post":{"tags":["pos"],"summary":"Cash movement","operationId":"PosController_cashMovement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"required"},"category":{"type":"string"},"amount":{"type":"number","description":"required"},"reason":{"type":"string"}},"required":["type","amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/sessions/{id}/close":{"post":{"tags":["pos"],"summary":"Close session","operationId":"PosController_closeSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countedCash":{"type":"number","description":"required"},"notes":{"type":"string"},"denominationJson":{"type":"string"}},"required":["countedCash"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.CREATE"]}]}},"/api/v1/pos/sessions/{id}/report":{"get":{"tags":["pos"],"summary":"Session report","operationId":"PosController_sessionReport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/pos/settings":{"put":{"tags":["pos"],"summary":"Set settings","operationId":"PosController_setSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.UPDATE"]}]}},"/api/v1/pos/status":{"get":{"tags":["pos"],"summary":"Status","operationId":"PosController_status","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.pos.READ"]}]}},"/api/v1/price-lists":{"get":{"tags":["price-lists"],"summary":"List","operationId":"PriceListController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.price-lists.READ"]}]},"post":{"tags":["price-lists"],"summary":"Create","operationId":"PriceListController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"isDefault":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"price":{"type":"number"}}}}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.price-lists.CREATE"]}]}},"/api/v1/price-lists/{id}":{"delete":{"tags":["price-lists"],"summary":"Delete","operationId":"PriceListController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.price-lists.DELETE"]}]},"get":{"tags":["price-lists"],"summary":"Get","operationId":"PriceListController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.price-lists.READ"]}]},"put":{"tags":["price-lists"],"summary":"Update","operationId":"PriceListController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"isDefault":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"price":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.price-lists.UPDATE"]}]}},"/api/v1/projects":{"get":{"tags":["projects"],"summary":"List","operationId":"ProjectController_list","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"updatedAt"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"name":"groupId","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create","operationId":"ProjectController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 10000"},"color":{"type":"string","description":"max length 32"},"status":{"type":"string"},"priority":{"type":"string"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"ownerMemberId":{"type":"string","format":"uuid"},"access":{"type":"string"},"groupId":{"type":"string","format":"uuid"},"strictDates":{"type":"boolean"},"methodology":{"type":"string"},"workflowPreset":{"type":"string"},"seedBlueprint":{"type":"boolean"},"key":{"type":"string","description":"max length 10"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/access":{"get":{"tags":["projects"],"summary":"Projects access","operationId":"AddonFeatureAccessController_projectsAccess","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/automation/executions":{"get":{"tags":["projects"],"summary":"Executions","operationId":"ProjectAutomationController_executions","parameters":[{"name":"ruleId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"macroId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/automation/macros":{"get":{"tags":["projects"],"summary":"Macros","operationId":"ProjectAutomationController_macros","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create macro","operationId":"ProjectAutomationController_createMacro","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string","description":"max length 2000"},"projectId":{"type":"string","format":"uuid"},"actions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"required, length 1-20"},"active":{"type":"boolean"},"version":{"type":"integer"}},"required":["actions","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/automation/macros/{macroId}":{"delete":{"tags":["projects"],"summary":"Delete macro","operationId":"ProjectAutomationController_deleteMacro","parameters":[{"name":"macroId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update macro","operationId":"ProjectAutomationController_updateMacro","parameters":[{"name":"macroId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string","description":"max length 2000"},"projectId":{"type":"string","format":"uuid"},"actions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"required, length 1-20"},"active":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/automation/rules":{"get":{"tags":["projects"],"summary":"Rules","operationId":"ProjectAutomationController_rules","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create rule","operationId":"ProjectAutomationController_createRule","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string","description":"max length 2000"},"projectId":{"type":"string","format":"uuid"},"entityType":{"type":"string"},"trigger":{"type":"string","description":"required, not blank"},"triggerField":{"type":"string"},"triggerOffsetMinutes":{"type":"integer","description":">= 0, <= 525600"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"conditionMatch":{"type":"string"},"actions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"active":{"type":"boolean"},"version":{"type":"integer"}},"required":["trigger","name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/automation/rules/test":{"post":{"tags":["projects"],"summary":"Test rule","operationId":"ProjectAutomationController_testRule","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rule":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string","description":"max length 2000"},"projectId":{"type":"string","format":"uuid"},"entityType":{"type":"string"},"trigger":{"type":"string","description":"required, not blank"},"triggerField":{"type":"string"},"triggerOffsetMinutes":{"type":"integer","description":">= 0, <= 525600"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"conditionMatch":{"type":"string"},"actions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"active":{"type":"boolean"},"version":{"type":"integer"}},"description":"required"},"projectId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"}},"required":["rule","projectId","taskId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/automation/rules/{ruleId}":{"delete":{"tags":["projects"],"summary":"Delete rule","operationId":"ProjectAutomationController_deleteRule","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Rule","operationId":"ProjectAutomationController_rule","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update rule","operationId":"ProjectAutomationController_updateRule","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string","description":"max length 2000"},"projectId":{"type":"string","format":"uuid"},"entityType":{"type":"string"},"trigger":{"type":"string","description":"required, not blank"},"triggerField":{"type":"string"},"triggerOffsetMinutes":{"type":"integer","description":">= 0, <= 525600"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"conditionMatch":{"type":"string"},"actions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"max length 20"},"active":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/automation/rules/{ruleId}/active":{"patch":{"tags":["projects"],"summary":"Toggle rule","operationId":"ProjectAutomationController_toggleRule","parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"required"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/business-calendar":{"get":{"tags":["projects"],"summary":"Business calendar","operationId":"ProjectPortalController_businessCalendar","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update business calendar","operationId":"ProjectPortalController_updateBusinessCalendar","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workingDays":{"type":"array","items":{"type":"integer"},"description":"required, length 1-7"},"dailyHours":{"type":"number","description":"required"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/business-calendar/holidays":{"post":{"tags":["projects"],"summary":"Add holiday","operationId":"ProjectPortalController_addHoliday","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"name":{"type":"string","description":"required, not blank, max length 120"},"version":{"type":"integer"}},"required":["name","date"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/business-calendar/holidays/{holidayId}":{"delete":{"tags":["projects"],"summary":"Delete holiday","operationId":"ProjectPortalController_deleteHoliday","parameters":[{"name":"holidayId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update holiday","operationId":"ProjectPortalController_updateHoliday","parameters":[{"name":"holidayId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"name":{"type":"string","description":"required, not blank, max length 120"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/calendar":{"get":{"tags":["projects"],"summary":"Calendar","operationId":"ProjectPortalController_calendar","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"types","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/custom-field-values":{"get":{"tags":["projects"],"summary":"Values","operationId":"ProjectCustomFieldController_values","parameters":[{"name":"entityType","in":"query","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Save values","operationId":"ProjectCustomFieldController_saveValues","parameters":[{"name":"entityType","in":"query","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{},"description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/custom-fields":{"get":{"tags":["projects"],"summary":"Fields","operationId":"ProjectCustomFieldController_fields","parameters":[{"name":"entityType","in":"query","required":true,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create field","operationId":"ProjectCustomFieldController_createField","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string"},"label":{"type":"string","description":"required, not blank, max length 100"},"key":{"type":"string","description":"max length 60"},"fieldType":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"},"helpText":{"type":"string","description":"max length 300"},"active":{"type":"boolean"},"version":{"type":"integer"}},"required":["label"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/custom-fields/reorder":{"put":{"tags":["projects"],"summary":"Reorder fields","operationId":"ProjectCustomFieldController_reorderFields","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","description":"required, not blank"},"fieldIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/custom-fields/{fieldId}":{"delete":{"tags":["projects"],"summary":"Delete field","operationId":"ProjectCustomFieldController_deleteField","parameters":[{"name":"fieldId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update field","operationId":"ProjectCustomFieldController_updateField","parameters":[{"name":"fieldId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string"},"label":{"type":"string","description":"required, not blank, max length 100"},"key":{"type":"string","description":"max length 60"},"fieldType":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"},"helpText":{"type":"string","description":"max length 300"},"active":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/dashboard":{"get":{"tags":["projects"],"summary":"Dashboard","operationId":"ProjectController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/feed":{"get":{"tags":["projects"],"summary":"Feed","operationId":"ProjectPortalController_feed","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/form-templates":{"get":{"tags":["projects"],"summary":"Form templates","operationId":"ProjectJiraController_formTemplates","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/from-template":{"post":{"tags":["projects"],"summary":"From template","operationId":"ProjectAccessController_fromTemplate","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","description":"required, not blank, max length 200"},"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 10000"},"color":{"type":"string","description":"max length 32"},"status":{"type":"string"},"priority":{"type":"string"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"ownerMemberId":{"type":"string","format":"uuid"},"access":{"type":"string"},"groupId":{"type":"string","format":"uuid"},"strictDates":{"type":"boolean"},"methodology":{"type":"string"},"key":{"type":"string","description":"max length 10"},"includeSamples":{"type":"boolean"}},"required":["name","templateId","startDate"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/groups":{"get":{"tags":["projects"],"summary":"Groups","operationId":"ProjectAccessController_groups","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create group","operationId":"ProjectAccessController_createGroup","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/groups/{groupId}":{"delete":{"tags":["projects"],"summary":"Delete group","operationId":"ProjectAccessController_deleteGroup","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update group","operationId":"ProjectAccessController_updateGroup","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/inspection-templates":{"get":{"tags":["projects"],"summary":"Templates","operationId":"ProjectInteriorController_templates","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create template","operationId":"ProjectInteriorController_createTemplate","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"category":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"expected":{"type":"string"}}}},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/inspection-templates/{templateId}":{"delete":{"tags":["projects"],"summary":"Delete template","operationId":"ProjectInteriorController_deleteTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update template","operationId":"ProjectInteriorController_updateTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"category":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"expected":{"type":"string"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/issues":{"get":{"tags":["projects"],"summary":"Portal","operationId":"ProjectIssueController_portal","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"statusId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"severity","in":"query","required":false,"schema":{"type":"string"}},{"name":"classification","in":"query","required":false,"schema":{"type":"string"}},{"name":"assigneeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"reporter","in":"query","required":false,"schema":{"type":"string"}},{"name":"milestoneId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"flag","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"updatedAt"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/issues/my":{"get":{"tags":["projects"],"summary":"Portal","operationId":"ProjectIssueController_portal_2","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"statusId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"severity","in":"query","required":false,"schema":{"type":"string"}},{"name":"classification","in":"query","required":false,"schema":{"type":"string"}},{"name":"assigneeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"reporter","in":"query","required":false,"schema":{"type":"string"}},{"name":"milestoneId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"flag","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"updatedAt"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/members":{"get":{"tags":["projects"],"summary":"Members","operationId":"ProjectController_members","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/milestones":{"get":{"tags":["projects"],"summary":"Portal milestones","operationId":"ProjectController_portalMilestones","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"ownerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"endDate"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/milestones/my":{"get":{"tags":["projects"],"summary":"Portal milestones","operationId":"ProjectController_portalMilestones_2","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"ownerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"endDate"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/my-tasks":{"get":{"tags":["projects"],"summary":"My tasks","operationId":"ProjectController_myTasks","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"stageId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"dueDate"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"itemType","in":"query","required":false,"schema":{"type":"string"}},{"name":"sprint","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/onboarding":{"get":{"tags":["projects"],"summary":"Onboarding","operationId":"ProjectSetupController_onboarding","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Save onboarding","operationId":"ProjectSetupController_saveOnboarding","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"industry":{"type":"string","description":"max length 40"},"teamType":{"type":"string","description":"max length 80"},"teamSize":{"type":"string","description":"max length 20"},"workStyle":{"type":"string","description":"max length 20"},"defaultMethodology":{"type":"string","description":"max length 20"},"defaultTemplateKey":{"type":"string","description":"max length 200"},"defaultSections":{"type":"array","items":{"type":"string"},"description":"max length 20"},"addRecommendedFields":{"type":"boolean"},"complete":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/onboarding/dismiss":{"post":{"tags":["projects"],"summary":"Dismiss onboarding","operationId":"ProjectSetupController_dismissOnboarding","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/recurring-tasks":{"get":{"tags":["projects"],"summary":"Recurring tasks","operationId":"ProjectTaskAutomationController_recurringTasks","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/recycle-bin":{"get":{"tags":["projects"],"summary":"Recycle bin","operationId":"ProjectPortalController_recycleBin","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","default":"ALL"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/reports/overdue":{"get":{"tags":["projects"],"summary":"Overdue","operationId":"ProjectReportController_overdue","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/reports/planned-vs-actual":{"get":{"tags":["projects"],"summary":"Planned vs actual","operationId":"ProjectReportController_plannedVsActual","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/reports/status-distribution":{"get":{"tags":["projects"],"summary":"Status distribution","operationId":"ProjectReportController_statusDistribution","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/reports/time":{"get":{"tags":["projects"],"summary":"Time","operationId":"ProjectReportController_time","parameters":[{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","default":"user"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/reports/workload":{"get":{"tags":["projects"],"summary":"Workload","operationId":"ProjectReportController_workload","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/saved-views":{"get":{"tags":["projects"],"summary":"Saved views","operationId":"ProjectPortalController_savedViews","parameters":[{"name":"module","in":"query","required":false,"schema":{"type":"string","default":"TASK"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create saved view","operationId":"ProjectPortalController_createSavedView","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 80"},"module":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"isDefault":{"type":"boolean"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/saved-views/{viewId}":{"delete":{"tags":["projects"],"summary":"Delete saved view","operationId":"ProjectPortalController_deleteSavedView","parameters":[{"name":"viewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update saved view","operationId":"ProjectPortalController_updateSavedView","parameters":[{"name":"viewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 80"},"module":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"isDefault":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/storage":{"get":{"tags":["projects"],"summary":"Quota","operationId":"ProjectAttachmentController_quota","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/tags":{"get":{"tags":["projects"],"summary":"Tags","operationId":"ProjectController_tags","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create tag","operationId":"ProjectController_createTag","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 40"},"color":{"type":"string","description":"max length 32"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/tags/{tagId}":{"delete":{"tags":["projects"],"summary":"Delete tag","operationId":"ProjectController_deleteTag","parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update tag","operationId":"ProjectController_updateTag","parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 40"},"color":{"type":"string","description":"max length 32"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/tasks":{"get":{"tags":["projects"],"summary":"Tasks","operationId":"ProjectPortalController_tasks","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"tagIds","in":"query","required":false,"schema":{"type":"string"}},{"name":"taskListId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateField","in":"query","required":false,"schema":{"type":"string","default":"due"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"includeSubtasks","in":"query","required":false,"schema":{"type":"boolean","default":"true"}},{"name":"itemType","in":"query","required":false,"schema":{"type":"string"}},{"name":"sprint","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"dueDate"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/tasks/my":{"get":{"tags":["projects"],"summary":"My tasks","operationId":"ProjectController_myTasks_2","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"stageId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"dueDate"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"itemType","in":"query","required":false,"schema":{"type":"string"}},{"name":"sprint","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/teams":{"get":{"tags":["projects"],"summary":"Teams","operationId":"ProjectJiraController_teams","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create team","operationId":"ProjectJiraController_createTeam","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 80"},"color":{"type":"string","description":"max length 20"},"description":{"type":"string","description":"max length 500"},"memberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 500"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/teams/{teamId}":{"delete":{"tags":["projects"],"summary":"Delete team","operationId":"ProjectJiraController_deleteTeam","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Team","operationId":"ProjectJiraController_team","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update team","operationId":"ProjectJiraController_updateTeam","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 80"},"color":{"type":"string","description":"max length 20"},"description":{"type":"string","description":"max length 500"},"memberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 500"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/template-catalog":{"get":{"tags":["projects"],"summary":"Catalog","operationId":"ProjectSetupController_catalog","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/template-catalog/{key}":{"get":{"tags":["projects"],"summary":"Preview","operationId":"ProjectSetupController_preview","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/templates":{"get":{"tags":["projects"],"summary":"Templates","operationId":"ProjectAccessController_templates","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/templates/{templateId}":{"delete":{"tags":["projects"],"summary":"Delete template","operationId":"ProjectAccessController_deleteTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"patch":{"tags":["projects"],"summary":"Update template","operationId":"ProjectAccessController_updateTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"max length 160"},"description":{"type":"string","description":"max length 2000"},"shared":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/templates/{templateId}/duplicate":{"post":{"tags":["projects"],"summary":"Duplicate template","operationId":"ProjectAccessController_duplicateTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/timesheets/approvals":{"get":{"tags":["projects"],"summary":"Approvals","operationId":"ProjectTimesheetController_approvals","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/timesheets/settings":{"get":{"tags":["projects"],"summary":"Settings","operationId":"ProjectTimesheetController_settings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update settings","operationId":"ProjectTimesheetController_updateSettings","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approvalRequired":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/timesheets/time-logs":{"get":{"tags":["projects"],"summary":"Time logs","operationId":"ProjectTimesheetController_timeLogs","parameters":[{"name":"membershipId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"billable","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"approvalStatus","in":"query","required":false,"schema":{"type":"string"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"50"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/timesheets/time-logs/export":{"get":{"tags":["projects"],"summary":"Export time logs","operationId":"ProjectTimesheetController_exportTimeLogs","parameters":[{"name":"membershipId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"billable","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"approvalStatus","in":"query","required":false,"schema":{"type":"string"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/timesheets/week":{"get":{"tags":["projects"],"summary":"Week","operationId":"ProjectTimesheetController_week","parameters":[{"name":"weekStart","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"membershipId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/timesheets/week/cells":{"put":{"tags":["projects"],"summary":"Upsert cells","operationId":"ProjectTimesheetController_upsertCells","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","format":"date"},"cells":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"minutes":{"type":"integer"},"billable":{"type":"boolean"},"description":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/timesheets/week/submit":{"post":{"tags":["projects"],"summary":"Submit","operationId":"ProjectTimesheetController_submit","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","format":"date"},"version":{"type":"integer"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/timesheets/{timesheetId}/approve":{"post":{"tags":["projects"],"summary":"Approve","operationId":"ProjectTimesheetController_approve","parameters":[{"name":"timesheetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"version":{"type":"integer"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/timesheets/{timesheetId}/reject":{"post":{"tags":["projects"],"summary":"Reject","operationId":"ProjectTimesheetController_reject","parameters":[{"name":"timesheetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/timesheets/{timesheetId}/reopen":{"post":{"tags":["projects"],"summary":"Reopen","operationId":"ProjectTimesheetController_reopen","parameters":[{"name":"timesheetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"version":{"type":"integer"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/workflow-presets":{"get":{"tags":["projects"],"summary":"Presets","operationId":"ProjectSprintController_presets","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}":{"get":{"tags":["projects"],"summary":"Get","operationId":"ProjectController_get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update","operationId":"ProjectController_update","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 10000"},"color":{"type":"string","description":"max length 32"},"status":{"type":"string"},"priority":{"type":"string"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"ownerMemberId":{"type":"string","format":"uuid"},"version":{"type":"integer","description":"required"},"access":{"type":"string"},"groupId":{"type":"string","format":"uuid"},"clearGroup":{"type":"boolean"},"strictDates":{"type":"boolean"},"methodology":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/activity":{"get":{"tags":["projects"],"summary":"Activity","operationId":"ProjectController_activity","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/archive":{"post":{"tags":["projects"],"summary":"Archive","operationId":"ProjectController_archive","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/backlog":{"get":{"tags":["projects"],"summary":"Backlog","operationId":"ProjectSprintController_backlog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"epicId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/backlog/rank":{"put":{"tags":["projects"],"summary":"Rank","operationId":"ProjectSprintController_rank","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty, max length 500"},"afterTaskId":{"type":"string","format":"uuid"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/billing":{"get":{"tags":["projects"],"summary":"Billing","operationId":"ProjectBillingController_billing","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/billing/invoice":{"post":{"tags":["projects"],"summary":"Generate invoice","operationId":"ProjectBillingController_generateInvoice","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/billing/settings":{"put":{"tags":["projects"],"summary":"Update billing","operationId":"ProjectBillingController_updateBilling","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"defaultHourlyRate":{"type":"number"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/budget":{"get":{"tags":["projects"],"summary":"Budget","operationId":"ProjectBudgetController_budget","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update","operationId":"ProjectBudgetController_update","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"budgetType":{"type":"string"},"budgetHours":{"type":"number"},"budgetAmount":{"type":"number"},"budgetAlertPercent":{"type":"integer"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/calendar":{"get":{"tags":["projects"],"summary":"Calendar","operationId":"ProjectController_calendar","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/client-portal/decisions":{"get":{"tags":["projects"],"summary":"Decisions","operationId":"ProjectClientAccessController_decisions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/client-portal/links":{"get":{"tags":["projects"],"summary":"Links","operationId":"ProjectClientAccessController_links","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create link","operationId":"ProjectClientAccessController_createLink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientName":{"type":"string","description":"required, not blank, max length 120"},"clientEmail":{"type":"string","description":"max length 254"},"permissions":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"},"version":{"type":"integer"}},"required":["clientName"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/client-portal/links/{linkId}":{"put":{"tags":["projects"],"summary":"Update link","operationId":"ProjectClientAccessController_updateLink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientName":{"type":"string","description":"required, not blank, max length 120"},"clientEmail":{"type":"string","description":"max length 254"},"permissions":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/client-portal/links/{linkId}/revoke":{"post":{"tags":["projects"],"summary":"Revoke link","operationId":"ProjectClientAccessController_revokeLink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/client-portal/messages":{"get":{"tags":["projects"],"summary":"Messages","operationId":"ProjectClientAccessController_messages","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Reply","operationId":"ProjectClientAccessController_reply","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 4000"},"website":{"type":"string"}},"required":["body"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/billing":{"get":{"tags":["projects"],"summary":"Billing","operationId":"ProjectCommercialController_billing","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/commercial/billing-milestones":{"post":{"tags":["projects"],"summary":"Create milestone","operationId":"ProjectCommercialController_createMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"basis":{"type":"string"},"percent":{"type":"number"},"amount":{"type":"number"},"taxPercent":{"type":"number"},"milestoneId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"status":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/billing-milestones/{milestoneId}":{"delete":{"tags":["projects"],"summary":"Delete milestone","operationId":"ProjectCommercialController_deleteMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update milestone","operationId":"ProjectCommercialController_updateMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"basis":{"type":"string"},"percent":{"type":"number"},"amount":{"type":"number"},"taxPercent":{"type":"number"},"milestoneId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"status":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/billing-milestones/{milestoneId}/invoice":{"post":{"tags":["projects"],"summary":"Invoice milestone","operationId":"ProjectCommercialController_invoiceMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq":{"get":{"tags":["projects"],"summary":"Boq","operationId":"ProjectCommercialController_boq","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/commercial/boq/budget":{"post":{"tags":["projects"],"summary":"Budget from boq","operationId":"ProjectCommercialController_budgetFromBoq","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/export":{"get":{"tags":["projects"],"summary":"Export boq","operationId":"ProjectCommercialController_exportBoq","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/commercial/boq/import":{"post":{"tags":["projects"],"summary":"Import boq","operationId":"ProjectCommercialController_importBoq","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string"},"replace":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/items":{"post":{"tags":["projects"],"summary":"Create item","operationId":"ProjectCommercialController_createItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"itemCode":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"},"inventoryItemId":{"type":"string","format":"uuid"},"notes":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/items/{itemId}":{"delete":{"tags":["projects"],"summary":"Delete item","operationId":"ProjectCommercialController_deleteItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update item","operationId":"ProjectCommercialController_updateItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"itemCode":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"},"inventoryItemId":{"type":"string","format":"uuid"},"notes":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/quotation":{"post":{"tags":["projects"],"summary":"Quotation","operationId":"ProjectCommercialController_quotation","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/reorder":{"post":{"tags":["projects"],"summary":"Reorder","operationId":"ProjectCommercialController_reorder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"itemIds":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/sections":{"post":{"tags":["projects"],"summary":"Create section","operationId":"ProjectCommercialController_createSection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"area":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/boq/sections/{sectionId}":{"delete":{"tags":["projects"],"summary":"Delete section","operationId":"ProjectCommercialController_deleteSection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update section","operationId":"ProjectCommercialController_updateSection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"area":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/change-orders":{"get":{"tags":["projects"],"summary":"Change orders","operationId":"ProjectCommercialController_changeOrders","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create change order","operationId":"ProjectCommercialController_createChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"},"scope":{"type":"string"},"costImpact":{"type":"number"},"timeImpactDays":{"type":"integer"},"shiftDueDate":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"boqItemId":{"type":"string","format":"uuid"},"itemCode":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/change-orders/{changeOrderId}":{"delete":{"tags":["projects"],"summary":"Delete change order","operationId":"ProjectCommercialController_deleteChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update change order","operationId":"ProjectCommercialController_updateChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"},"scope":{"type":"string"},"costImpact":{"type":"number"},"timeImpactDays":{"type":"integer"},"shiftDueDate":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"boqItemId":{"type":"string","format":"uuid"},"itemCode":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/change-orders/{changeOrderId}/approve":{"post":{"tags":["projects"],"summary":"Approve change order","operationId":"ProjectCommercialController_approveChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientApproverName":{"type":"string"},"shiftDueDate":{"type":"boolean"},"note":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/change-orders/{changeOrderId}/reject":{"post":{"tags":["projects"],"summary":"Reject change order","operationId":"ProjectCommercialController_rejectChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientApproverName":{"type":"string"},"shiftDueDate":{"type":"boolean"},"note":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/change-orders/{changeOrderId}/submit":{"post":{"tags":["projects"],"summary":"Submit change order","operationId":"ProjectCommercialController_submitChangeOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/consumption":{"post":{"tags":["projects"],"summary":"Log consumption","operationId":"ProjectCommercialController_logConsumption","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"consumedOn":{"type":"string","format":"date"},"inventoryItemId":{"type":"string","format":"uuid"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"boqItemId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/consumption/{consumptionId}":{"delete":{"tags":["projects"],"summary":"Delete consumption","operationId":"ProjectCommercialController_deleteConsumption","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"consumptionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/commercial/contract":{"get":{"tags":["projects"],"summary":"Contract","operationId":"ProjectCommercialController_contract","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update contract","operationId":"ProjectCommercialController_updateContract","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractValue":{"type":"number"},"retentionPercent":{"type":"number"},"advanceAmount":{"type":"number"},"advanceRecoveryPercent":{"type":"number"},"defectLiabilityDays":{"type":"integer"},"completionDate":{"type":"string","format":"date"},"customerId":{"type":"string","format":"uuid"},"clearCustomer":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/lookups/{type}":{"get":{"tags":["projects"],"summary":"Lookup","operationId":"ProjectCommercialController_lookup","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/commercial/material-requests":{"post":{"tags":["projects"],"summary":"Create request","operationId":"ProjectCommercialController_createRequest","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"neededBy":{"type":"string","format":"date"},"location":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"boqItemId":{"type":"string","format":"uuid"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/material-requests/{requestId}":{"delete":{"tags":["projects"],"summary":"Delete request","operationId":"ProjectCommercialController_deleteRequest","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update request","operationId":"ProjectCommercialController_updateRequest","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"neededBy":{"type":"string","format":"date"},"location":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"boqItemId":{"type":"string","format":"uuid"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/material-requests/{requestId}/purchase-order":{"post":{"tags":["projects"],"summary":"Create purchase order","operationId":"ProjectCommercialController_createPurchaseOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"orderDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"requestItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxRate":{"type":"number"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/material-requests/{requestId}/receive":{"post":{"tags":["projects"],"summary":"Receive","operationId":"ProjectCommercialController_receive","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"requestItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/material-requests/{requestId}/{action}":{"post":{"tags":["projects"],"summary":"Request action","operationId":"ProjectCommercialController_requestAction","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/procurement":{"get":{"tags":["projects"],"summary":"Procurement","operationId":"ProjectCommercialController_procurement","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/commercial/running-bills":{"post":{"tags":["projects"],"summary":"Create running bill","operationId":"ProjectCommercialController_createRunningBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"retentionPercent":{"type":"number"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/running-bills/retention-release":{"post":{"tags":["projects"],"summary":"Retention release","operationId":"ProjectCommercialController_retentionRelease","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/running-bills/{billId}":{"delete":{"tags":["projects"],"summary":"Delete running bill","operationId":"ProjectCommercialController_deleteRunningBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Running bill","operationId":"ProjectCommercialController_runningBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update running bill","operationId":"ProjectCommercialController_updateRunningBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"retentionPercent":{"type":"number"},"advanceRecoveryAmount":{"type":"number"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"boqItemId":{"type":"string","format":"uuid"},"currentQty":{"type":"number"},"cumulativeQty":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/running-bills/{billId}/{action}":{"post":{"tags":["projects"],"summary":"Running bill action","operationId":"ProjectCommercialController_runningBillAction","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts":{"get":{"tags":["projects"],"summary":"Subcontracts","operationId":"ProjectCommercialController_subcontracts","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create subcontract","operationId":"ProjectCommercialController_createSubcontract","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"title":{"type":"string"},"scope":{"type":"string"},"contractValue":{"type":"number"},"retentionPercent":{"type":"number"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"boqItemId":{"type":"string","format":"uuid"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}":{"delete":{"tags":["projects"],"summary":"Delete subcontract","operationId":"ProjectCommercialController_deleteSubcontract","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update subcontract","operationId":"ProjectCommercialController_updateSubcontract","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"title":{"type":"string"},"scope":{"type":"string"},"contractValue":{"type":"number"},"retentionPercent":{"type":"number"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"boqItemId":{"type":"string","format":"uuid"},"description":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"taxPercent":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}/bills":{"post":{"tags":["projects"],"summary":"Create subcontract bill","operationId":"ProjectCommercialController_createSubcontractBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"retentionPercent":{"type":"number"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"subcontractItemId":{"type":"string","format":"uuid"},"currentQty":{"type":"number"},"cumulativeQty":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}/bills/{billId}":{"delete":{"tags":["projects"],"summary":"Delete subcontract bill","operationId":"ProjectCommercialController_deleteSubcontractBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update subcontract bill","operationId":"ProjectCommercialController_updateSubcontractBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"retentionPercent":{"type":"number"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"subcontractItemId":{"type":"string","format":"uuid"},"currentQty":{"type":"number"},"cumulativeQty":{"type":"number"}}}},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}/bills/{billId}/vendor-bill":{"post":{"tags":["projects"],"summary":"Vendor bill","operationId":"ProjectCommercialController_vendorBill","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}/bills/{billId}/{action}":{"post":{"tags":["projects"],"summary":"Subcontract bill action","operationId":"ProjectCommercialController_subcontractBillAction","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/subcontracts/{subcontractId}/work-order":{"post":{"tags":["projects"],"summary":"Work order","operationId":"ProjectCommercialController_workOrder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"subcontractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/commercial/summary":{"get":{"tags":["projects"],"summary":"Summary","operationId":"ProjectCommercialController_summary","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/dashboard":{"get":{"tags":["projects"],"summary":"Dashboard","operationId":"ProjectReportController_dashboard","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/epics":{"get":{"tags":["projects"],"summary":"Epics","operationId":"ProjectSprintController_epics","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/feed":{"get":{"tags":["projects"],"summary":"Feed","operationId":"ProjectFeedController_feed","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/forms":{"get":{"tags":["projects"],"summary":"Forms","operationId":"ProjectJiraController_forms","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create form","operationId":"ProjectJiraController_createForm","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"description":{"type":"string","description":"max length 2000"},"template":{"type":"string","description":"max length 40"},"targetType":{"type":"string"},"targetStageId":{"type":"string","format":"uuid"},"targetIssueStatusId":{"type":"string","format":"uuid"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"required, not blank, max length 60"},"label":{"type":"string","description":"required, not blank, max length 120"},"type":{"type":"string","description":"required, not blank"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"},"description":"max length 50"},"mapsTo":{"type":"string","description":"max length 80"},"placeholder":{"type":"string","description":"max length 200"},"helpText":{"type":"string","description":"max length 300"}}},"description":"max length 40"},"isPublic":{"type":"boolean"},"active":{"type":"boolean"},"successMessage":{"type":"string","description":"max length 500"},"regenerateToken":{"type":"boolean"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forms/{formId}":{"delete":{"tags":["projects"],"summary":"Delete form","operationId":"ProjectJiraController_deleteForm","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Form","operationId":"ProjectJiraController_form","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update form","operationId":"ProjectJiraController_updateForm","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"description":{"type":"string","description":"max length 2000"},"template":{"type":"string","description":"max length 40"},"targetType":{"type":"string"},"targetStageId":{"type":"string","format":"uuid"},"targetIssueStatusId":{"type":"string","format":"uuid"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"required, not blank, max length 60"},"label":{"type":"string","description":"required, not blank, max length 120"},"type":{"type":"string","description":"required, not blank"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"},"description":"max length 50"},"mapsTo":{"type":"string","description":"max length 80"},"placeholder":{"type":"string","description":"max length 200"},"helpText":{"type":"string","description":"max length 300"}}},"description":"max length 40"},"isPublic":{"type":"boolean"},"active":{"type":"boolean"},"successMessage":{"type":"string","description":"max length 500"},"regenerateToken":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/forms/{formId}/submissions":{"get":{"tags":["projects"],"summary":"Submissions","operationId":"ProjectJiraController_submissions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/forms/{formId}/submit":{"post":{"tags":["projects"],"summary":"Submit","operationId":"ProjectJiraController_submit","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"formId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{}},"submitterName":{"type":"string","description":"max length 120"},"submitterEmail":{"type":"string","description":"max length 254"},"website":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forums/categories":{"get":{"tags":["projects"],"summary":"Categories","operationId":"ProjectForumController_categories","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create category","operationId":"ProjectForumController_createCategory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forums/categories/{categoryId}":{"delete":{"tags":["projects"],"summary":"Delete category","operationId":"ProjectForumController_deleteCategory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update category","operationId":"ProjectForumController_updateCategory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/forums/posts":{"get":{"tags":["projects"],"summary":"Posts","operationId":"ProjectForumController_posts","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"categoryId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create post","operationId":"ProjectForumController_createPost","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"required, not blank, max length 200"},"body":{"type":"string"},"version":{"type":"integer"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}":{"delete":{"tags":["projects"],"summary":"Delete post","operationId":"ProjectForumController_deletePost","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Post","operationId":"ProjectForumController_post","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update post","operationId":"ProjectForumController_updatePost","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"required, not blank, max length 200"},"body":{"type":"string"},"version":{"type":"integer"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}/follow":{"delete":{"tags":["projects"],"summary":"Unfollow","operationId":"ProjectForumController_unfollow","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"post":{"tags":["projects"],"summary":"Follow","operationId":"ProjectForumController_follow","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}/lock":{"put":{"tags":["projects"],"summary":"Lock","operationId":"ProjectForumController_lock","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"boolean","description":"required"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}/pin":{"put":{"tags":["projects"],"summary":"Pin","operationId":"ProjectForumController_pin","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"boolean","description":"required"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}/replies":{"post":{"tags":["projects"],"summary":"Create reply","operationId":"ProjectForumController_createReply","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"version":{"type":"integer"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/forums/posts/{postId}/replies/{replyId}":{"delete":{"tags":["projects"],"summary":"Delete reply","operationId":"ProjectForumController_deleteReply","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"replyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update reply","operationId":"ProjectForumController_updateReply","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"replyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"version":{"type":"integer"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/gantt":{"get":{"tags":["projects"],"summary":"Gantt","operationId":"ProjectController_gantt","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/interior/mood/{itemId}":{"delete":{"tags":["projects"],"summary":"Delete mood","operationId":"ProjectInteriorController_deleteMood","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update mood","operationId":"ProjectInteriorController_updateMood","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","description":"max length 2000"},"note":{"type":"string","description":"max length 2000"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms":{"get":{"tags":["projects"],"summary":"Rooms","operationId":"ProjectInteriorController_rooms","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create room","operationId":"ProjectInteriorController_createRoom","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"roomType":{"type":"string"},"areaSqft":{"type":"number"},"floor":{"type":"string","description":"max length 40"},"notes":{"type":"string","description":"max length 2000"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms/order":{"put":{"tags":["projects"],"summary":"Reorder rooms","operationId":"ProjectInteriorController_reorderRooms","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms/{roomId}":{"delete":{"tags":["projects"],"summary":"Delete room","operationId":"ProjectInteriorController_deleteRoom","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update room","operationId":"ProjectInteriorController_updateRoom","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"roomType":{"type":"string"},"areaSqft":{"type":"number"},"floor":{"type":"string","description":"max length 40"},"notes":{"type":"string","description":"max length 2000"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms/{roomId}/mood":{"get":{"tags":["projects"],"summary":"Mood","operationId":"ProjectInteriorController_mood","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Add mood link","operationId":"ProjectInteriorController_addMoodLink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","description":"max length 2000"},"note":{"type":"string","description":"max length 2000"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms/{roomId}/mood/order":{"put":{"tags":["projects"],"summary":"Reorder mood","operationId":"ProjectInteriorController_reorderMood","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/interior/rooms/{roomId}/mood/upload":{"post":{"tags":["projects"],"summary":"Upload mood","operationId":"ProjectInteriorController_uploadMood","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"note","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/interior/selections":{"get":{"tags":["projects"],"summary":"Selections","operationId":"ProjectInteriorController_selections","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create selection","operationId":"ProjectInteriorController_createSelection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"category":{"type":"string"},"itemName":{"type":"string","description":"required, not blank, max length 200"},"brand":{"type":"string","description":"max length 120"},"model":{"type":"string","description":"max length 120"},"finish":{"type":"string","description":"max length 120"},"size":{"type":"string","description":"max length 120"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"supplier":{"type":"string","description":"max length 200"},"leadTimeDays":{"type":"integer"},"imageUrl":{"type":"string","description":"max length 2000"},"status":{"type":"string"},"version":{"type":"integer"}},"required":["itemName"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/interior/selections/send-for-approval":{"post":{"tags":["projects"],"summary":"Send for approval","operationId":"ProjectInteriorController_sendForApproval","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"selectionIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required"}},"required":["selectionIds"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/interior/selections/{selectionId}":{"delete":{"tags":["projects"],"summary":"Delete selection","operationId":"ProjectInteriorController_deleteSelection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"selectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update selection","operationId":"ProjectInteriorController_updateSelection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"selectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"category":{"type":"string"},"itemName":{"type":"string","description":"required, not blank, max length 200"},"brand":{"type":"string","description":"max length 120"},"model":{"type":"string","description":"max length 120"},"finish":{"type":"string","description":"max length 120"},"size":{"type":"string","description":"max length 120"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"supplier":{"type":"string","description":"max length 200"},"leadTimeDays":{"type":"integer"},"imageUrl":{"type":"string","description":"max length 2000"},"status":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/interior/selections/{selectionId}/status":{"patch":{"tags":["projects"],"summary":"Selection status","operationId":"ProjectInteriorController_selectionStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"selectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/issue-statuses":{"get":{"tags":["projects"],"summary":"Statuses","operationId":"ProjectIssueController_statuses","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update statuses","operationId":"ProjectIssueController_updateStatuses","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","description":"required, not blank, max length 60"},"color":{"type":"string","description":"max length 20"},"semanticType":{"type":"string"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}}},"description":"required, length 2-30"},"replacements":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/issues":{"get":{"tags":["projects"],"summary":"List","operationId":"ProjectIssueController_list","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"statusId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"severity","in":"query","required":false,"schema":{"type":"string"}},{"name":"classification","in":"query","required":false,"schema":{"type":"string"}},{"name":"assigneeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"reporter","in":"query","required":false,"schema":{"type":"string"}},{"name":"milestoneId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"flag","in":"query","required":false,"schema":{"type":"string"}},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"updatedAt"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"20"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create","operationId":"ProjectIssueController_create","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"description":{"type":"string","description":"max length 20000"},"statusId":{"type":"string","format":"uuid"},"severity":{"type":"string"},"classification":{"type":"string"},"module":{"type":"string","description":"max length 120"},"reproducible":{"type":"string"},"flag":{"type":"string"},"milestoneId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"assigneeId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"version":{"type":"integer"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/modules":{"get":{"tags":["projects"],"summary":"Modules","operationId":"ProjectIssueController_modules","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/summary":{"get":{"tags":["projects"],"summary":"Summary","operationId":"ProjectIssueController_summary","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}":{"delete":{"tags":["projects"],"summary":"Delete","operationId":"ProjectIssueController_delete","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Get","operationId":"ProjectIssueController_get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update","operationId":"ProjectIssueController_update","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"description":{"type":"string","description":"max length 20000"},"statusId":{"type":"string","format":"uuid"},"severity":{"type":"string"},"classification":{"type":"string"},"module":{"type":"string","description":"max length 120"},"reproducible":{"type":"string"},"flag":{"type":"string"},"milestoneId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"assigneeId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/activity":{"get":{"tags":["projects"],"summary":"Activity","operationId":"ProjectIssueController_activity","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"30"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/attachments":{"get":{"tags":["projects"],"summary":"List for issue","operationId":"ProjectAttachmentController_listForIssue","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Upload to issue","operationId":"ProjectAttachmentController_uploadToIssue","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/attachments/{attachmentId}":{"delete":{"tags":["projects"],"summary":"Delete from issue","operationId":"ProjectAttachmentController_deleteFromIssue","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/attachments/{attachmentId}/download":{"get":{"tags":["projects"],"summary":"Download from issue","operationId":"ProjectAttachmentController_downloadFromIssue","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/comments":{"get":{"tags":["projects"],"summary":"Comments","operationId":"ProjectIssueController_comments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create comment","operationId":"ProjectIssueController_createComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 10000"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"}},"required":["body"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/comments/{commentId}":{"delete":{"tags":["projects"],"summary":"Delete comment","operationId":"ProjectIssueController_deleteComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update comment","operationId":"ProjectIssueController_updateComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 10000"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/comments/{commentId}/restore":{"post":{"tags":["projects"],"summary":"Restore comment","operationId":"ProjectIssueController_restoreComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/convert-to-task":{"post":{"tags":["projects"],"summary":"Convert to task","operationId":"ProjectIssueController_convertToTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stageId":{"type":"string","format":"uuid"},"taskListId":{"type":"string","format":"uuid"},"priority":{"type":"string"},"closeIssue":{"type":"boolean"},"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/followers":{"get":{"tags":["projects"],"summary":"Followers","operationId":"ProjectIssueController_followers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/followers/me":{"put":{"tags":["projects"],"summary":"Follow","operationId":"ProjectIssueController_follow","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"watching":{"type":"boolean","description":"required"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/links":{"get":{"tags":["projects"],"summary":"Issue links","operationId":"ProjectJiraController_issueLinks","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/restore":{"post":{"tags":["projects"],"summary":"Restore","operationId":"ProjectIssueController_restore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/issues/{issueId}/status":{"patch":{"tags":["projects"],"summary":"Change status","operationId":"ProjectIssueController_changeStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"statusId":{"type":"string","format":"uuid"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/macros/{macroId}/run":{"post":{"tags":["projects"],"summary":"Run macro bulk","operationId":"ProjectAutomationController_runMacroBulk","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"macroId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, length 1-200"}},"required":["taskIds"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/members":{"get":{"tags":["projects"],"summary":"Members","operationId":"ProjectAccessController_members","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Add members","operationId":"ProjectAccessController_addMembers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"memberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty, max length 100"},"role":{"type":"string"}},"required":["memberIds"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/members/{memberId}":{"delete":{"tags":["projects"],"summary":"Remove member","operationId":"ProjectAccessController_removeMember","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update member","operationId":"ProjectAccessController_updateMember","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/milestones":{"get":{"tags":["projects"],"summary":"Milestones","operationId":"ProjectController_milestones","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create milestone","operationId":"ProjectController_createMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 10000"},"ownerMemberId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string"},"flag":{"type":"string"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/milestones/{milestoneId}":{"delete":{"tags":["projects"],"summary":"Delete milestone","operationId":"ProjectController_deleteMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Milestone","operationId":"ProjectController_milestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update milestone","operationId":"ProjectController_updateMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 10000"},"ownerMemberId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string"},"flag":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/milestones/{milestoneId}/complete":{"post":{"tags":["projects"],"summary":"Complete milestone","operationId":"ProjectController_completeMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/milestones/{milestoneId}/reopen":{"post":{"tags":["projects"],"summary":"Reopen milestone","operationId":"ProjectController_reopenMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/milestones/{milestoneId}/restore":{"post":{"tags":["projects"],"summary":"Restore milestone","operationId":"ProjectPortalController_restoreMilestone","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/pages":{"get":{"tags":["projects"],"summary":"Tree","operationId":"ProjectPageController_tree","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create","operationId":"ProjectPageController_create","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 200"},"content":{"type":"string"},"parentId":{"type":"string","format":"uuid"},"version":{"type":"integer"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/pages/{pageId}":{"delete":{"tags":["projects"],"summary":"Delete","operationId":"ProjectPageController_delete","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Get","operationId":"ProjectPageController_get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update","operationId":"ProjectPageController_update","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 200"},"content":{"type":"string"},"parentId":{"type":"string","format":"uuid"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/pages/{pageId}/move":{"put":{"tags":["projects"],"summary":"Move","operationId":"ProjectPageController_move","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":"string","format":"uuid"},"displayOrder":{"type":"integer"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/pages/{pageId}/versions":{"get":{"tags":["projects"],"summary":"Versions","operationId":"ProjectPageController_versions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/pages/{pageId}/versions/{versionId}/restore":{"post":{"tags":["projects"],"summary":"Restore","operationId":"ProjectPageController_restore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/reopen":{"post":{"tags":["projects"],"summary":"Reopen","operationId":"ProjectController_reopen","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/reports/burn":{"get":{"tags":["projects"],"summary":"Burn","operationId":"ProjectReportController_burn","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/restore":{"post":{"tags":["projects"],"summary":"Restore","operationId":"ProjectController_restore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/save-as-template":{"post":{"tags":["projects"],"summary":"Save as template","operationId":"ProjectAccessController_saveAsTemplate","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 160"},"description":{"type":"string","description":"max length 2000"},"shared":{"type":"boolean"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/sections":{"put":{"tags":["projects"],"summary":"Sections","operationId":"ProjectSetupController_sections","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"},"sections":{"type":"array","items":{"type":"string"},"description":"max length 20"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/drawings":{"get":{"tags":["projects"],"summary":"Drawings","operationId":"ProjectSiteController_drawings","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"includeSuperseded","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create drawing","operationId":"ProjectSiteController_createDrawing","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"required, not blank, max length 60"},"title":{"type":"string","description":"required, not blank, max length 200"},"discipline":{"type":"string"},"version":{"type":"integer"}},"required":["title","number"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/drawings/{drawingId}":{"delete":{"tags":["projects"],"summary":"Delete drawing","operationId":"ProjectSiteController_deleteDrawing","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"drawingId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update drawing","operationId":"ProjectSiteController_updateDrawing","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"drawingId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"required, not blank, max length 60"},"title":{"type":"string","description":"required, not blank, max length 200"},"discipline":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/drawings/{drawingId}/revisions":{"post":{"tags":["projects"],"summary":"Issue revision","operationId":"ProjectSiteController_issueRevision","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"drawingId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"query","required":false,"schema":{"type":"string"}},{"name":"notes","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/drawings/{drawingId}/status":{"patch":{"tags":["projects"],"summary":"Drawing status","operationId":"ProjectSiteController_drawingStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"drawingId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/files":{"post":{"tags":["projects"],"summary":"Upload","operationId":"ProjectSiteController_upload","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerType","in":"query","required":false,"schema":{"type":"string","default":"PROJECT"}},{"name":"ownerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"caption","in":"query","required":false,"schema":{"type":"string"}},{"name":"area","in":"query","required":false,"schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"schema":{"type":"string"}},{"name":"takenAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"latitude","in":"query","required":false,"schema":{"type":"number"}},{"name":"longitude","in":"query","required":false,"schema":{"type":"number"}},{"name":"clientVisible","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/files/{fileId}":{"delete":{"tags":["projects"],"summary":"Delete file","operationId":"ProjectSiteController_deleteFile","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update file","operationId":"ProjectSiteController_updateFile","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"caption":{"type":"string","description":"max length 500"},"area":{"type":"string","description":"max length 120"},"tags":{"type":"array","items":{"type":"string"}},"takenAt":{"type":"string","format":"date-time"},"clientVisible":{"type":"boolean"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/files/{fileId}/download":{"get":{"tags":["projects"],"summary":"Download","operationId":"ProjectSiteController_download","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/inspections":{"get":{"tags":["projects"],"summary":"Inspections","operationId":"ProjectSiteController_inspections","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create inspection","operationId":"ProjectSiteController_createInspection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"max length 200"},"category":{"type":"string"},"area":{"type":"string","description":"max length 120"},"roomId":{"type":"string","format":"uuid"},"inspectionDate":{"type":"string","format":"date"},"inspectorMemberId":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"expected":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/inspections/{inspectionId}":{"delete":{"tags":["projects"],"summary":"Delete inspection","operationId":"ProjectSiteController_deleteInspection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update inspection","operationId":"ProjectSiteController_updateInspection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"max length 200"},"area":{"type":"string","description":"max length 120"},"roomId":{"type":"string","format":"uuid"},"inspectionDate":{"type":"string","format":"date"},"inspectorMemberId":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"expected":{"type":"string"},"result":{"type":"string"},"note":{"type":"string"},"photoId":{"type":"string","format":"uuid"},"snagId":{"type":"string","format":"uuid"},"snagReference":{"type":"string"}}}},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/inspections/{inspectionId}/complete":{"post":{"tags":["projects"],"summary":"Complete inspection","operationId":"ProjectSiteController_completeInspection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/inspections/{inspectionId}/sign-off":{"post":{"tags":["projects"],"summary":"Sign off","operationId":"ProjectSiteController_signOff","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","description":"max length 2000"},"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/inspections/{inspectionId}/snags":{"post":{"tags":["projects"],"summary":"Snags from inspection","operationId":"ProjectSiteController_snagsFromInspection","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemKeys":{"type":"array","items":{"type":"string"}},"trade":{"type":"string"},"priority":{"type":"string"},"assigneeMemberId":{"type":"string","format":"uuid"},"assigneeName":{"type":"string","description":"max length 120"},"dueDate":{"type":"string","format":"date"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/labour/previous":{"get":{"tags":["projects"],"summary":"Previous labour","operationId":"ProjectSiteController_previousLabour","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/labour/summary":{"get":{"tags":["projects"],"summary":"Labour summary","operationId":"ProjectSiteController_labourSummary","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/logs":{"get":{"tags":["projects"],"summary":"Logs","operationId":"ProjectSiteController_logs","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create log","operationId":"ProjectSiteController_createLog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"logDate":{"type":"string","format":"date"},"weather":{"type":"string"},"temperatureC":{"type":"number"},"location":{"type":"string","description":"max length 200"},"workDone":{"type":"string"},"labour":{"type":"array","items":{"type":"object","properties":{"trade":{"type":"string"},"source":{"type":"string"},"party":{"type":"string"},"count":{"type":"integer"},"hours":{"type":"number"}}}},"equipment":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"hours":{"type":"number"},"status":{"type":"string"}}}},"materialsReceived":{"type":"string","description":"max length 4000"},"materialRequestId":{"type":"string","format":"uuid"},"visitors":{"type":"string","description":"max length 2000"},"safetyStatus":{"type":"string"},"safetyNote":{"type":"string","description":"max length 4000"},"hindrances":{"type":"string","description":"max length 4000"},"version":{"type":"integer"}},"required":["logDate"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/logs/date/{date}":{"get":{"tags":["projects"],"summary":"Log by date","operationId":"ProjectSiteController_logByDate","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/logs/{logId}":{"delete":{"tags":["projects"],"summary":"Delete log","operationId":"ProjectSiteController_deleteLog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Log","operationId":"ProjectSiteController_log","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update log","operationId":"ProjectSiteController_updateLog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"logDate":{"type":"string","format":"date"},"weather":{"type":"string"},"temperatureC":{"type":"number"},"location":{"type":"string","description":"max length 200"},"workDone":{"type":"string"},"labour":{"type":"array","items":{"type":"object","properties":{"trade":{"type":"string"},"source":{"type":"string"},"party":{"type":"string"},"count":{"type":"integer"},"hours":{"type":"number"}}}},"equipment":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"hours":{"type":"number"},"status":{"type":"string"}}}},"materialsReceived":{"type":"string","description":"max length 4000"},"materialRequestId":{"type":"string","format":"uuid"},"visitors":{"type":"string","description":"max length 2000"},"safetyStatus":{"type":"string"},"safetyNote":{"type":"string","description":"max length 4000"},"hindrances":{"type":"string","description":"max length 4000"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/logs/{logId}/reopen":{"post":{"tags":["projects"],"summary":"Reopen log","operationId":"ProjectSiteController_reopenLog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/logs/{logId}/submit":{"post":{"tags":["projects"],"summary":"Submit log","operationId":"ProjectSiteController_submitLog","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/photos":{"get":{"tags":["projects"],"summary":"Photos","operationId":"ProjectSiteController_photos","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"area","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/rfis":{"get":{"tags":["projects"],"summary":"Rfis","operationId":"ProjectSiteController_rfis","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create rfi","operationId":"ProjectSiteController_createRfi","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","description":"required, not blank, max length 200"},"question":{"type":"string","description":"max length 20000"},"discipline":{"type":"string"},"drawingId":{"type":"string","format":"uuid"},"assigneeMemberId":{"type":"string","format":"uuid"},"externalName":{"type":"string","description":"max length 120"},"externalEmail":{"type":"string","description":"max length 254"},"dueDate":{"type":"string","format":"date"},"costImpact":{"type":"boolean"},"timeImpact":{"type":"boolean"},"changeOrderId":{"type":"string","format":"uuid"},"version":{"type":"integer"}},"required":["subject"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/rfis/{rfiId}":{"delete":{"tags":["projects"],"summary":"Delete rfi","operationId":"ProjectSiteController_deleteRfi","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rfiId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update rfi","operationId":"ProjectSiteController_updateRfi","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rfiId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","description":"required, not blank, max length 200"},"question":{"type":"string","description":"max length 20000"},"discipline":{"type":"string"},"drawingId":{"type":"string","format":"uuid"},"assigneeMemberId":{"type":"string","format":"uuid"},"externalName":{"type":"string","description":"max length 120"},"externalEmail":{"type":"string","description":"max length 254"},"dueDate":{"type":"string","format":"date"},"costImpact":{"type":"boolean"},"timeImpact":{"type":"boolean"},"changeOrderId":{"type":"string","format":"uuid"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/rfis/{rfiId}/answer":{"post":{"tags":["projects"],"summary":"Answer rfi","operationId":"ProjectSiteController_answerRfi","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rfiId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"required, not blank, max length 20000"},"version":{"type":"integer","description":"required"}},"required":["version","answer"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/rfis/{rfiId}/status":{"patch":{"tags":["projects"],"summary":"Rfi status","operationId":"ProjectSiteController_rfiStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rfiId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/snags":{"get":{"tags":["projects"],"summary":"Snags","operationId":"ProjectSiteController_snags","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create snag","operationId":"ProjectSiteController_createSnag","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"type":"string","description":"max length 120"},"roomId":{"type":"string","format":"uuid"},"trade":{"type":"string","description":"max length 60"},"description":{"type":"string","description":"required, not blank, max length 4000"},"priority":{"type":"string"},"assigneeMemberId":{"type":"string","format":"uuid"},"assigneeName":{"type":"string","description":"max length 120"},"dueDate":{"type":"string","format":"date"},"version":{"type":"integer"}},"required":["description"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/snags/readiness":{"get":{"tags":["projects"],"summary":"Readiness","operationId":"ProjectSiteController_readiness","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/site/snags/{snagId}":{"delete":{"tags":["projects"],"summary":"Delete snag","operationId":"ProjectSiteController_deleteSnag","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"snagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update snag","operationId":"ProjectSiteController_updateSnag","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"snagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"type":"string","description":"max length 120"},"roomId":{"type":"string","format":"uuid"},"trade":{"type":"string","description":"max length 60"},"description":{"type":"string","description":"required, not blank, max length 4000"},"priority":{"type":"string"},"assigneeMemberId":{"type":"string","format":"uuid"},"assigneeName":{"type":"string","description":"max length 120"},"dueDate":{"type":"string","format":"date"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/snags/{snagId}/status":{"patch":{"tags":["projects"],"summary":"Snag status","operationId":"ProjectSiteController_snagStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"snagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/submittals":{"get":{"tags":["projects"],"summary":"Submittals","operationId":"ProjectSiteController_submittals","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create submittal","operationId":"ProjectSiteController_createSubmittal","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string","description":"required, not blank, max length 200"},"submittalType":{"type":"string"},"specRef":{"type":"string","description":"max length 120"},"supplier":{"type":"string","description":"max length 200"},"submittedDate":{"type":"string","format":"date"},"version":{"type":"integer"}},"required":["item"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/submittals/{submittalId}":{"delete":{"tags":["projects"],"summary":"Delete submittal","operationId":"ProjectSiteController_deleteSubmittal","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"submittalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update submittal","operationId":"ProjectSiteController_updateSubmittal","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"submittalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string","description":"required, not blank, max length 200"},"submittalType":{"type":"string"},"specRef":{"type":"string","description":"max length 120"},"supplier":{"type":"string","description":"max length 200"},"submittedDate":{"type":"string","format":"date"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/site/submittals/{submittalId}/resubmit":{"post":{"tags":["projects"],"summary":"Resubmit","operationId":"ProjectSiteController_resubmit","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"submittalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/site/submittals/{submittalId}/review":{"post":{"tags":["projects"],"summary":"Review submittal","operationId":"ProjectSiteController_reviewSubmittal","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"submittalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"required, not blank"},"reviewerNotes":{"type":"string","description":"max length 4000"},"version":{"type":"integer","description":"required"}},"required":["status","version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/sprints":{"get":{"tags":["projects"],"summary":"Sprints","operationId":"ProjectSprintController_sprints","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create","operationId":"ProjectSprintController_create","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"goal":{"type":"string","description":"max length 2000"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"version":{"type":"integer"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/sprints/active":{"get":{"tags":["projects"],"summary":"Active sprint","operationId":"ProjectSprintController_activeSprint","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/sprints/items":{"post":{"tags":["projects"],"summary":"Move items","operationId":"ProjectSprintController_moveItems","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty, max length 500"},"sprintId":{"type":"string","format":"uuid"}},"required":["taskIds"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/sprints/velocity":{"get":{"tags":["projects"],"summary":"Velocity","operationId":"ProjectSprintController_velocity","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":"6"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/sprints/{sprintId}":{"delete":{"tags":["projects"],"summary":"Delete","operationId":"ProjectSprintController_delete","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Sprint","operationId":"ProjectSprintController_sprint","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update","operationId":"ProjectSprintController_update","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"goal":{"type":"string","description":"max length 2000"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/sprints/{sprintId}/burndown":{"get":{"tags":["projects"],"summary":"Burndown","operationId":"ProjectSprintController_burndown","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/sprints/{sprintId}/complete":{"post":{"tags":["projects"],"summary":"Complete","operationId":"ProjectSprintController_complete","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"},"carryOver":{"type":"string"},"targetSprintId":{"type":"string","format":"uuid"},"newSprintName":{"type":"string","description":"max length 120"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/sprints/{sprintId}/report":{"get":{"tags":["projects"],"summary":"Report","operationId":"ProjectSprintController_report","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/sprints/{sprintId}/start":{"post":{"tags":["projects"],"summary":"Start","operationId":"ProjectSprintController_start","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"max length 120"},"goal":{"type":"string","description":"max length 2000"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"version":{"type":"integer","description":"required"}},"required":["version","startDate","endDate"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/status-updates":{"post":{"tags":["projects"],"summary":"Post status","operationId":"ProjectFeedController_postStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 20000"},"statusColor":{"type":"string"}},"required":["body"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/status-updates/{updateId}":{"delete":{"tags":["projects"],"summary":"Delete status","operationId":"ProjectFeedController_deleteStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"updateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/summary":{"get":{"tags":["projects"],"summary":"Summary","operationId":"ProjectJiraController_summary","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/task-lists":{"get":{"tags":["projects"],"summary":"Task lists","operationId":"ProjectController_taskLists","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create task list","operationId":"ProjectController_createTaskList","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"version":{"type":"integer"},"milestoneId":{"type":"string","format":"uuid"},"clearMilestone":{"type":"boolean"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/task-lists/reorder":{"put":{"tags":["projects"],"summary":"Reorder task lists","operationId":"ProjectController_reorderTaskLists","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskListIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"required, not empty, max length 200"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/task-lists/{taskListId}":{"delete":{"tags":["projects"],"summary":"Delete task list","operationId":"ProjectController_deleteTaskList","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskListId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"name":"moveToTaskListId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update task list","operationId":"ProjectController_updateTaskList","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskListId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 120"},"version":{"type":"integer"},"milestoneId":{"type":"string","format":"uuid"},"clearMilestone":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks":{"get":{"tags":["projects"],"summary":"Tasks","operationId":"ProjectController_tasks","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"stageId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"assigneeId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"position"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"asc"}},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"50"}},{"name":"taskListId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"parentTaskId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"includeSubtasks","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"name":"resolution","in":"query","required":false,"schema":{"type":"string"}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create task","operationId":"ProjectController_createTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"description":{"type":"string","description":"max length 20000"},"priority":{"type":"string"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"stageId":{"type":"string","format":"uuid"},"assigneeIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"},"taskListId":{"type":"string","format":"uuid"},"parentTaskId":{"type":"string","format":"uuid"},"estimatedMinutes":{"type":"integer","description":">= 0, <= 1000000"},"billingType":{"type":"string"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 30"},"itemType":{"type":"string"},"epicId":{"type":"string","format":"uuid"},"clearEpic":{"type":"boolean"},"storyPoints":{"type":"number","description":">= 0, <= 999"},"clearStoryPoints":{"type":"boolean"},"sprintId":{"type":"string","format":"uuid"},"clearSprint":{"type":"boolean"},"resolution":{"type":"string"},"teamId":{"type":"string","format":"uuid"},"clearTeam":{"type":"boolean"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/export":{"get":{"tags":["projects"],"summary":"Export","operationId":"ProjectTaskExtrasController_export","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"stageId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"assigneeId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueState","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"taskListId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"includeSubtasks","in":"query","required":false,"schema":{"type":"boolean","default":"true"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/import":{"post":{"tags":["projects"],"summary":"Import csv","operationId":"ProjectTaskExtrasController_importCsv","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","description":"required, not blank, max length 4000000"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"dryRun":{"type":"boolean"}},"required":["csv"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}":{"delete":{"tags":["projects"],"summary":"Delete task","operationId":"ProjectController_deleteTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Get task","operationId":"ProjectController_getTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update task","operationId":"ProjectController_updateTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"description":{"type":"string","description":"max length 20000"},"priority":{"type":"string"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"stageId":{"type":"string","format":"uuid"},"assigneeIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"},"taskListId":{"type":"string","format":"uuid"},"parentTaskId":{"type":"string","format":"uuid"},"estimatedMinutes":{"type":"integer","description":">= 0, <= 1000000"},"billingType":{"type":"string"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 30"},"itemType":{"type":"string"},"epicId":{"type":"string","format":"uuid"},"clearEpic":{"type":"boolean"},"storyPoints":{"type":"number","description":">= 0, <= 999"},"clearStoryPoints":{"type":"boolean"},"sprintId":{"type":"string","format":"uuid"},"clearSprint":{"type":"boolean"},"resolution":{"type":"string"},"teamId":{"type":"string","format":"uuid"},"clearTeam":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/assign-me":{"post":{"tags":["projects"],"summary":"Assign me","operationId":"ProjectJiraController_assignMe","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/attachments":{"get":{"tags":["projects"],"summary":"List","operationId":"ProjectAttachmentController_list","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Upload","operationId":"ProjectAttachmentController_upload","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/attachments/{attachmentId}":{"delete":{"tags":["projects"],"summary":"Delete","operationId":"ProjectAttachmentController_delete","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/attachments/{attachmentId}/download":{"get":{"tags":["projects"],"summary":"Download","operationId":"ProjectAttachmentController_download","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/checklist":{"get":{"tags":["projects"],"summary":"Checklist","operationId":"ProjectController_checklist","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create checklist item","operationId":"ProjectController_createChecklistItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 500"},"completed":{"type":"boolean"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/checklist/{itemId}":{"delete":{"tags":["projects"],"summary":"Delete checklist item","operationId":"ProjectController_deleteChecklistItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update checklist item","operationId":"ProjectController_updateChecklistItem","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 500"},"completed":{"type":"boolean"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/clone":{"post":{"tags":["projects"],"summary":"Clone task","operationId":"ProjectJiraController_cloneTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"includeSubtasks":{"type":"boolean"},"includeChecklist":{"type":"boolean"},"includeLinks":{"type":"boolean"},"title":{"type":"string","description":"max length 240"}}}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/comments":{"get":{"tags":["projects"],"summary":"Comments","operationId":"ProjectController_comments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean","default":"false"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Create comment","operationId":"ProjectController_createComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 10000"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"}},"required":["body"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/comments/{commentId}":{"delete":{"tags":["projects"],"summary":"Delete comment","operationId":"ProjectController_deleteComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update comment","operationId":"ProjectController_updateComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"required, not blank, max length 10000"},"mentionMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/comments/{commentId}/restore":{"post":{"tags":["projects"],"summary":"Restore comment","operationId":"ProjectController_restoreComment","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/completion":{"patch":{"tags":["projects"],"summary":"Completion","operationId":"ProjectTaskExtrasController_completion","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"percent":{"type":"integer","description":">= 0, <= 100"},"version":{"type":"integer","description":"required"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/dependencies":{"get":{"tags":["projects"],"summary":"Dependencies","operationId":"ProjectController_dependencies","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Add dependency","operationId":"ProjectController_addDependency","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"predecessorTaskId":{"type":"string","format":"uuid"},"successorTaskId":{"type":"string","format":"uuid"},"type":{"type":"string"},"lagDays":{"type":"integer","description":">= -365, <= 365"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/dependencies/{dependencyId}":{"delete":{"tags":["projects"],"summary":"Delete dependency","operationId":"ProjectController_deleteDependency","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"dependencyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/link":{"get":{"tags":["projects"],"summary":"Permalink","operationId":"ProjectJiraController_permalink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/links":{"get":{"tags":["projects"],"summary":"Links","operationId":"ProjectJiraController_links","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Link","operationId":"ProjectJiraController_link","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"linkType":{"type":"string","description":"required, not blank"},"targetTaskId":{"type":"string","format":"uuid"},"targetIssueId":{"type":"string","format":"uuid"}},"required":["linkType"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/links/{linkId}":{"delete":{"tags":["projects"],"summary":"Unlink","operationId":"ProjectJiraController_unlink","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/macros/{macroId}/run":{"post":{"tags":["projects"],"summary":"Run macro","operationId":"ProjectAutomationController_runMacro","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"macroId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/move":{"patch":{"tags":["projects"],"summary":"Move task","operationId":"ProjectController_moveTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stageId":{"type":"string","format":"uuid"},"position":{"type":"integer","description":"required"},"version":{"type":"integer","description":"required"},"resolution":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]},"post":{"tags":["projects"],"summary":"Move to project","operationId":"ProjectJiraController_moveToProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetProjectId":{"type":"string","format":"uuid"},"stageId":{"type":"string","format":"uuid"},"taskListId":{"type":"string","format":"uuid"},"version":{"type":"integer","description":"required"}},"required":["version","targetProjectId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/recurrence":{"delete":{"tags":["projects"],"summary":"Delete recurrence","operationId":"ProjectTaskAutomationController_deleteRecurrence","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"get":{"tags":["projects"],"summary":"Recurrence","operationId":"ProjectTaskAutomationController_recurrence","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Set recurrence","operationId":"ProjectTaskAutomationController_setRecurrence","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"frequency":{"type":"string","description":"required, not blank"},"intervalN":{"type":"integer","description":">= 1, <= 366"},"byWeekdays":{"type":"array","items":{"type":"string"}},"monthDay":{"type":"integer","description":">= 1, <= 31"},"mode":{"type":"string"},"ends":{"type":"string"},"endCount":{"type":"integer","description":">= 1, <= 1000"},"endDate":{"type":"string","format":"date"},"copySubtasks":{"type":"boolean"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/reminders":{"get":{"tags":["projects"],"summary":"Reminders","operationId":"ProjectTaskAutomationController_reminders","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Add reminder","operationId":"ProjectTaskAutomationController_addReminder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remindType":{"type":"string","description":"required, not blank"},"offsetMinutes":{"type":"integer","description":">= 0, <= 86400"},"remindAt":{"type":"string","format":"date-time"},"memberId":{"type":"string","format":"uuid"},"allAssignees":{"type":"boolean"}},"required":["remindType"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/reminders/{reminderId}":{"delete":{"tags":["projects"],"summary":"Delete reminder","operationId":"ProjectTaskAutomationController_deleteReminder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reminderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update reminder","operationId":"ProjectTaskAutomationController_updateReminder","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reminderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remindType":{"type":"string","description":"required, not blank"},"offsetMinutes":{"type":"integer","description":">= 0, <= 86400"},"remindAt":{"type":"string","format":"date-time"},"memberId":{"type":"string","format":"uuid"},"allAssignees":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/restore":{"post":{"tags":["projects"],"summary":"Restore task","operationId":"ProjectController_restoreTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"}},"required":["version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/schedule":{"patch":{"tags":["projects"],"summary":"Schedule task","operationId":"ProjectController_scheduleTask","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"version":{"type":"integer","description":"required"},"cascade":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/status-timeline":{"get":{"tags":["projects"],"summary":"Status timeline","operationId":"ProjectTaskExtrasController_statusTimeline","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/subtasks":{"get":{"tags":["projects"],"summary":"Subtasks","operationId":"ProjectController_subtasks","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/transition":{"post":{"tags":["projects"],"summary":"Transition","operationId":"ProjectAutomationController_transition","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stageId":{"type":"string","format":"uuid"},"position":{"type":"integer"},"version":{"type":"integer","description":"required"},"comment":{"type":"string","description":"max length 20000"},"startDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"assigneeIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 50"},"estimatedMinutes":{"type":"integer","description":">= 0, <= 1000000"},"description":{"type":"string","description":"max length 20000"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 30"},"customFields":{"type":"object","additionalProperties":{}}},"required":["stageId","version"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/transitions":{"get":{"tags":["projects"],"summary":"Task transitions","operationId":"ProjectAutomationController_taskTransitions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/watchers":{"get":{"tags":["projects"],"summary":"Watchers","operationId":"ProjectController_watchers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]}},"/api/v1/projects/{projectId}/tasks/{taskId}/watchers/me":{"put":{"tags":["projects"],"summary":"Update watching","operationId":"ProjectController_updateWatching","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"watching":{"type":"boolean","description":"required"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/terminology":{"put":{"tags":["projects"],"summary":"Terminology","operationId":"ProjectSetupController_terminology","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"},"terminology":{"type":"object","additionalProperties":{"type":"string"},"description":"max length 20"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/time":{"get":{"tags":["projects"],"summary":"List time","operationId":"ProjectBillingController_listTime","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"post":{"tags":["projects"],"summary":"Log time","operationId":"ProjectBillingController_logTime","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"entryDate":{"type":"string","format":"date"},"hours":{"type":"number"},"billable":{"type":"boolean"},"rate":{"type":"number"},"description":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/time/{entryId}":{"delete":{"tags":["projects"],"summary":"Delete time","operationId":"ProjectBillingController_deleteTime","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"entryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.DELETE"]}]},"put":{"tags":["projects"],"summary":"Update time","operationId":"ProjectBillingController_updateTime","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"entryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"entryDate":{"type":"string","format":"date"},"hours":{"type":"number"},"billable":{"type":"boolean"},"rate":{"type":"number"},"description":{"type":"string"},"version":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/transitions":{"get":{"tags":["projects"],"summary":"Blueprint","operationId":"ProjectAutomationController_blueprint","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update blueprint","operationId":"ProjectAutomationController_updateBlueprint","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fromStageId":{"type":"string","format":"uuid"},"toStageId":{"type":"string","format":"uuid"},"allowedRole":{"type":"string"},"allowedMemberIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"max length 100"},"requiredFields":{"type":"array","items":{"type":"string"},"description":"max length 30"},"enabled":{"type":"boolean"}}},"description":"required, max length 400"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/workflow":{"get":{"tags":["projects"],"summary":"Workflow","operationId":"ProjectController_workflow","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.READ"]}]},"put":{"tags":["projects"],"summary":"Update workflow","operationId":"ProjectController_updateWorkflow","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","description":"required"},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","description":"required, not blank, max length 80"},"color":{"type":"string","description":"max length 32"},"semanticType":{"type":"string","description":"required, not blank"},"visible":{"type":"boolean"},"displayOrder":{"type":"integer"},"version":{"type":"integer"}}},"description":"required, not empty, max length 20"},"replacements":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.UPDATE"]}]}},"/api/v1/projects/{projectId}/workflow/preset":{"post":{"tags":["projects"],"summary":"Apply preset","operationId":"ProjectSprintController_applyPreset","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"type":"string","description":"required, not blank"},"version":{"type":"integer","description":"required"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"seedBlueprint":{"type":"boolean"},"createMilestones":{"type":"boolean"}},"required":["version","preset"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/projects/{projectId}/workflow/preset/preview":{"post":{"tags":["projects"],"summary":"Preview preset","operationId":"ProjectSprintController_previewPreset","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.projects.CREATE"]}]}},"/api/v1/purchase-debit-notes":{"get":{"tags":["purchase-debit-notes"],"summary":"List debit notes","operationId":"PurchaseDebitNoteController_listDebitNotes","parameters":[{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"billId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.READ"]}]},"post":{"tags":["purchase-debit-notes"],"summary":"Create debit note","operationId":"PurchaseDebitNoteController_createDebitNote","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"billId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"debitNoteDate":{"type":"string","format":"date"},"amount":{"type":"number","description":"required, >= 0.01"},"taxableAmount":{"type":"number"},"cgst":{"type":"number"},"sgst":{"type":"number"},"igst":{"type":"number"},"reason":{"type":"string","description":"required, not blank, max length 200"},"notes":{"type":"string","description":"max length 1000"}},"required":["vendorId","reason","debitNoteDate","amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.CREATE"]}]}},"/api/v1/purchase-debit-notes/applications":{"get":{"tags":["purchase-debit-notes"],"summary":"Applications for bill","operationId":"PurchaseDebitNoteController_applicationsForBill","parameters":[{"name":"billId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.READ"]}]}},"/api/v1/purchase-debit-notes/applications/{applicationId}":{"delete":{"tags":["purchase-debit-notes"],"summary":"Remove application","operationId":"PurchaseDebitNoteController_removeApplication","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.DELETE"]}]}},"/api/v1/purchase-debit-notes/refunds/{refundId}/reverse":{"post":{"tags":["purchase-debit-notes"],"summary":"Reverse refund","operationId":"PurchaseDebitNoteController_reverseRefund","parameters":[{"name":"refundId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reason":{"type":"string","description":"required, not blank, max length 500"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.CREATE"]}]}},"/api/v1/purchase-debit-notes/{id}":{"delete":{"tags":["purchase-debit-notes"],"summary":"Delete debit note","operationId":"PurchaseDebitNoteController_deleteDebitNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.DELETE"]}]},"get":{"tags":["purchase-debit-notes"],"summary":"Get debit note","operationId":"PurchaseDebitNoteController_getDebitNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.READ"]}]},"put":{"tags":["purchase-debit-notes"],"summary":"Update debit note","operationId":"PurchaseDebitNoteController_updateDebitNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"billId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"debitNoteDate":{"type":"string","format":"date"},"amount":{"type":"number","description":"required, >= 0.01"},"taxableAmount":{"type":"number"},"cgst":{"type":"number"},"sgst":{"type":"number"},"igst":{"type":"number"},"reason":{"type":"string","description":"required, not blank, max length 200"},"notes":{"type":"string","description":"max length 1000"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.UPDATE"]}]}},"/api/v1/purchase-debit-notes/{id}/applications":{"post":{"tags":["purchase-debit-notes"],"summary":"Apply to bills","operationId":"PurchaseDebitNoteController_applyToBills","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"billId":{"type":"string","format":"uuid"},"amount":{"type":"number","description":"required, >= 0.01"},"appliedDate":{"type":"string","format":"date"}}},"required":["billId","amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.CREATE"]}]}},"/api/v1/purchase-debit-notes/{id}/cancel":{"patch":{"tags":["purchase-debit-notes"],"summary":"Cancel debit note","operationId":"PurchaseDebitNoteController_cancelDebitNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.UPDATE"]}]}},"/api/v1/purchase-debit-notes/{id}/refunds":{"post":{"tags":["purchase-debit-notes"],"summary":"Record refund","operationId":"PurchaseDebitNoteController_recordRefund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"required, >= 0.01"},"refundDate":{"type":"string","format":"date"},"method":{"type":"string","description":"max length 50"},"reference":{"type":"string","description":"max length 200"}},"required":["amount"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-debit-notes.CREATE"]}]}},"/api/v1/purchase-orders":{"get":{"tags":["purchase-orders"],"summary":"List purchase orders","operationId":"PurchaseOrderController_listPurchaseOrders","parameters":[{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"billing","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-orders.READ"]}]},"post":{"tags":["purchase-orders"],"summary":"Create purchase order","operationId":"PurchaseOrderController_createPurchaseOrder","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"orderDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"internalNotes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string"},"inventoryItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required, >= 0.01"},"unit":{"type":"string"},"rate":{"type":"number","description":"required, >= 0.01"},"taxRate":{"type":"number","description":">= 0"},"discountPercent":{"type":"number","description":">= 0, <= 100"}}},"description":"required, not empty"}},"required":["orderDate","items","vendorId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-orders.CREATE"]}]}},"/api/v1/purchase-orders/{id}":{"delete":{"tags":["purchase-orders"],"summary":"Delete purchase order","operationId":"PurchaseOrderController_deletePurchaseOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-orders.DELETE"]}]},"get":{"tags":["purchase-orders"],"summary":"Get purchase order","operationId":"PurchaseOrderController_getPurchaseOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-orders.READ"]}]},"put":{"tags":["purchase-orders"],"summary":"Update purchase order","operationId":"PurchaseOrderController_updatePurchaseOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"orderDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"notes":{"type":"string"},"internalNotes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"itemName":{"type":"string","description":"required, not blank, max length 200"},"description":{"type":"string"},"inventoryItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required, >= 0.01"},"unit":{"type":"string"},"rate":{"type":"number","description":"required, >= 0.01"},"taxRate":{"type":"number","description":">= 0"},"discountPercent":{"type":"number","description":">= 0, <= 100"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-orders.UPDATE"]}]}},"/api/v1/purchase-receipts":{"get":{"tags":["purchase-receipts"],"summary":"Queue","operationId":"PurchaseReceiptController_queue","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"vendorId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"purchaseOrderId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.READ"]}]},"post":{"tags":["purchase-receipts"],"summary":"Receive","operationId":"PurchaseReceiptController_receive","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"purchaseOrderId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"receivedDate":{"type":"string","format":"date"},"notes":{"type":"string","description":"max length 1000"},"items":{"type":"array","items":{"type":"object","properties":{"purchaseOrderItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required, > 0"},"overReceiptReason":{"type":"string","description":"max length 500"}}},"description":"required, not empty"}},"required":["warehouseId","purchaseOrderId","items"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.CREATE"]}]}},"/api/v1/purchase-receipts/history":{"get":{"tags":["purchase-receipts"],"summary":"History","operationId":"PurchaseReceiptController_history","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.READ"]}]}},"/api/v1/purchase-receipts/history/export":{"get":{"tags":["purchase-receipts"],"summary":"Export history","operationId":"PurchaseReceiptController_exportHistory","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"pdf"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.READ"]}]}},"/api/v1/purchase-receipts/warehouses":{"get":{"tags":["purchase-receipts"],"summary":"Warehouses","operationId":"PurchaseReceiptController_warehouses","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.READ"]}]}},"/api/v1/purchase-receipts/{receiptId}/cancel":{"post":{"tags":["purchase-receipts"],"summary":"Cancel","operationId":"PurchaseReceiptController_cancel","parameters":[{"name":"receiptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"required, length 3-1000"}},"required":["reason"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-receipts.CREATE"]}]}},"/api/v1/purchase-returns":{"get":{"tags":["purchase-returns"],"summary":"List","operationId":"PurchaseReturnController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-returns.READ"]}]},"post":{"tags":["purchase-returns"],"summary":"Create","operationId":"PurchaseReturnController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"billId":{"type":"string","format":"uuid"},"purchaseReceiptId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"returnDate":{"type":"string","format":"date"},"reason":{"type":"string"},"notes":{"type":"string"},"restock":{"type":"boolean"},"createDebitNote":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"itemName":{"type":"string"},"quantity":{"type":"number","description":"required, > 0"},"rate":{"type":"number"},"gstRate":{"type":"number"}}},"description":"required, not empty"}},"required":["items","billId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-returns.CREATE"]}]}},"/api/v1/purchase-returns/returnable":{"get":{"tags":["purchase-returns"],"summary":"Returnable","operationId":"PurchaseReturnController_returnable","parameters":[{"name":"billId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-returns.READ"]}]}},"/api/v1/purchase-returns/{id}":{"get":{"tags":["purchase-returns"],"summary":"Get","operationId":"PurchaseReturnController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-returns.READ"]}]}},"/api/v1/purchase-returns/{id}/cancel":{"post":{"tags":["purchase-returns"],"summary":"Cancel","operationId":"PurchaseReturnController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase-returns.CREATE"]}]}},"/api/v1/purchase/dashboard":{"get":{"tags":["purchase"],"summary":"Dashboard","operationId":"PurchaseDashboardController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.purchase.READ"]}]}},"/api/v1/quotes":{"get":{"tags":["quotes"],"summary":"List","operationId":"QuoteController_list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.READ"]}]},"post":{"tags":["quotes"],"summary":"Create","operationId":"QuoteController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"issueDate":{"type":"string","format":"date"},"validTill":{"type":"string","format":"date"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.CREATE"]}]}},"/api/v1/quotes/{id}":{"get":{"tags":["quotes"],"summary":"Get","operationId":"QuoteController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.READ"]}]},"put":{"tags":["quotes"],"summary":"Update","operationId":"QuoteController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"issueDate":{"type":"string","format":"date"},"validTill":{"type":"string","format":"date"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.UPDATE"]}]}},"/api/v1/quotes/{id}/cancel":{"post":{"tags":["quotes"],"summary":"Cancel","operationId":"QuoteController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.CREATE"]}]}},"/api/v1/quotes/{id}/convert":{"post":{"tags":["quotes"],"summary":"Convert","operationId":"QuoteController_convert","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.CREATE"]}]}},"/api/v1/quotes/{id}/decision":{"post":{"tags":["quotes"],"summary":"Decision","operationId":"QuoteController_decision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.CREATE"]}]}},"/api/v1/quotes/{id}/send":{"post":{"tags":["quotes"],"summary":"Send","operationId":"QuoteController_send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.quotes.CREATE"]}]}},"/api/v1/receivables/aging":{"get":{"tags":["receivables"],"summary":"Get receivables aging","operationId":"ReceivablesController_getReceivablesAging","parameters":[{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.receivables.READ"]}]}},"/api/v1/receivables/by-customer":{"get":{"tags":["receivables"],"summary":"Get receivables by customer","operationId":"ReceivablesController_getReceivablesByCustomer","parameters":[{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.receivables.READ"]}]}},"/api/v1/receivables/invoices":{"get":{"tags":["receivables"],"summary":"Get receivable invoices","operationId":"ReceivablesController_getReceivableInvoices","parameters":[{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"overdue","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.receivables.READ"]}]}},"/api/v1/receivables/summary":{"get":{"tags":["receivables"],"summary":"Get receivables summary","operationId":"ReceivablesController_getReceivablesSummary","parameters":[{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.receivables.READ"]}]}},"/api/v1/recurring":{"get":{"tags":["recurring"],"summary":"List","operationId":"RecurringController_list","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.READ"]}]},"post":{"tags":["recurring"],"summary":"Create","operationId":"RecurringController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"frequency":{"type":"string","description":"required, not blank"},"amount":{"type":"number"},"startDate":{"type":"string","format":"date"},"nextDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"dueDays":{"type":"integer"},"active":{"type":"boolean"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["frequency","lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.CREATE"]}]}},"/api/v1/recurring/from-invoice/{invoiceId}":{"post":{"tags":["recurring"],"summary":"From invoice","operationId":"RecurringController_fromInvoice","parameters":[{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"frequency":{"type":"string","description":"required, not blank"},"amount":{"type":"number"},"startDate":{"type":"string","format":"date"},"nextDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"dueDays":{"type":"integer"},"active":{"type":"boolean"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["frequency","lines"]}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.CREATE"]}]}},"/api/v1/recurring/{id}":{"delete":{"tags":["recurring"],"summary":"Delete","operationId":"RecurringController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.DELETE"]}]},"get":{"tags":["recurring"],"summary":"Get","operationId":"RecurringController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.READ"]}]},"put":{"tags":["recurring"],"summary":"Update","operationId":"RecurringController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"frequency":{"type":"string","description":"required, not blank"},"amount":{"type":"number"},"startDate":{"type":"string","format":"date"},"nextDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"neverExpires":{"type":"boolean"},"dueDays":{"type":"integer"},"active":{"type":"boolean"},"notes":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.UPDATE"]}]}},"/api/v1/recurring/{id}/generate":{"post":{"tags":["recurring"],"summary":"Generate","operationId":"RecurringController_generate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.CREATE"]}]}},"/api/v1/recurring/{id}/toggle":{"post":{"tags":["recurring"],"summary":"Toggle","operationId":"RecurringController_toggle","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.recurring.CREATE"]}]}},"/api/v1/reorder/preferred-vendor":{"post":{"tags":["reorder"],"summary":"Set preferred vendor","operationId":"ReorderController_setPreferredVendor","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"}},"required":["itemId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reorder.CREATE"]}]}},"/api/v1/reorder/purchase-orders":{"post":{"tags":["reorder"],"summary":"Create purchase orders","operationId":"ReorderController_createPurchaseOrders","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}},"description":"required, not empty"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reorder.CREATE"]}]}},"/api/v1/reorder/suggestions":{"get":{"tags":["reorder"],"summary":"Suggestions","operationId":"ReorderController_suggestions","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reorder.READ"]}]}},"/api/v1/reports/cash-bank":{"get":{"tags":["reports"],"summary":"Get statement","operationId":"CashBankStatementController_getStatement","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/cash-bank/export":{"get":{"tags":["reports"],"summary":"Export","operationId":"CashBankStatementController_export","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/documents/excel":{"post":{"tags":["reports"],"summary":"Excel","operationId":"ReportDocumentController_excel","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"periodLabel":{"type":"string"},"columns":{"type":"array","items":{"type":"string"},"description":"required, not empty"},"rows":{"type":"array","items":{"type":"array","items":{}}},"summary":{"type":"array","items":{"type":"array","items":{}}}},"required":["columns"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.CREATE"]}]}},"/api/v1/reports/documents/pdf":{"post":{"tags":["reports"],"summary":"Pdf","operationId":"ReportDocumentController_pdf","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"periodLabel":{"type":"string"},"columns":{"type":"array","items":{"type":"string"},"description":"required, not empty"},"rows":{"type":"array","items":{"type":"array","items":{}}},"summary":{"type":"array","items":{"type":"array","items":{}}}},"required":["columns"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.CREATE"]}]}},"/api/v1/reports/export":{"get":{"tags":["reports"],"summary":"Export","operationId":"ReportExportController_export","parameters":[{"name":"reportId","in":"query","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1":{"get":{"tags":["reports"],"summary":"Get gstr1 report","operationId":"ReportController_getGstr1Report","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1-summary":{"get":{"tags":["reports"],"summary":"Get gstr1 summary","operationId":"ReportController_getGstr1Summary","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1-summary/export":{"get":{"tags":["reports"],"summary":"Export gstr1 summary","operationId":"ReportController_exportGstr1Summary","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1/csv":{"get":{"tags":["reports"],"summary":"Export csv","operationId":"ReportController_exportCsv","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1/excel":{"get":{"tags":["reports"],"summary":"Export excel","operationId":"ReportController_exportExcel","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1/json":{"get":{"tags":["reports"],"summary":"Export json","operationId":"ReportController_exportJson","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr1/pdf":{"get":{"tags":["reports"],"summary":"Export pdf","operationId":"ReportController_exportPdf","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr3b":{"get":{"tags":["reports"],"summary":"Get gstr3b summary","operationId":"ReportController_getGstr3bSummary","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr3b-summary":{"get":{"tags":["reports"],"summary":"Get gstr3b report","operationId":"ReportController_getGstr3bReport","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr3b-summary/export":{"get":{"tags":["reports"],"summary":"Export gstr3b report","operationId":"ReportController_exportGstr3bReport","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr3b/csv":{"get":{"tags":["reports"],"summary":"Export gstr3b csv","operationId":"ReportController_exportGstr3bCsv","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/gstr3b/pdf":{"get":{"tags":["reports"],"summary":"Export gstr3b pdf","operationId":"ReportController_exportGstr3bPdf","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/invoice-ageing":{"get":{"tags":["reports"],"summary":"Get invoice ageing","operationId":"InvoiceAgeingController_getInvoiceAgeing","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/invoice-ageing/export":{"get":{"tags":["reports"],"summary":"Export invoice ageing","operationId":"InvoiceAgeingController_exportInvoiceAgeing","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/low-stock":{"get":{"tags":["reports"],"summary":"Get low stock report","operationId":"LowStockReportController_getLowStockReport","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/low-stock/export":{"get":{"tags":["reports"],"summary":"Export low stock report","operationId":"LowStockReportController_exportLowStockReport","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/payables-report":{"get":{"tags":["reports"],"summary":"Get payables report","operationId":"ReportController_getPayablesReport","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/payables-report/export":{"get":{"tags":["reports"],"summary":"Export payables report","operationId":"ReportController_exportPayablesReport","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/run/{reportId}":{"get":{"tags":["reports"],"summary":"Run","operationId":"ExpandedReportController_run","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/sales-summary":{"get":{"tags":["reports"],"summary":"Get sales summary","operationId":"SalesSummaryController_getSalesSummary","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/sales-summary/export":{"get":{"tags":["reports"],"summary":"Export sales summary","operationId":"SalesSummaryController_exportSalesSummary","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/stock-ledger":{"get":{"tags":["reports"],"summary":"Get stock ledger","operationId":"StockLedgerController_getStockLedger","parameters":[{"name":"itemId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"25"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/stock-ledger/export":{"get":{"tags":["reports"],"summary":"Export stock ledger","operationId":"StockLedgerController_exportStockLedger","parameters":[{"name":"itemId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/stock-report":{"get":{"tags":["reports"],"summary":"Get stock report","operationId":"StockReportController_getStockReport","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/stock-report/export":{"get":{"tags":["reports"],"summary":"Export stock report","operationId":"StockReportController_exportStockReport","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/top-customers":{"get":{"tags":["reports"],"summary":"Get top customers","operationId":"TopCustomersController_getTopCustomers","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/top-customers/export":{"get":{"tags":["reports"],"summary":"Export top customers","operationId":"TopCustomersController_exportTopCustomers","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/top-items":{"get":{"tags":["reports"],"summary":"Get top items","operationId":"TopItemsController_getTopItems","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":"1"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","default":"10"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/top-items/export":{"get":{"tags":["reports"],"summary":"Export top items","operationId":"TopItemsController_exportTopItems","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"MONTH"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]}},"/api/v1/reports/views":{"get":{"tags":["reports"],"summary":"Get views","operationId":"SavedReportViewController_getViews","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.READ"]}]},"post":{"tags":["reports"],"summary":"Save view","operationId":"SavedReportViewController_saveView","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportType":{"type":"string","description":"required, not blank"},"viewName":{"type":"string","description":"required, not blank"},"period":{"type":"string"},"filters":{"type":"object","additionalProperties":{}}},"required":["viewName","reportType"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.reports.CREATE"]}]}},"/api/v1/sales-orders":{"get":{"tags":["sales-orders"],"summary":"List","operationId":"SalesOrderController_list","parameters":[{"name":"orderType","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.READ"]}]},"post":{"tags":["sales-orders"],"summary":"Create","operationId":"SalesOrderController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"orderType":{"type":"string"},"orderDate":{"type":"string","format":"date"},"expectedShipDate":{"type":"string","format":"date"},"warehouseId":{"type":"string","format":"uuid"},"notes":{"type":"string"},"saveAsDraft":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}},"required":["lines"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.CREATE"]}]}},"/api/v1/sales-orders/{id}":{"get":{"tags":["sales-orders"],"summary":"Get","operationId":"SalesOrderController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.READ"]}]},"put":{"tags":["sales-orders"],"summary":"Update","operationId":"SalesOrderController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"customerName":{"type":"string"},"orderType":{"type":"string"},"orderDate":{"type":"string","format":"date"},"expectedShipDate":{"type":"string","format":"date"},"warehouseId":{"type":"string","format":"uuid"},"notes":{"type":"string"},"saveAsDraft":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"description":{"type":"string","description":"required, not blank"},"hsn":{"type":"string"},"qty":{"type":"number","description":">= 0"},"unit":{"type":"string"},"rate":{"type":"number","description":">= 0"},"gstRate":{"type":"number","description":">= 0"},"discount":{"type":"number","description":">= 0"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.UPDATE"]}]}},"/api/v1/sales-orders/{id}/cancel":{"post":{"tags":["sales-orders"],"summary":"Cancel","operationId":"SalesOrderController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.CREATE"]}]}},"/api/v1/sales-orders/{id}/confirm":{"post":{"tags":["sales-orders"],"summary":"Confirm","operationId":"SalesOrderController_confirm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.CREATE"]}]}},"/api/v1/sales-orders/{id}/convert":{"post":{"tags":["sales-orders"],"summary":"Convert","operationId":"SalesOrderController_convert","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-orders.CREATE"]}]}},"/api/v1/sales-returns":{"get":{"tags":["sales-returns"],"summary":"List","operationId":"SalesReturnController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-returns.READ"]}]},"post":{"tags":["sales-returns"],"summary":"Create","operationId":"SalesReturnController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string","format":"uuid"},"shipmentId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"returnDate":{"type":"string","format":"date"},"reason":{"type":"string"},"notes":{"type":"string"},"restock":{"type":"boolean"},"createCreditNote":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"itemName":{"type":"string"},"quantity":{"type":"number","description":"required, > 0"},"rate":{"type":"number"},"gstRate":{"type":"number"}}},"description":"required, not empty"}},"required":["items","invoiceId"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-returns.CREATE"]}]}},"/api/v1/sales-returns/{id}":{"get":{"tags":["sales-returns"],"summary":"Get","operationId":"SalesReturnController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-returns.READ"]}]}},"/api/v1/sales-returns/{id}/cancel":{"post":{"tags":["sales-returns"],"summary":"Cancel","operationId":"SalesReturnController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales-returns.CREATE"]}]}},"/api/v1/sales/dashboard":{"get":{"tags":["sales"],"summary":"Dashboard","operationId":"SalesDashboardController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales.READ"]}]}},"/api/v1/sales/settings/numbering":{"get":{"tags":["sales"],"summary":"List","operationId":"SalesNumberingController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales.READ"]}]}},"/api/v1/sales/settings/numbering/{docType}":{"put":{"tags":["sales"],"summary":"Update","operationId":"SalesNumberingController_update","parameters":[{"name":"docType","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prefix":{"type":"string"},"includeFinancialYear":{"type":"boolean"},"padding":{"type":"integer"},"nextNumber":{"type":"integer"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.sales.UPDATE"]}]}},"/api/v1/scm/couriers":{"get":{"tags":["scm"],"summary":"List","operationId":"CourierController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.READ"]}]},"post":{"tags":["scm"],"summary":"Create","operationId":"CourierController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"baseUrl":{"type":"string"},"apiKey":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"config":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.CREATE"]}]}},"/api/v1/scm/couriers/test":{"post":{"tags":["scm"],"summary":"Test","operationId":"CourierController_test","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"baseUrl":{"type":"string"},"apiKey":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"config":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.CREATE"]}]}},"/api/v1/scm/couriers/{id}":{"delete":{"tags":["scm"],"summary":"Delete","operationId":"CourierController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.DELETE"]}]},"put":{"tags":["scm"],"summary":"Update","operationId":"CourierController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank"},"baseUrl":{"type":"string"},"apiKey":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"config":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.UPDATE"]}]}},"/api/v1/scm/dashboard":{"get":{"tags":["scm"],"summary":"Dashboard","operationId":"ScmDashboardController_dashboard","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.scm.READ"]}]}},"/api/v1/shipments":{"get":{"tags":["shipments"],"summary":"List","operationId":"ShipmentController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.READ"]}]}},"/api/v1/shipments/delivery-note/preview-pdf":{"post":{"tags":["shipments"],"summary":"Delivery note preview","operationId":"ShipmentController_deliveryNotePreview","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gid":{"type":"string","format":"uuid"},"name":{"type":"string","description":"required"},"legalName":{"type":"string"},"gstin":{"type":"string"},"pan":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"state":{"type":"string"},"pin":{"type":"string"},"bankAccountNo":{"type":"string"},"bankName":{"type":"string"},"bankIfsc":{"type":"string"},"bankAddress":{"type":"string"},"financialYearStart":{"type":"string"},"taxPreference":{"type":"string"},"logoUrl":{"type":"string"},"accentColor":{"type":"string"},"invoiceFooter":{"type":"string"},"invoiceTemplate":{"type":"string"},"deliveryNoteTemplate":{"type":"string"},"deliveryNoteFooter":{"type":"string"},"deliveryNoteAccent":{"type":"string"},"deliveryNoteLogoUrl":{"type":"string"},"deliveryProvider":{"type":"string"},"deliveryApiUrl":{"type":"string"},"deliveryApiKey":{"type":"string"},"deliveryApiEnabled":{"type":"boolean"},"deliveryApiConfig":{"type":"string"},"payslipTemplate":{"type":"string"},"payslipNote":{"type":"string"},"termsAndConditions":{"type":"string"},"invoiceLayoutConfig":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"},"booksLockedUntil":{"type":"string","format":"date"},"booksLockedByUserId":{"type":"integer"},"booksLockedAt":{"type":"string","format":"date-time"},"openingBalanceDate":{"type":"string","format":"date"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.CREATE"]}]}},"/api/v1/shipments/{id}":{"get":{"tags":["shipments"],"summary":"Get","operationId":"ShipmentController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.READ"]}]},"patch":{"tags":["shipments"],"summary":"Update","operationId":"ShipmentController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"type":"string"},"trackingNumber":{"type":"string"},"shipDate":{"type":"string","format":"date"},"notes":{"type":"string"},"status":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.UPDATE"]}]}},"/api/v1/shipments/{id}/cancel":{"post":{"tags":["shipments"],"summary":"Cancel","operationId":"ShipmentController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.CREATE"]}]}},"/api/v1/shipments/{id}/delivery-note":{"get":{"tags":["shipments"],"summary":"Delivery note","operationId":"ShipmentController_deliveryNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.READ"]}]}},"/api/v1/shipments/{id}/push-courier":{"post":{"tags":["shipments"],"summary":"Push courier","operationId":"ShipmentController_pushCourier","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.CREATE"]}]}},"/api/v1/shipments/{id}/sync-tracking":{"post":{"tags":["shipments"],"summary":"Sync tracking","operationId":"ShipmentController_syncTracking","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.shipments.CREATE"]}]}},"/api/v1/stock-transfers":{"get":{"tags":["stock-transfers"],"summary":"List","operationId":"StockTransferController_list","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.READ"]}]},"post":{"tags":["stock-transfers"],"summary":"Create","operationId":"StockTransferController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceWarehouseId":{"type":"string","format":"uuid"},"destWarehouseId":{"type":"string","format":"uuid"},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}},"description":"required, not empty"}},"required":["sourceWarehouseId","destWarehouseId","items","transferDate"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.CREATE"]}]}},"/api/v1/stock-transfers/{id}":{"delete":{"tags":["stock-transfers"],"summary":"Delete","operationId":"StockTransferController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.DELETE"]}]},"get":{"tags":["stock-transfers"],"summary":"Get","operationId":"StockTransferController_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.READ"]}]},"put":{"tags":["stock-transfers"],"summary":"Update","operationId":"StockTransferController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceWarehouseId":{"type":"string","format":"uuid"},"destWarehouseId":{"type":"string","format":"uuid"},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","description":"required"}}},"description":"required, not empty"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.UPDATE"]}]}},"/api/v1/stock-transfers/{id}/cancel":{"post":{"tags":["stock-transfers"],"summary":"Cancel","operationId":"StockTransferController_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.CREATE"]}]}},"/api/v1/stock-transfers/{id}/dispatch":{"post":{"tags":["stock-transfers"],"summary":"Dispatch","operationId":"StockTransferController_dispatch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.CREATE"]}]}},"/api/v1/stock-transfers/{id}/receive":{"post":{"tags":["stock-transfers"],"summary":"Receive","operationId":"StockTransferController_receive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock-transfers.CREATE"]}]}},"/api/v1/stock/availability":{"get":{"tags":["stock"],"summary":"Availability","operationId":"StockController_availability","parameters":[{"name":"itemId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.stock.READ"]}]}},"/api/v1/table-views":{"get":{"tags":["table-views"],"summary":"List","operationId":"TableViewPreferenceController_list","parameters":[{"name":"module","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.table-views.READ"]}]}},"/api/v1/table-views/{tableKey}":{"delete":{"tags":["table-views"],"summary":"Reset","operationId":"TableViewPreferenceController_reset","parameters":[{"name":"tableKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.table-views.DELETE"]}]},"put":{"tags":["table-views"],"summary":"Save","operationId":"TableViewPreferenceController_save","parameters":[{"name":"tableKey","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","description":"required, not blank"},"columns":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.table-views.UPDATE"]}]}},"/api/v1/todos":{"get":{"tags":["todos"],"summary":"List","operationId":"PersonalTodoController_list","parameters":[{"name":"includeCompleted","in":"query","required":false,"schema":{"type":"boolean","default":"true"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.todos.READ"]}]},"post":{"tags":["todos"],"summary":"Create","operationId":"PersonalTodoController_create","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"dueDate":{"type":"string","format":"date"}},"required":["title"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.todos.CREATE"]}]}},"/api/v1/todos/{id}":{"delete":{"tags":["todos"],"summary":"Delete","operationId":"PersonalTodoController_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.todos.DELETE"]}]},"put":{"tags":["todos"],"summary":"Update","operationId":"PersonalTodoController_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"required, not blank, max length 240"},"dueDate":{"type":"string","format":"date"},"completed":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.todos.UPDATE"]}]}},"/api/v1/todos/{id}/complete":{"patch":{"tags":["todos"],"summary":"Toggle complete","operationId":"PersonalTodoController_toggleComplete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.todos.UPDATE"]}]}},"/api/v1/user-preferences/navigation":{"delete":{"tags":["user-preferences"],"summary":"Reset","operationId":"NavigationPreferenceController_reset","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.user-preferences.DELETE"]}]},"get":{"tags":["user-preferences"],"summary":"Get","operationId":"NavigationPreferenceController_get","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.user-preferences.READ"]}]},"put":{"tags":["user-preferences"],"summary":"Save","operationId":"NavigationPreferenceController_save","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hiddenModules":{"type":"array","items":{"type":"string"},"description":"required"},"moduleTabs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"required"},"accessibility":{"type":"object","properties":{"showQuickActions":{"type":"boolean"},"showBottomNav":{"type":"boolean"},"reduceMotion":{"type":"boolean"},"unifiedSidebar":{"type":"boolean"},"unifiedSidebarTheme":{"type":"string"},"sidebarColor":{"type":"string"},"sidebarCustomColor":{"type":"string"}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.user-preferences.UPDATE"]}]}},"/api/v1/vendors":{"get":{"tags":["vendors"],"summary":"List vendors","operationId":"VendorController_listVendors","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.READ"]}]},"post":{"tags":["vendors"],"summary":"Create vendor","operationId":"VendorController_createVendor","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"contactPerson":{"type":"string","description":"max length 150"},"email":{"type":"string","description":"valid email"},"phone":{"type":"string"},"address":{"type":"string"},"city":{"type":"string","description":"max length 100"},"state":{"type":"string","description":"max length 100"},"pin":{"type":"string","description":"max length 10"},"gstin":{"type":"string","description":"max length 15"},"pan":{"type":"string","description":"max length 10"},"paymentTerms":{"type":"string","description":"max length 100"},"creditDays":{"type":"integer"},"notes":{"type":"string"}},"required":["name"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.CREATE"]}]}},"/api/v1/vendors/{id}":{"delete":{"tags":["vendors"],"summary":"Delete vendor","operationId":"VendorController_deleteVendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.DELETE"]}]},"get":{"tags":["vendors"],"summary":"Get vendor","operationId":"VendorController_getVendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.READ"]}]},"put":{"tags":["vendors"],"summary":"Update vendor","operationId":"VendorController_updateVendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"required, not blank, max length 200"},"contactPerson":{"type":"string","description":"max length 150"},"email":{"type":"string","description":"valid email"},"phone":{"type":"string"},"address":{"type":"string"},"city":{"type":"string","description":"max length 100"},"state":{"type":"string","description":"max length 100"},"pin":{"type":"string","description":"max length 10"},"gstin":{"type":"string","description":"max length 15"},"pan":{"type":"string","description":"max length 10"},"paymentTerms":{"type":"string","description":"max length 100"},"creditDays":{"type":"integer"},"notes":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.UPDATE"]}]}},"/api/v1/vendors/{id}/activate":{"patch":{"tags":["vendors"],"summary":"Activate vendor","operationId":"VendorController_activateVendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.UPDATE"]}]}},"/api/v1/vendors/{id}/block":{"patch":{"tags":["vendors"],"summary":"Block vendor","operationId":"VendorController_blockVendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, expired or out-of-scope access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The user's role or plan does not allow this, or the user is not a member of the requested organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded"}},"security":[{"oauth2":["Scalar360.vendors.UPDATE"]}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"code":{"type":"string"}}},"success":{"type":"boolean","example":false}}},"Envelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"description":"The result: a record, a list, or a page {content, totalElements, totalPages, number, size}"},"success":{"type":"boolean"}}}},"parameters":{"OrganizationId":{"name":"organization_id","in":"query","required":false,"description":"The organization to act in: its id from GET /api/v1/organizations. Optional - when omitted, the organization the access token was granted for is used. You must be an active member of the organization (403 otherwise; 400 if the id is not valid). The header X-Scalar360-Organization-Id is accepted instead. Your role, module permissions and plan in that organization apply.","schema":{"type":"string","format":"uuid"}}},"securitySchemes":{"oauth2":{"type":"oauth2","description":"Register a client in Scalar360 → Settings → Developer API. Access tokens last one hour; request access_type=offline for a refresh token.","flows":{"authorizationCode":{"refreshUrl":"https://api.scalar360.com/oauth/v2/token","authorizationUrl":"https://api.scalar360.com/oauth/v2/auth","tokenUrl":"https://api.scalar360.com/oauth/v2/token","scopes":{"Scalar360.fullaccess.ALL":"Full access to every module except settings (users, invitations, roles and organisation settings), which needs its own Scalar360.settings scope","Scalar360.accounting.ALL":"All operations on accounting","Scalar360.accounting.READ":"Read accounting (GET)","Scalar360.accounting.CREATE":"Create accounting (POST)","Scalar360.accounting.UPDATE":"Update accounting (PUT, PATCH)","Scalar360.accounting.DELETE":"Delete accounting (DELETE)","Scalar360.assets.ALL":"All operations on assets","Scalar360.assets.READ":"Read assets (GET)","Scalar360.assets.CREATE":"Create assets (POST)","Scalar360.assets.UPDATE":"Update assets (PUT, PATCH)","Scalar360.assets.DELETE":"Delete assets (DELETE)","Scalar360.audit-log.ALL":"All operations on audit-log","Scalar360.audit-log.READ":"Read audit-log (GET)","Scalar360.audit-log.CREATE":"Create audit-log (POST)","Scalar360.audit-log.UPDATE":"Update audit-log (PUT, PATCH)","Scalar360.audit-log.DELETE":"Delete audit-log (DELETE)","Scalar360.batches.ALL":"All operations on batches","Scalar360.batches.READ":"Read batches (GET)","Scalar360.batches.CREATE":"Create batches (POST)","Scalar360.batches.UPDATE":"Update batches (PUT, PATCH)","Scalar360.batches.DELETE":"Delete batches (DELETE)","Scalar360.bills.ALL":"All operations on bills","Scalar360.bills.READ":"Read bills (GET)","Scalar360.bills.CREATE":"Create bills (POST)","Scalar360.bills.UPDATE":"Update bills (PUT, PATCH)","Scalar360.bills.DELETE":"Delete bills (DELETE)","Scalar360.composite-items.ALL":"All operations on composite-items","Scalar360.composite-items.READ":"Read composite-items (GET)","Scalar360.composite-items.CREATE":"Create composite-items (POST)","Scalar360.composite-items.UPDATE":"Update composite-items (PUT, PATCH)","Scalar360.composite-items.DELETE":"Delete composite-items (DELETE)","Scalar360.contacts.ALL":"All operations on contacts","Scalar360.contacts.READ":"Read contacts (GET)","Scalar360.contacts.CREATE":"Create contacts (POST)","Scalar360.contacts.UPDATE":"Update contacts (PUT, PATCH)","Scalar360.contacts.DELETE":"Delete contacts (DELETE)","Scalar360.credit-notes.ALL":"All operations on credit-notes","Scalar360.credit-notes.READ":"Read credit-notes (GET)","Scalar360.credit-notes.CREATE":"Create credit-notes (POST)","Scalar360.credit-notes.UPDATE":"Update credit-notes (PUT, PATCH)","Scalar360.credit-notes.DELETE":"Delete credit-notes (DELETE)","Scalar360.crm.ALL":"All operations on crm","Scalar360.crm.READ":"Read crm (GET)","Scalar360.crm.CREATE":"Create crm (POST)","Scalar360.crm.UPDATE":"Update crm (PUT, PATCH)","Scalar360.crm.DELETE":"Delete crm (DELETE)","Scalar360.custom-fields.ALL":"All operations on custom-fields","Scalar360.custom-fields.READ":"Read custom-fields (GET)","Scalar360.custom-fields.CREATE":"Create custom-fields (POST)","Scalar360.custom-fields.UPDATE":"Update custom-fields (PUT, PATCH)","Scalar360.custom-fields.DELETE":"Delete custom-fields (DELETE)","Scalar360.customers.ALL":"All operations on customers","Scalar360.customers.READ":"Read customers (GET)","Scalar360.customers.CREATE":"Create customers (POST)","Scalar360.customers.UPDATE":"Update customers (PUT, PATCH)","Scalar360.customers.DELETE":"Delete customers (DELETE)","Scalar360.dashboard-data.ALL":"All operations on dashboard-data","Scalar360.dashboard-data.READ":"Read dashboard-data (GET)","Scalar360.dashboard-data.CREATE":"Create dashboard-data (POST)","Scalar360.dashboard-data.UPDATE":"Update dashboard-data (PUT, PATCH)","Scalar360.dashboard-data.DELETE":"Delete dashboard-data (DELETE)","Scalar360.daybook.ALL":"All operations on daybook","Scalar360.daybook.READ":"Read daybook (GET)","Scalar360.daybook.CREATE":"Create daybook (POST)","Scalar360.daybook.UPDATE":"Update daybook (PUT, PATCH)","Scalar360.daybook.DELETE":"Delete daybook (DELETE)","Scalar360.document-email-settings.ALL":"All operations on document-email-settings","Scalar360.document-email-settings.READ":"Read document-email-settings (GET)","Scalar360.document-email-settings.CREATE":"Create document-email-settings (POST)","Scalar360.document-email-settings.UPDATE":"Update document-email-settings (PUT, PATCH)","Scalar360.document-email-settings.DELETE":"Delete document-email-settings (DELETE)","Scalar360.document-emails.ALL":"All operations on document-emails","Scalar360.document-emails.READ":"Read document-emails (GET)","Scalar360.document-emails.CREATE":"Create document-emails (POST)","Scalar360.document-emails.UPDATE":"Update document-emails (PUT, PATCH)","Scalar360.document-emails.DELETE":"Delete document-emails (DELETE)","Scalar360.documents.ALL":"All operations on documents","Scalar360.documents.READ":"Read documents (GET)","Scalar360.documents.CREATE":"Create documents (POST)","Scalar360.documents.UPDATE":"Update documents (PUT, PATCH)","Scalar360.documents.DELETE":"Delete documents (DELETE)","Scalar360.drive.ALL":"All operations on drive","Scalar360.drive.READ":"Read drive (GET)","Scalar360.drive.CREATE":"Create drive (POST)","Scalar360.drive.UPDATE":"Update drive (PUT, PATCH)","Scalar360.drive.DELETE":"Delete drive (DELETE)","Scalar360.email-templates.ALL":"All operations on email-templates","Scalar360.email-templates.READ":"Read email-templates (GET)","Scalar360.email-templates.CREATE":"Create email-templates (POST)","Scalar360.email-templates.UPDATE":"Update email-templates (PUT, PATCH)","Scalar360.email-templates.DELETE":"Delete email-templates (DELETE)","Scalar360.expense-categories.ALL":"All operations on expense-categories","Scalar360.expense-categories.READ":"Read expense-categories (GET)","Scalar360.expense-categories.CREATE":"Create expense-categories (POST)","Scalar360.expense-categories.UPDATE":"Update expense-categories (PUT, PATCH)","Scalar360.expense-categories.DELETE":"Delete expense-categories (DELETE)","Scalar360.expenses.ALL":"All operations on expenses","Scalar360.expenses.READ":"Read expenses (GET)","Scalar360.expenses.CREATE":"Create expenses (POST)","Scalar360.expenses.UPDATE":"Update expenses (PUT, PATCH)","Scalar360.expenses.DELETE":"Delete expenses (DELETE)","Scalar360.health.ALL":"All operations on health","Scalar360.health.READ":"Read health (GET)","Scalar360.health.CREATE":"Create health (POST)","Scalar360.health.UPDATE":"Update health (PUT, PATCH)","Scalar360.health.DELETE":"Delete health (DELETE)","Scalar360.hooks.ALL":"All operations on hooks","Scalar360.hooks.READ":"Read hooks (GET)","Scalar360.hooks.CREATE":"Create hooks (POST)","Scalar360.hooks.UPDATE":"Update hooks (PUT, PATCH)","Scalar360.hooks.DELETE":"Delete hooks (DELETE)","Scalar360.import-jobs.ALL":"All operations on import-jobs","Scalar360.import-jobs.READ":"Read import-jobs (GET)","Scalar360.import-jobs.CREATE":"Create import-jobs (POST)","Scalar360.import-jobs.UPDATE":"Update import-jobs (PUT, PATCH)","Scalar360.import-jobs.DELETE":"Delete import-jobs (DELETE)","Scalar360.integrations.ALL":"All operations on integrations","Scalar360.integrations.READ":"Read integrations (GET)","Scalar360.integrations.CREATE":"Create integrations (POST)","Scalar360.integrations.UPDATE":"Update integrations (PUT, PATCH)","Scalar360.integrations.DELETE":"Delete integrations (DELETE)","Scalar360.inventory.ALL":"All operations on inventory","Scalar360.inventory.READ":"Read inventory (GET)","Scalar360.inventory.CREATE":"Create inventory (POST)","Scalar360.inventory.UPDATE":"Update inventory (PUT, PATCH)","Scalar360.inventory.DELETE":"Delete inventory (DELETE)","Scalar360.inventory-adjustments.ALL":"All operations on inventory-adjustments","Scalar360.inventory-adjustments.READ":"Read inventory-adjustments (GET)","Scalar360.inventory-adjustments.CREATE":"Create inventory-adjustments (POST)","Scalar360.inventory-adjustments.UPDATE":"Update inventory-adjustments (PUT, PATCH)","Scalar360.inventory-adjustments.DELETE":"Delete inventory-adjustments (DELETE)","Scalar360.invoices.ALL":"All operations on invoices","Scalar360.invoices.READ":"Read invoices (GET)","Scalar360.invoices.CREATE":"Create invoices (POST)","Scalar360.invoices.UPDATE":"Update invoices (PUT, PATCH)","Scalar360.invoices.DELETE":"Delete invoices (DELETE)","Scalar360.leads.ALL":"All operations on leads","Scalar360.leads.READ":"Read leads (GET)","Scalar360.leads.CREATE":"Create leads (POST)","Scalar360.leads.UPDATE":"Update leads (PUT, PATCH)","Scalar360.leads.DELETE":"Delete leads (DELETE)","Scalar360.manufacturing.ALL":"All operations on manufacturing","Scalar360.manufacturing.READ":"Read manufacturing (GET)","Scalar360.manufacturing.CREATE":"Create manufacturing (POST)","Scalar360.manufacturing.UPDATE":"Update manufacturing (PUT, PATCH)","Scalar360.manufacturing.DELETE":"Delete manufacturing (DELETE)","Scalar360.me.ALL":"All operations on me","Scalar360.me.READ":"Read me (GET)","Scalar360.me.CREATE":"Create me (POST)","Scalar360.me.UPDATE":"Update me (PUT, PATCH)","Scalar360.me.DELETE":"Delete me (DELETE)","Scalar360.notifications.ALL":"All operations on notifications","Scalar360.notifications.READ":"Read notifications (GET)","Scalar360.notifications.CREATE":"Create notifications (POST)","Scalar360.notifications.UPDATE":"Update notifications (PUT, PATCH)","Scalar360.notifications.DELETE":"Delete notifications (DELETE)","Scalar360.payables.ALL":"All operations on payables","Scalar360.payables.READ":"Read payables (GET)","Scalar360.payables.CREATE":"Create payables (POST)","Scalar360.payables.UPDATE":"Update payables (PUT, PATCH)","Scalar360.payables.DELETE":"Delete payables (DELETE)","Scalar360.payroll.ALL":"All operations on payroll","Scalar360.payroll.READ":"Read payroll (GET)","Scalar360.payroll.CREATE":"Create payroll (POST)","Scalar360.payroll.UPDATE":"Update payroll (PUT, PATCH)","Scalar360.payroll.DELETE":"Delete payroll (DELETE)","Scalar360.plans.ALL":"All operations on plans","Scalar360.plans.READ":"Read plans (GET)","Scalar360.plans.CREATE":"Create plans (POST)","Scalar360.plans.UPDATE":"Update plans (PUT, PATCH)","Scalar360.plans.DELETE":"Delete plans (DELETE)","Scalar360.pos.ALL":"All operations on pos","Scalar360.pos.READ":"Read pos (GET)","Scalar360.pos.CREATE":"Create pos (POST)","Scalar360.pos.UPDATE":"Update pos (PUT, PATCH)","Scalar360.pos.DELETE":"Delete pos (DELETE)","Scalar360.price-lists.ALL":"All operations on price-lists","Scalar360.price-lists.READ":"Read price-lists (GET)","Scalar360.price-lists.CREATE":"Create price-lists (POST)","Scalar360.price-lists.UPDATE":"Update price-lists (PUT, PATCH)","Scalar360.price-lists.DELETE":"Delete price-lists (DELETE)","Scalar360.projects.ALL":"All operations on projects","Scalar360.projects.READ":"Read projects (GET)","Scalar360.projects.CREATE":"Create projects (POST)","Scalar360.projects.UPDATE":"Update projects (PUT, PATCH)","Scalar360.projects.DELETE":"Delete projects (DELETE)","Scalar360.purchase.ALL":"All operations on purchase","Scalar360.purchase.READ":"Read purchase (GET)","Scalar360.purchase.CREATE":"Create purchase (POST)","Scalar360.purchase.UPDATE":"Update purchase (PUT, PATCH)","Scalar360.purchase.DELETE":"Delete purchase (DELETE)","Scalar360.purchase-debit-notes.ALL":"All operations on purchase-debit-notes","Scalar360.purchase-debit-notes.READ":"Read purchase-debit-notes (GET)","Scalar360.purchase-debit-notes.CREATE":"Create purchase-debit-notes (POST)","Scalar360.purchase-debit-notes.UPDATE":"Update purchase-debit-notes (PUT, PATCH)","Scalar360.purchase-debit-notes.DELETE":"Delete purchase-debit-notes (DELETE)","Scalar360.purchase-orders.ALL":"All operations on purchase-orders","Scalar360.purchase-orders.READ":"Read purchase-orders (GET)","Scalar360.purchase-orders.CREATE":"Create purchase-orders (POST)","Scalar360.purchase-orders.UPDATE":"Update purchase-orders (PUT, PATCH)","Scalar360.purchase-orders.DELETE":"Delete purchase-orders (DELETE)","Scalar360.purchase-receipts.ALL":"All operations on purchase-receipts","Scalar360.purchase-receipts.READ":"Read purchase-receipts (GET)","Scalar360.purchase-receipts.CREATE":"Create purchase-receipts (POST)","Scalar360.purchase-receipts.UPDATE":"Update purchase-receipts (PUT, PATCH)","Scalar360.purchase-receipts.DELETE":"Delete purchase-receipts (DELETE)","Scalar360.purchase-returns.ALL":"All operations on purchase-returns","Scalar360.purchase-returns.READ":"Read purchase-returns (GET)","Scalar360.purchase-returns.CREATE":"Create purchase-returns (POST)","Scalar360.purchase-returns.UPDATE":"Update purchase-returns (PUT, PATCH)","Scalar360.purchase-returns.DELETE":"Delete purchase-returns (DELETE)","Scalar360.quotes.ALL":"All operations on quotes","Scalar360.quotes.READ":"Read quotes (GET)","Scalar360.quotes.CREATE":"Create quotes (POST)","Scalar360.quotes.UPDATE":"Update quotes (PUT, PATCH)","Scalar360.quotes.DELETE":"Delete quotes (DELETE)","Scalar360.receivables.ALL":"All operations on receivables","Scalar360.receivables.READ":"Read receivables (GET)","Scalar360.receivables.CREATE":"Create receivables (POST)","Scalar360.receivables.UPDATE":"Update receivables (PUT, PATCH)","Scalar360.receivables.DELETE":"Delete receivables (DELETE)","Scalar360.recurring.ALL":"All operations on recurring","Scalar360.recurring.READ":"Read recurring (GET)","Scalar360.recurring.CREATE":"Create recurring (POST)","Scalar360.recurring.UPDATE":"Update recurring (PUT, PATCH)","Scalar360.recurring.DELETE":"Delete recurring (DELETE)","Scalar360.reorder.ALL":"All operations on reorder","Scalar360.reorder.READ":"Read reorder (GET)","Scalar360.reorder.CREATE":"Create reorder (POST)","Scalar360.reorder.UPDATE":"Update reorder (PUT, PATCH)","Scalar360.reorder.DELETE":"Delete reorder (DELETE)","Scalar360.reports.ALL":"All operations on reports","Scalar360.reports.READ":"Read reports (GET)","Scalar360.reports.CREATE":"Create reports (POST)","Scalar360.reports.UPDATE":"Update reports (PUT, PATCH)","Scalar360.reports.DELETE":"Delete reports (DELETE)","Scalar360.sales.ALL":"All operations on sales","Scalar360.sales.READ":"Read sales (GET)","Scalar360.sales.CREATE":"Create sales (POST)","Scalar360.sales.UPDATE":"Update sales (PUT, PATCH)","Scalar360.sales.DELETE":"Delete sales (DELETE)","Scalar360.sales-orders.ALL":"All operations on sales-orders","Scalar360.sales-orders.READ":"Read sales-orders (GET)","Scalar360.sales-orders.CREATE":"Create sales-orders (POST)","Scalar360.sales-orders.UPDATE":"Update sales-orders (PUT, PATCH)","Scalar360.sales-orders.DELETE":"Delete sales-orders (DELETE)","Scalar360.sales-returns.ALL":"All operations on sales-returns","Scalar360.sales-returns.READ":"Read sales-returns (GET)","Scalar360.sales-returns.CREATE":"Create sales-returns (POST)","Scalar360.sales-returns.UPDATE":"Update sales-returns (PUT, PATCH)","Scalar360.sales-returns.DELETE":"Delete sales-returns (DELETE)","Scalar360.scm.ALL":"All operations on scm","Scalar360.scm.READ":"Read scm (GET)","Scalar360.scm.CREATE":"Create scm (POST)","Scalar360.scm.UPDATE":"Update scm (PUT, PATCH)","Scalar360.scm.DELETE":"Delete scm (DELETE)","Scalar360.settings.ALL":"Manage users, invitations, roles and organisation settings - all operations (not part of fullaccess)","Scalar360.settings.READ":"View users, invitations, roles and organisation settings (GET)","Scalar360.settings.CREATE":"Invite users and create roles (POST)","Scalar360.settings.UPDATE":"Change members, roles and organisation settings (PUT, PATCH, POST updates)","Scalar360.settings.DELETE":"Remove members, invitations and roles (DELETE)","Scalar360.shipments.ALL":"All operations on shipments","Scalar360.shipments.READ":"Read shipments (GET)","Scalar360.shipments.CREATE":"Create shipments (POST)","Scalar360.shipments.UPDATE":"Update shipments (PUT, PATCH)","Scalar360.shipments.DELETE":"Delete shipments (DELETE)","Scalar360.stock.ALL":"All operations on stock","Scalar360.stock.READ":"Read stock (GET)","Scalar360.stock.CREATE":"Create stock (POST)","Scalar360.stock.UPDATE":"Update stock (PUT, PATCH)","Scalar360.stock.DELETE":"Delete stock (DELETE)","Scalar360.stock-transfers.ALL":"All operations on stock-transfers","Scalar360.stock-transfers.READ":"Read stock-transfers (GET)","Scalar360.stock-transfers.CREATE":"Create stock-transfers (POST)","Scalar360.stock-transfers.UPDATE":"Update stock-transfers (PUT, PATCH)","Scalar360.stock-transfers.DELETE":"Delete stock-transfers (DELETE)","Scalar360.table-views.ALL":"All operations on table-views","Scalar360.table-views.READ":"Read table-views (GET)","Scalar360.table-views.CREATE":"Create table-views (POST)","Scalar360.table-views.UPDATE":"Update table-views (PUT, PATCH)","Scalar360.table-views.DELETE":"Delete table-views (DELETE)","Scalar360.todos.ALL":"All operations on todos","Scalar360.todos.READ":"Read todos (GET)","Scalar360.todos.CREATE":"Create todos (POST)","Scalar360.todos.UPDATE":"Update todos (PUT, PATCH)","Scalar360.todos.DELETE":"Delete todos (DELETE)","Scalar360.user-preferences.ALL":"All operations on user-preferences","Scalar360.user-preferences.READ":"Read user-preferences (GET)","Scalar360.user-preferences.CREATE":"Create user-preferences (POST)","Scalar360.user-preferences.UPDATE":"Update user-preferences (PUT, PATCH)","Scalar360.user-preferences.DELETE":"Delete user-preferences (DELETE)","Scalar360.vendors.ALL":"All operations on vendors","Scalar360.vendors.READ":"Read vendors (GET)","Scalar360.vendors.CREATE":"Create vendors (POST)","Scalar360.vendors.UPDATE":"Update vendors (PUT, PATCH)","Scalar360.vendors.DELETE":"Delete vendors (DELETE)"}}}}}},"security":[{"oauth2":[]}]}