{"openapi":"3.1.0","info":{"title":"Vestoris API","version":"1.4.0","summary":"Paper trading: simulated orders and fills. Not investment advice.","description":"The Vestoris REST API: everything the site does, under the same entitlements, four-eyes rules and confirmations.\n\nVestoris is a paper-trading platform: orders and fills are simulated, nothing reaches a broker, and no real money moves. Vestoris is not a broker-dealer or investment adviser.\n\nConventions: ids are strings; money, prices and quantities are decimal strings; times are ISO 8601 UTC. Lists are cursor-paginated (limit, cursor; next_cursor). POST requests need an Idempotency-Key. Updates need If-Match with the ETag of a GET (412 when it changed). Errors are RFC 9457 problem+json with a stable code. Rate limits are sent as RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (429 with Retry-After). Long operations answer 202 with a job to poll.","termsOfService":"https://vestoris.com/terms","contact":{"name":"Vestoris","url":"https://vestoris.com/contact"}},"servers":[{"url":"https://vestoris.com"}],"tags":[{"name":"Meta"},{"name":"Firm"},{"name":"Users"},{"name":"Entitlements"},{"name":"Access reviews"},{"name":"Reference data"},{"name":"User-defined fields"},{"name":"Portfolio Center"},{"name":"Market data"},{"name":"Orders"},{"name":"Compliance"},{"name":"Pipeline"},{"name":"Surveillance"},{"name":"Workflow"},{"name":"Data"},{"name":"Records"},{"name":"AI"},{"name":"Webhooks"},{"name":"Owner"}],"security":[{"bearer":[]}],"paths":{"/api/v1/openapi.json":{"get":{"operationId":"metaOpenapi","tags":["Meta"],"summary":"This API's OpenAPI 3.1 document","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApi"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"security":[]}},"/api/v1/me":{"get":{"operationId":"metaMe","tags":["Meta"],"summary":"Who the token acts as: user or service account, firm, role, privileges, scopes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":null}},"/api/v1/scopes":{"get":{"operationId":"metaScopes","tags":["Meta"],"summary":"Every scope with its meaning","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":null}},"/api/v1/jobs/{id}":{"get":{"operationId":"metaJob","tags":["Meta"],"summary":"A long-running operation (202 responses point here)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":null}},"/api/v1/firm":{"get":{"operationId":"adminFirm","tags":["Firm"],"summary":"The firm and its settings","description":"Scope: `firm:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Firm"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"firm:read"},"patch":{"operationId":"adminUpdateFirm","tags":["Firm"],"summary":"Change settings (If-Match)","description":"Scope: `firm:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmPatch"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Firm"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"firm:write"}},"/api/v1/users":{"get":{"operationId":"adminUsers","tags":["Users"],"summary":"Users of the firm (people and service accounts)","description":"Scope: `users:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"role","in":"query","required":false,"description":"Filter by role","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"active or disabled","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"person or service","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"users:read"},"post":{"operationId":"adminInvite","tags":["Users"],"summary":"Invite a person (an email with a link)","description":"Scope: `admin:users` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"admin:users"}},"/api/v1/users/{id}":{"get":{"operationId":"adminUser","tags":["Users"],"summary":"One user with privileges","description":"Scope: `users:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"users:read"},"patch":{"operationId":"adminUpdateUser","tags":["Users"],"summary":"Change role or status (If-Match)","description":"Scope: `admin:users` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatch"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"admin:users"}},"/api/v1/users/{id}/privileges/{privilege}":{"put":{"operationId":"adminPrivilege","tags":["Users"],"summary":"Grant, remove or reset one privilege","description":"Scope: `admin:users` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"privilege","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivilegeSet"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"admin:users"}},"/api/v1/roles":{"get":{"operationId":"adminRoles","tags":["Users"],"summary":"Roles, their default privileges and maximum account permissions","description":"Scope: `users:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"users:read"}},"/api/v1/entitlements":{"get":{"operationId":"adminEntitlements","tags":["Entitlements"],"summary":"Per-account permissions of every user","description":"Scope: `entitlements:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"entitlements:read"}},"/api/v1/entitlements/{userId}/{accountId}":{"put":{"operationId":"adminSetEntitlement","tags":["Entitlements"],"summary":"Set one user's permissions on one account","description":"Scope: `entitlements:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionSet"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"entitlements:write"}},"/api/v1/access-reviews":{"get":{"operationId":"adminReviews","tags":["Access reviews"],"summary":"Access reviews","description":"Scope: `access_reviews:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccessReview"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"access_reviews:read"},"post":{"operationId":"adminStartReview","tags":["Access reviews"],"summary":"Draft a new access review","description":"Scope: `access_reviews:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessReview"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"access_reviews:write"}},"/api/v1/access-reviews/{id}":{"get":{"operationId":"adminReview","tags":["Access reviews"],"summary":"One access review with its recommendations","description":"Scope: `access_reviews:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessReview"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"access_reviews:read"}},"/api/v1/access-reviews/{id}/sign-off":{"post":{"operationId":"adminSignReview","tags":["Access reviews"],"summary":"Sign off, applying the chosen recommendations (a person)","description":"Scope: `access_reviews:write` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSignOff"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessReview"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"access_reviews:write"}},"/api/v1/securities":{"get":{"operationId":"referenceSecurities","tags":["Reference data"],"summary":"The security master","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"Exact symbol","schema":{"type":"string"}},{"name":"sector","in":"query","required":false,"description":"Sector","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"true or false","schema":{"type":"string"}},{"name":"isin","in":"query","required":false,"description":"ISIN","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Security"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"post":{"operationId":"referenceCreateSecurity","tags":["Reference data"],"summary":"Add a security","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/securities/{id}":{"get":{"operationId":"referenceSecurity","tags":["Reference data"],"summary":"One security, with its user-defined fields","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"patch":{"operationId":"referenceUpdateSecurity","tags":["Reference data"],"summary":"Change a security (If-Match)","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/issuers":{"get":{"operationId":"referenceIssuers","tags":["Reference data"],"summary":"Issuers","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"code","in":"query","required":false,"description":"Issuer code","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Issuer"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/brokers":{"get":{"operationId":"referenceBrokers","tags":["Reference data"],"summary":"Brokers (reference only: Vestoris connects to no broker)","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Broker"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/benchmarks":{"get":{"operationId":"referenceBenchmarks","tags":["Reference data"],"summary":"Benchmarks with constituents","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Benchmark"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/account-groups":{"get":{"operationId":"referenceGroups","tags":["Reference data"],"summary":"Account groups (members limited to the accounts you can see)","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountGroup"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"post":{"operationId":"referenceCreateGroup","tags":["Reference data"],"summary":"Create an account group","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountGroupIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountGroup"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/lists":{"get":{"operationId":"referenceLists","tags":["Reference data"],"summary":"Restricted, watch and exclusion lists","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"restricted, watch or exclusion","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SecurityList"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/lists/{id}":{"get":{"operationId":"referenceList","tags":["Reference data"],"summary":"One list with its members","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/lists/{id}/members":{"post":{"operationId":"referenceAddMembers","tags":["Reference data"],"summary":"Add securities to a list","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembersIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/lists/{id}/members/{securityId}":{"delete":{"operationId":"referenceRemoveMember","tags":["Reference data"],"summary":"Remove a security from a list","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"securityId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/udf/{table}":{"get":{"operationId":"referenceUdfDefs","tags":["User-defined fields"],"summary":"The ten user-defined field definitions of a table","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfDefList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"}},"/api/v1/udf/{table}/{slot}":{"put":{"operationId":"referenceSaveUdf","tags":["User-defined fields"],"summary":"Define a field (Admins; versioned)","description":"Scope: `udf:admin` (and the privileges of the user or service account behind the token).","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"slot","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfDefIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfDef"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"udf:admin"}},"/api/v1/udf/{table}/records/{key}":{"get":{"operationId":"referenceUdfValues","tags":["User-defined fields"],"summary":"The user-defined values of one record","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfValues"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"put":{"operationId":"referenceSetUdfValues","tags":["User-defined fields"],"summary":"Set user-defined values of one record (If-Match)","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfValuesIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UdfValues"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/accounts":{"get":{"operationId":"portfolioAccounts","tags":["Portfolio Center"],"summary":"The accounts you can see, valued at the latest simulated closes","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Account tag","schema":{"type":"string"}},{"name":"model","in":"query","required":false,"description":"Model id","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"post":{"operationId":"portfolioCreateAccount","tags":["Portfolio Center"],"summary":"Add an account (simulated cash)","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/accounts/{id}":{"get":{"operationId":"portfolioAccount","tags":["Portfolio Center"],"summary":"One account","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"patch":{"operationId":"portfolioUpdateAccount","tags":["Portfolio Center"],"summary":"Change an account, incl. its model (If-Match)","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/accounts/{id}/positions":{"get":{"operationId":"portfolioPositions","tags":["Portfolio Center"],"summary":"Positions with value and weight","description":"Scope: `portfolio:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:read"}},"/api/v1/accounts/{id}/lots":{"get":{"operationId":"portfolioLots","tags":["Portfolio Center"],"summary":"Open tax lots","description":"Scope: `portfolio:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LotList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:read"}},"/api/v1/accounts/{id}/cash":{"get":{"operationId":"portfolioCash","tags":["Portfolio Center"],"summary":"Cash balance and recent (simulated) movements","description":"Scope: `portfolio:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cash"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:read"},"post":{"operationId":"portfolioMoveCash","tags":["Portfolio Center"],"summary":"Deposit or withdraw simulated cash","description":"Scope: `portfolio:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashMove"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cash"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:write"}},"/api/v1/accounts/{id}/drift":{"get":{"operationId":"portfolioDrift","tags":["Portfolio Center"],"summary":"Drift against the account's model","description":"Scope: `portfolio:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Drift"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:read"}},"/api/v1/accounts/{id}/risk":{"get":{"operationId":"portfolioRisk","tags":["Portfolio Center"],"summary":"Concentration, exposures and factor betas","description":"Scope: `portfolio:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Risk"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:read"}},"/api/v1/models":{"get":{"operationId":"portfolioModels","tags":["Portfolio Center"],"summary":"Model portfolios","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"post":{"operationId":"portfolioCreateModel","tags":["Portfolio Center"],"summary":"Create a model","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/models/{id}":{"get":{"operationId":"portfolioModel","tags":["Portfolio Center"],"summary":"One model with targets","description":"Scope: `reference:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:read"},"put":{"operationId":"portfolioUpdateModel","tags":["Portfolio Center"],"summary":"Replace a model's targets (If-Match)","description":"Scope: `reference:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"reference:write"}},"/api/v1/rebalance-proposals":{"post":{"operationId":"portfolioRebalance","tags":["Portfolio Center"],"summary":"Rebalance accounts: proposals in the intent pipeline (never orders); 202 with a job for more than 3 accounts","description":"Scope: `portfolio:write` (and the privileges of the user or service account behind the token).\n\nLong operations answer 202 with a job (GET /api/v1/jobs/{id}).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebalanceIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"202":{"description":"Accepted: a job to poll","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:write"}},"/api/v1/what-ifs":{"post":{"operationId":"portfolioWhatIf","tags":["Portfolio Center"],"summary":"A what-if: sector changes for accounts, as a pipeline proposal","description":"Scope: `portfolio:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatIfIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"portfolio:write"}},"/api/v1/proposals":{"get":{"operationId":"portfolioProposals","tags":["Portfolio Center"],"summary":"Rebalance proposals","description":"Scope: `pipeline:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"account","in":"query","required":false,"description":"Account id","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"proposed, accepted or discarded","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Proposal"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:read"}},"/api/v1/proposals/{id}":{"get":{"operationId":"portfolioProposal","tags":["Portfolio Center"],"summary":"One proposal with its trades","description":"Scope: `pipeline:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:read"}},"/api/v1/prices":{"get":{"operationId":"marketPrices","tags":["Market data"],"summary":"Daily (simulated) closes of a security","description":"Scope: `market:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"symbol","in":"query","required":true,"description":"Symbol (required)","schema":{"type":"string"}},{"name":"days","in":"query","required":false,"description":"How many days back, 1 to 260","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"market:read"}},"/api/v1/prices/latest":{"get":{"operationId":"marketLatest","tags":["Market data"],"summary":"The latest close of securities","description":"Scope: `market:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"symbols","in":"query","required":false,"description":"Comma-separated symbols (at most 100)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"market:read"}},"/api/v1/fx-rates":{"get":{"operationId":"marketFx","tags":["Market data"],"summary":"FX rates","description":"Scope: `market:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"base","in":"query","required":false,"description":"Base currency","schema":{"type":"string"}},{"name":"quote","in":"query","required":false,"description":"Quote currency","schema":{"type":"string"}},{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"market:read"}},"/api/v1/corporate-actions":{"get":{"operationId":"marketCorporateActions","tags":["Market data"],"summary":"Corporate actions (splits, cash dividends)","description":"Scope: `market:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending, applied","schema":{"type":"string"}},{"name":"security","in":"query","required":false,"description":"Security id","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CorporateAction"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"market:read"}},"/api/v1/as-of/{dataset}/{key}":{"get":{"operationId":"marketAsOf","tags":["Market data"],"summary":"A record as it was on a date (effective-dated history)","description":"Scope: `market:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","required":true,"description":"YYYY-MM-DD (required)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsOf"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"market:read"}},"/api/v1/orders":{"get":{"operationId":"ordersList","tags":["Orders"],"summary":"Orders on the accounts you can see","description":"Scope: `orders:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"state","in":"query","required":false,"description":"Comma-separated states","schema":{"type":"string"}},{"name":"side","in":"query","required":false,"description":"buy or sell","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"Symbol","schema":{"type":"string"}},{"name":"account","in":"query","required":false,"description":"Account id","schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}},{"name":"created_to","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderSummary"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:read"},"post":{"operationId":"ordersCreate","tags":["Orders"],"summary":"Enter an order: checked by compliance and routed by the workflow rules like any order (paper trading)","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}":{"get":{"operationId":"ordersGet","tags":["Orders"],"summary":"One order with allocations, compliance and history","description":"Scope: `orders:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:read"}},"/api/v1/orders/{id}/amend":{"post":{"operationId":"ordersAmend","tags":["Orders"],"summary":"Amend quantity or limit (compliance re-checked; If-Match)","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAmend"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/cancel":{"post":{"operationId":"ordersCancel","tags":["Orders"],"summary":"Cancel the unfilled part","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reason"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/release":{"post":{"operationId":"ordersRelease","tags":["Orders"],"summary":"Release an approved order to the simulator (compliance re-checked)","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/rework":{"post":{"operationId":"ordersRework","tags":["Orders"],"summary":"Re-plan a working order's unfilled shares with another algo","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/approve":{"post":{"operationId":"ordersApprove","tags":["Orders"],"summary":"Approve (four eyes: never the person who entered it)","description":"Scope: `orders:approve` (and the privileges of the user or service account behind the token).\n\nAn approval: four eyes apply; a service account needs its client's \"may approve\" setting.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:approve"}},"/api/v1/orders/{id}/reject":{"post":{"operationId":"ordersReject","tags":["Orders"],"summary":"Reject","description":"Scope: `orders:approve` (and the privileges of the user or service account behind the token).\n\nAn approval: four eyes apply; a service account needs its client's \"may approve\" setting.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reason"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:approve"}},"/api/v1/orders/{id}/override":{"post":{"operationId":"ordersOverride","tags":["Orders"],"summary":"Override a soft compliance warning with a written reason","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reason"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/allocate":{"post":{"operationId":"ordersAllocate","tags":["Orders"],"summary":"Confirm the allocation of executions (Operations)","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/orders/{id}/fills":{"get":{"operationId":"ordersFills","tags":["Orders"],"summary":"Simulated fills of an order","description":"Scope: `orders:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:read"}},"/api/v1/executions":{"get":{"operationId":"ordersExecutions","tags":["Orders"],"summary":"Simulated fills on the accounts you can see","description":"Scope: `orders:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"Order id","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Fill"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:read"}},"/api/v1/overrides":{"get":{"operationId":"ordersOverrides","tags":["Compliance"],"summary":"Override requests","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending, approved, rejected","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Override"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"}},"/api/v1/overrides/{id}/decision":{"post":{"operationId":"ordersDecideOverride","tags":["Compliance"],"summary":"Approve or reject an override (Compliance; four eyes)","description":"Scope: `orders:approve` (and the privileges of the user or service account behind the token).\n\nAn approval: four eyes apply; a service account needs its client's \"may approve\" setting.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Override"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:approve"}},"/api/v1/blotter/views":{"get":{"operationId":"ordersViews","tags":["Orders"],"summary":"Saved blotter views (yours and the firm's)","description":"Scope: `orders:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlotterViewList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:read"},"post":{"operationId":"ordersSaveView","tags":["Orders"],"summary":"Save a blotter view (validated against the field registry)","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlotterViewIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlotterView"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/blotter/views/{id}":{"put":{"operationId":"ordersUpdateView","tags":["Orders"],"summary":"Replace a blotter view","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlotterViewIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlotterView"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"},"delete":{"operationId":"ordersDeleteView","tags":["Orders"],"summary":"Delete a blotter view","description":"Scope: `orders:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"204":{"description":"Done (no content)"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"orders:write"}},"/api/v1/pipeline/runs":{"get":{"operationId":"pipelineList","tags":["Pipeline"],"summary":"Your intent-pipeline requests","description":"Scope: `pipeline:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PipelineRun"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:read"},"post":{"operationId":"pipelineStart","tags":["Pipeline"],"summary":"Interpret a request in plain English (stage 0; the AI may be used)","description":"Scope: `pipeline:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:write"}},"/api/v1/pipeline/runs/{id}":{"get":{"operationId":"pipelineGet","tags":["Pipeline"],"summary":"A request with its stages","description":"Scope: `pipeline:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:read"}},"/api/v1/pipeline/runs/{id}/run":{"post":{"operationId":"pipelineRun","tags":["Pipeline"],"summary":"Run the stages: entitlements, proposals, compliance pre-check","description":"Scope: `pipeline:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:write"}},"/api/v1/pipeline/runs/{id}/orders":{"post":{"operationId":"pipelineOrders","tags":["Pipeline"],"summary":"Create the orders (each checked again; nothing is executed)","description":"Scope: `pipeline:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"pipeline:write"}},"/api/v1/compliance/rules":{"get":{"operationId":"complianceRules","tags":["Compliance"],"summary":"Rules (every version)","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"draft, pending_approval, active, retired, superseded","schema":{"type":"string"}},{"name":"rule_type","in":"query","required":false,"description":"Rule type","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"},"post":{"operationId":"complianceDraft","tags":["Compliance"],"summary":"Draft a rule (structured definition)","description":"Scope: `compliance:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:write"}},"/api/v1/compliance/rules/{id}":{"get":{"operationId":"complianceRule","tags":["Compliance"],"summary":"One rule version with restatement and test bench","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"},"patch":{"operationId":"complianceUpdate","tags":["Compliance"],"summary":"Change a draft (If-Match)","description":"Scope: `compliance:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"If-Match","in":"header","required":true,"description":"The ETag of your last GET of this resource.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:write"}},"/api/v1/compliance/rules/{id}/versions":{"get":{"operationId":"complianceVersions","tags":["Compliance"],"summary":"Every version of the rule's lineage","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"}},"/api/v1/compliance/rules/{id}/test-bench":{"post":{"operationId":"complianceTestBench","tags":["Compliance"],"summary":"Run the test bench (202: a job)","description":"Scope: `compliance:rules:write` (and the privileges of the user or service account behind the token).\n\nLong operations answer 202 with a job (GET /api/v1/jobs/{id}).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Days"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:write"}},"/api/v1/compliance/rules/{id}/submit":{"post":{"operationId":"complianceSubmit","tags":["Compliance"],"summary":"Submit for sign-off","description":"Scope: `compliance:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:write"}},"/api/v1/compliance/rules/{id}/sign-off":{"get":{"operationId":"complianceSignOffPreview","tags":["Compliance"],"summary":"What you would sign off, with a confirmation token for X-Vestoris-Confirm","description":"Scope: `compliance:rules:approve` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignOffPreview"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:approve"},"post":{"operationId":"complianceSignOff","tags":["Compliance"],"summary":"Sign off (a person, never client credentials; X-Vestoris-Confirm)","description":"Scope: `compliance:rules:approve` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.\n\nAn approval: four eyes apply; a service account needs its client's \"may approve\" setting.\n\nNeeds X-Vestoris-Confirm with the confirm_token of the preview.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"X-Vestoris-Confirm","in":"header","required":true,"description":"The confirm_token of the preview you are confirming.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignOff"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:approve"}},"/api/v1/compliance/rules/{id}/reject":{"post":{"operationId":"complianceReject","tags":["Compliance"],"summary":"Send back to the author with comments","description":"Scope: `compliance:rules:approve` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reason"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:approve"}},"/api/v1/compliance/rules/{id}/retire":{"post":{"operationId":"complianceRetire","tags":["Compliance"],"summary":"Ask for an active rule to be retired (signed off like a change)","description":"Scope: `compliance:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reason"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:rules:write"}},"/api/v1/compliance/violations":{"get":{"operationId":"complianceViolations","tags":["Compliance"],"summary":"Violations","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"open, acknowledged, resolved, waived, escalated","schema":{"type":"string"}},{"name":"account","in":"query","required":false,"description":"Account id","schema":{"type":"string"}},{"name":"severity","in":"query","required":false,"description":"block or warn","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Violation"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"}},"/api/v1/compliance/violations/{id}":{"get":{"operationId":"complianceViolation","tags":["Compliance"],"summary":"One violation","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Violation"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"}},"/api/v1/compliance/violations/{id}/transition":{"post":{"operationId":"complianceTransition","tags":["Compliance"],"summary":"Acknowledge, resolve, waive (with a reason) or escalate","description":"Scope: `compliance:violations:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViolationTransition"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Violation"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:violations:write"}},"/api/v1/compliance/packages":{"get":{"operationId":"compliancePackages","tags":["Compliance"],"summary":"Rule packages and their assignments","description":"Scope: `compliance:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:read"}},"/api/v1/compliance/register":{"get":{"operationId":"complianceRegister","tags":["Compliance"],"summary":"The rule register (JSON, or ?format=pdf)","description":"Scope: `compliance:reports:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"format","in":"query","required":false,"description":"json (default) or pdf","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Register"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:reports:read"}},"/api/v1/compliance/reports":{"get":{"operationId":"complianceReports","tags":["Compliance"],"summary":"Periodic compliance reports","description":"Scope: `compliance:reports:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:reports:read"},"post":{"operationId":"complianceGenerateReport","tags":["Compliance"],"summary":"Generate a report for a period (202: a job)","description":"Scope: `compliance:reports:read` (and the privileges of the user or service account behind the token).\n\nLong operations answer 202 with a job (GET /api/v1/jobs/{id}).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIn"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"compliance:reports:read"}},"/api/v1/surveillance/alerts":{"get":{"operationId":"complianceAlerts","tags":["Surveillance"],"summary":"Surveillance and anomaly alerts","description":"Scope: `surveillance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"surveillance, cross_component, access or orders","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"open, reviewed, dismissed, escalated","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"surveillance:read"}},"/api/v1/surveillance/alerts/{id}":{"get":{"operationId":"complianceAlert","tags":["Surveillance"],"summary":"One alert","description":"Scope: `surveillance:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alert"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"surveillance:read"}},"/api/v1/surveillance/alerts/{id}/review":{"post":{"operationId":"complianceReviewAlert","tags":["Surveillance"],"summary":"Review an alert (reviewed, dismissed, escalated) with a note","description":"Scope: `surveillance:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertReview"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alert"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"surveillance:write"}},"/api/v1/workflow/items":{"get":{"operationId":"workflowItems","tags":["Workflow"],"summary":"Items in flight you can see (the monitor's board)","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Item type","schema":{"type":"string"}},{"name":"stage","in":"query","required":false,"description":"Stage","schema":{"type":"string"}},{"name":"owner","in":"query","required":false,"description":"User id, \"me\" or \"none\"","schema":{"type":"string"}},{"name":"desk","in":"query","required":false,"description":"Desk id","schema":{"type":"string"}},{"name":"sla","in":"query","required":false,"description":"green, amber, red, escalated","schema":{"type":"string"}},{"name":"priority","in":"query","required":false,"description":"1-4","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/items/{id}":{"get":{"operationId":"workflowItem","tags":["Workflow"],"summary":"One item with history, comments and approvals","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowItem"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/items/{id}/actions":{"post":{"operationId":"workflowAct","tags":["Workflow"],"summary":"Claim, release, reassign, escalate, set the priority, move to a desk, comment, watch (never approve)","description":"Scope: `workflow:act` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAction"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowItem"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:act"}},"/api/v1/workflow/my-work":{"get":{"operationId":"workflowMyWork","tags":["Workflow"],"summary":"What waits on you, what you requested, what you watch","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyWork"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/rules":{"get":{"operationId":"workflowRules","tags":["Workflow"],"summary":"Workflow rules (every version)","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"draft, pending, active, superseded, retired, rejected","schema":{"type":"string"}},{"name":"item_type","in":"query","required":false,"description":"Item type","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRule"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"},"post":{"operationId":"workflowDraft","tags":["Workflow"],"summary":"Draft a rule from a structure, or from a sentence (\"text\"); replayed on the test bench","description":"Scope: `workflow:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRuleIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:rules:write"}},"/api/v1/workflow/rules/{id}":{"get":{"operationId":"workflowRule","tags":["Workflow"],"summary":"One workflow rule","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/rules/{id}/test-bench":{"post":{"operationId":"workflowTestBench","tags":["Workflow"],"summary":"Replay the last days of items (202: a job)","description":"Scope: `workflow:rules:write` (and the privileges of the user or service account behind the token).\n\nLong operations answer 202 with a job (GET /api/v1/jobs/{id}).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Days"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:rules:write"}},"/api/v1/workflow/rules/{id}/submit":{"post":{"operationId":"workflowSubmit","tags":["Workflow"],"summary":"Submit for sign-off","description":"Scope: `workflow:rules:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:rules:write"}},"/api/v1/workflow/rules/{id}/sign-off":{"get":{"operationId":"workflowSignOffPreview","tags":["Workflow"],"summary":"What you would sign off, with a confirmation token","description":"Scope: `workflow:rules:approve` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignOffPreview"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:rules:approve"},"post":{"operationId":"workflowSignOff","tags":["Workflow"],"summary":"Sign off as Admin or Compliance (a person; X-Vestoris-Confirm)","description":"Scope: `workflow:rules:approve` (and the privileges of the user or service account behind the token).\n\nA person must do this: a token from the authorization code flow or a personal access token, never client credentials.\n\nAn approval: four eyes apply; a service account needs its client's \"may approve\" setting.\n\nNeeds X-Vestoris-Confirm with the confirm_token of the preview.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"X-Vestoris-Confirm","in":"header","required":true,"description":"The confirm_token of the preview you are confirming.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSignOff"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRule"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:rules:approve"}},"/api/v1/workflow/desks":{"get":{"operationId":"workflowDesks","tags":["Workflow"],"summary":"Desks, members and assignment modes","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeskList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/slas":{"get":{"operationId":"workflowSlas","tags":["Workflow"],"summary":"SLA minutes and escalations per stage","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/workflow/views":{"get":{"operationId":"workflowViews","tags":["Workflow"],"summary":"Saved monitor views","description":"Scope: `workflow:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorViewList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"workflow:read"}},"/api/v1/data/{dataset}":{"post":{"operationId":"dataLoad","tags":["Data"],"summary":"Load a file (CSV, TXT, XLSX or Vestoris XML) into a data set; the body is the file","description":"Scope: `data:load:<data set>` (and the privileges of the user or service account behind the token).\n\nAlso accepts legacy API keys (deprecated: Deprecation and Sunset headers are sent; see /developers/legacy-keys).","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string"}},{"name":"filename","in":"query","required":true,"description":"File name with extension (required)","schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"description":"upsert (default) or full","schema":{"type":"string"}},{"name":"business_date","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"apply","in":"query","required":false,"description":"\"auto\": apply when nothing was rejected (OAuth tokens; needs data:write). Legacy keys use their own setting","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The file itself","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBatch"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"422":{"description":"Rejected (the batch or run is in the body, as in 1.2), or a validation problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBatch"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:load:{dataset}"}},"/api/v1/batches":{"get":{"operationId":"dataBatches","tags":["Data"],"summary":"Load history","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"dataset","in":"query","required":false,"description":"Data set","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"staged, held, applied, undone, rejected","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Batch"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/batches/{id}":{"get":{"operationId":"dataBatch","tags":["Data"],"summary":"A batch's status and counts","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).\n\nAlso accepts legacy API keys (deprecated: Deprecation and Sunset headers are sent; see /developers/legacy-keys).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBatchStatus"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/batches/{id}/rows":{"get":{"operationId":"dataRows","tags":["Data"],"summary":"A batch's rows: the diff and the rejected rows with codes","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"status","in":"query","required":false,"description":"new, changed, unchanged, rejected","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-500","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Offset","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRows"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/batches/{id}/apply":{"post":{"operationId":"dataApply","tags":["Data"],"summary":"Apply a staged batch","description":"Scope: `data:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:write"}},"/api/v1/batches/{id}/undo":{"post":{"operationId":"dataUndo","tags":["Data"],"summary":"Undo an applied batch (unless later trades depend on it)","description":"Scope: `data:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:write"}},"/api/v1/batches/{id}/discard":{"post":{"operationId":"dataDiscard","tags":["Data"],"summary":"Discard a staged batch","description":"Scope: `data:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:write"}},"/api/v1/feeds/bundles":{"post":{"operationId":"dataBundle","tags":["Data"],"summary":"Load a folder of feed files (.zip); each file needs its data:load scope","description":"Scope: `data:load:<data set>` (and the privileges of the user or service account behind the token).\n\nAlso accepts legacy API keys (deprecated: Deprecation and Sunset headers are sent; see /developers/legacy-keys).","parameters":[{"name":"filename","in":"query","required":false,"description":"The .zip (or file) name","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The file itself","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBundle"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"202":{"description":"Some files wait for a person on the review screen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBundle"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:load:{dataset}"}},"/api/v1/feeds/bundles/{id}":{"get":{"operationId":"dataBundleStatus","tags":["Data"],"summary":"A folder's status, per file","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).\n\nAlso accepts legacy API keys (deprecated: Deprecation and Sunset headers are sent; see /developers/legacy-keys).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyBundle"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/feeds/{id}/files":{"post":{"operationId":"dataFeedFile","tags":["Data"],"summary":"Push a file to an HTTPS-push feed (the feed's data:load scope)","description":"Scope: `data:load:<data set>` (and the privileges of the user or service account behind the token).\n\nAlso accepts legacy API keys (deprecated: Deprecation and Sunset headers are sent; see /developers/legacy-keys).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"filename","in":"query","required":false,"description":"The file name","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The file itself","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyFeedFile"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"422":{"description":"Rejected (the batch or run is in the body, as in 1.2), or a validation problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyFeedFile"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:load:{dataset}"}},"/api/v1/feeds":{"get":{"operationId":"dataFeeds","tags":["Data"],"summary":"Feeds and their schedule","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/feeds/runs":{"get":{"operationId":"dataFeedRuns","tags":["Data"],"summary":"Feed runs of a business date","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD (default: today's business date)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedRunList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/feeds/runs/{id}/review":{"post":{"operationId":"dataReviewRun","tags":["Data"],"summary":"Apply or reject a held feed file","description":"Scope: `data:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldReview"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedRun"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:write"}},"/api/v1/schedules":{"get":{"operationId":"dataSchedules","tags":["Data"],"summary":"Scheduled jobs and their last runs","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/start-of-day":{"get":{"operationId":"dataSod","tags":["Data"],"summary":"The start-of-day chain of a business date","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOfDay"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/data-quality/issues":{"get":{"operationId":"dataDq","tags":["Data"],"summary":"Data quality issues","description":"Scope: `data:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"open or resolved","schema":{"type":"string"}},{"name":"severity","in":"query","required":false,"description":"high, medium, low","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DqIssue"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"data:read"}},"/api/v1/events":{"get":{"operationId":"recordsEvents","tags":["Records"],"summary":"The hash-chained event log","description":"Scope: `events:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Category","schema":{"type":"string"}},{"name":"action","in":"query","required":false,"description":"Action","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"User id","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"ISO 8601","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"events:read"}},"/api/v1/events/verify":{"get":{"operationId":"recordsVerify","tags":["Records"],"summary":"Verify the firm's hash chain","description":"Scope: `events:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainCheck"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"events:read"}},"/api/v1/ai-log":{"get":{"operationId":"recordsAiLog","tags":["Records"],"summary":"AI interactions (metadata; inputs and outputs are on the AI log page)","description":"Scope: `ai_log:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"purpose","in":"query","required":false,"description":"Purpose","schema":{"type":"string"}},{"name":"client","in":"query","required":false,"description":"OAuth client_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiInteraction"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"ai_log:read"}},"/api/v1/copilot/questions":{"post":{"operationId":"aiAsk","tags":["AI"],"summary":"Ask the copilot (answers only from what you may see; logged)","description":"Scope: `ai:use` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Question"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotAnswer"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"ai:use"}},"/api/v1/commands/{screen}":{"post":{"operationId":"aiPlan","tags":["AI"],"summary":"Plan a natural-language command and preview it (screen: portfolio, blotter, monitor, wfrules); nothing runs","description":"Scope: `ai:use` (and the privileges of the user or service account behind the token).","parameters":[{"name":"screen","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"ai:use"}},"/api/v1/commands/{id}":{"get":{"operationId":"aiCommand","tags":["AI"],"summary":"A command with its plan, preview and results","description":"Scope: `ai:use` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"ai:use"}},"/api/v1/commands/{id}/execute":{"post":{"operationId":"aiExecute","tags":["AI"],"summary":"Execute the previewed plan (X-Vestoris-Confirm: the preview token; \"typed\" for large or destructive plans)","description":"Scope: `commands:execute` (and the privileges of the user or service account behind the token).\n\nNeeds X-Vestoris-Confirm with the confirm_token of the preview.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"X-Vestoris-Confirm","in":"header","required":true,"description":"The confirm_token of the preview you are confirming.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandExecute"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"commands:execute"}},"/api/v1/commands/{id}/cancel":{"post":{"operationId":"aiCancel","tags":["AI"],"summary":"Cancel a previewed command","description":"Scope: `ai:use` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"ai:use"}},"/api/v1/webhooks":{"get":{"operationId":"webhooksList","tags":["Webhooks"],"summary":"Webhooks","description":"Scope: `webhooks:read` (and the privileges of the user or service account behind the token).","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:read"},"post":{"operationId":"webhooksCreate","tags":["Webhooks"],"summary":"Add a webhook (the signing secret is returned once)","description":"Scope: `webhooks:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/{id}":{"patch":{"operationId":"webhooksUpdate","tags":["Webhooks"],"summary":"Change events, URL or status","description":"Scope: `webhooks:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:write"},"delete":{"operationId":"webhooksDelete","tags":["Webhooks"],"summary":"Delete a webhook","description":"Scope: `webhooks:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"204":{"description":"Done (no content)"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/{id}/deliveries":{"get":{"operationId":"webhooksDeliveries","tags":["Webhooks"],"summary":"The delivery log","description":"Scope: `webhooks:read` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"\"-id\" (newest first, default) or \"id\"","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse fieldset: comma-separated field names","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending, delivered, failed, dead","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:read"}},"/api/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver":{"post":{"operationId":"webhooksRedeliver","tags":["Webhooks"],"summary":"Send a delivery again","description":"Scope: `webhooks:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/{id}/ping":{"post":{"operationId":"webhooksPing","tags":["Webhooks"],"summary":"Send a test event","description":"Scope: `webhooks:write` (and the privileges of the user or service account behind the token).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Any unique string up to 255 characters; the response is replayed for 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"webhooks:write"}},"/api/v1/owner/inquiries":{"get":{"operationId":"ownerInquiries","tags":["Owner"],"summary":"Inquiries from the site's forms (site administrators only)","description":"Scope: `owner:inquiries` (and the privileges of the user or service account behind the token).","parameters":[{"name":"q","in":"query","required":false,"description":"Search","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-500","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryList"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"412":{"$ref":"#/components/responses/412"},"422":{"$ref":"#/components/responses/422"},"428":{"$ref":"#/components/responses/428"},"429":{"$ref":"#/components/responses/429"}},"x-required-scope":"owner:inquiries"}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An OAuth access token (vat_...), a personal access token (vpt_...), or (deprecated, data endpoints only) a legacy key (vst_...)."},"oauth2":{"type":"oauth2","description":"Authorization code needs PKCE (S256). Client credentials act as the client's service account.","flows":{"clientCredentials":{"tokenUrl":"https://vestoris.com/oauth/token","scopes":{"firm:read":"Read the firm's settings","firm:write":"Change the firm's settings (Admins)","users:read":"Read users, roles and privileges","admin:users":"Invite users, change roles, privileges and status (Admins)","entitlements:read":"Read per-account permissions","entitlements:write":"Change per-account permissions (Admins)","access_reviews:read":"Read access reviews","access_reviews:write":"Start and sign off access reviews","reference:read":"Read securities, issuers, accounts, groups, models, benchmarks, brokers, lists and user-defined fields","reference:write":"Create and change reference data, models, groups, lists and user-defined field values","udf:admin":"Define user-defined fields (Admins)","portfolio:read":"Read positions, lots, cash, drift and risk","portfolio:write":"Propose rebalances and what-ifs; move simulated cash","market:read":"Read prices, FX rates, corporate actions and as-of history","orders:read":"Read orders, executions and blotter views","orders:write":"Create, amend, cancel, release and allocate orders; save blotter views","orders:approve":"Approve or reject orders and overrides (four eyes always applies)","pipeline:read":"Read intent-pipeline runs and proposals","pipeline:write":"Start and run intent-pipeline requests and create their orders","compliance:read":"Read rules, versions, packages, violations, overrides and the register","compliance:rules:write":"Draft rules, run the test bench, submit for sign-off","compliance:rules:approve":"Sign off compliance rules (a person, with a confirmation token)","compliance:violations:write":"Acknowledge, resolve, waive and escalate violations","compliance:reports:read":"Generate and read compliance reports and the register PDF","surveillance:read":"Read surveillance and anomaly alerts","surveillance:write":"Update surveillance alerts","workflow:read":"Read workflow items, rules, desks, SLAs, views and my work","workflow:act":"Claim, release, reassign, escalate, prioritise and comment on workflow items","workflow:rules:write":"Draft workflow rules, run the test bench, submit for sign-off","workflow:rules:approve":"Sign off workflow rules (a person, with a confirmation token)","data:read":"Read data loads, batches, bundles, feeds, schedules, jobs, start-of-day status and data quality","data:write":"Apply, undo and discard batches; review held feed files","events:read":"Read the event log and verify its hash chain","ai_log:read":"Read the AI interaction log","ai:use":"Ask the copilot and plan natural-language commands (AI outputs are proposals)","commands:execute":"Execute a previewed natural-language command (with its confirmation token)","webhooks:read":"Read webhooks and their deliveries","webhooks:write":"Configure webhooks and redeliver (Admins)","admin:api":"Manage OAuth clients, service accounts and API settings (Admins)","owner:inquiries":"The site owner's inquiries (site administrators only; never in a firm's tokens)","data:load:calendars":"Load the \"calendars\" data set","data:load:blackouts":"Load the \"blackouts\" data set","data:load:issuers":"Load the \"issuers\" data set","data:load:securities":"Load the \"securities\" data set","data:load:classifications":"Load the \"classifications\" data set","data:load:lists":"Load the \"lists\" data set","data:load:accounts":"Load the \"accounts\" data set","data:load:account_groups":"Load the \"account_groups\" data set","data:load:models":"Load the \"models\" data set","data:load:benchmarks":"Load the \"benchmarks\" data set","data:load:brokers":"Load the \"brokers\" data set","data:load:positions":"Load the \"positions\" data set","data:load:lots":"Load the \"lots\" data set","data:load:cash":"Load the \"cash\" data set","data:load:prices":"Load the \"prices\" data set","data:load:intraday_prices":"Load the \"intraday_prices\" data set","data:load:fx":"Load the \"fx\" data set","data:load:adv":"Load the \"adv\" data set","data:load:corporate_actions":"Load the \"corporate_actions\" data set","data:load:risk_factors":"Load the \"risk_factors\" data set","data:load:users":"Load users and roles (Admins)","data:load:<set>":"Load one data set (one scope per data set)"}},"authorizationCode":{"authorizationUrl":"https://vestoris.com/oauth/authorize","tokenUrl":"https://vestoris.com/oauth/token","refreshUrl":"https://vestoris.com/oauth/token","scopes":{"firm:read":"Read the firm's settings","firm:write":"Change the firm's settings (Admins)","users:read":"Read users, roles and privileges","admin:users":"Invite users, change roles, privileges and status (Admins)","entitlements:read":"Read per-account permissions","entitlements:write":"Change per-account permissions (Admins)","access_reviews:read":"Read access reviews","access_reviews:write":"Start and sign off access reviews","reference:read":"Read securities, issuers, accounts, groups, models, benchmarks, brokers, lists and user-defined fields","reference:write":"Create and change reference data, models, groups, lists and user-defined field values","udf:admin":"Define user-defined fields (Admins)","portfolio:read":"Read positions, lots, cash, drift and risk","portfolio:write":"Propose rebalances and what-ifs; move simulated cash","market:read":"Read prices, FX rates, corporate actions and as-of history","orders:read":"Read orders, executions and blotter views","orders:write":"Create, amend, cancel, release and allocate orders; save blotter views","orders:approve":"Approve or reject orders and overrides (four eyes always applies)","pipeline:read":"Read intent-pipeline runs and proposals","pipeline:write":"Start and run intent-pipeline requests and create their orders","compliance:read":"Read rules, versions, packages, violations, overrides and the register","compliance:rules:write":"Draft rules, run the test bench, submit for sign-off","compliance:rules:approve":"Sign off compliance rules (a person, with a confirmation token)","compliance:violations:write":"Acknowledge, resolve, waive and escalate violations","compliance:reports:read":"Generate and read compliance reports and the register PDF","surveillance:read":"Read surveillance and anomaly alerts","surveillance:write":"Update surveillance alerts","workflow:read":"Read workflow items, rules, desks, SLAs, views and my work","workflow:act":"Claim, release, reassign, escalate, prioritise and comment on workflow items","workflow:rules:write":"Draft workflow rules, run the test bench, submit for sign-off","workflow:rules:approve":"Sign off workflow rules (a person, with a confirmation token)","data:read":"Read data loads, batches, bundles, feeds, schedules, jobs, start-of-day status and data quality","data:write":"Apply, undo and discard batches; review held feed files","events:read":"Read the event log and verify its hash chain","ai_log:read":"Read the AI interaction log","ai:use":"Ask the copilot and plan natural-language commands (AI outputs are proposals)","commands:execute":"Execute a previewed natural-language command (with its confirmation token)","webhooks:read":"Read webhooks and their deliveries","webhooks:write":"Configure webhooks and redeliver (Admins)","admin:api":"Manage OAuth clients, service accounts and API settings (Admins)","owner:inquiries":"The site owner's inquiries (site administrators only; never in a firm's tokens)","data:load:calendars":"Load the \"calendars\" data set","data:load:blackouts":"Load the \"blackouts\" data set","data:load:issuers":"Load the \"issuers\" data set","data:load:securities":"Load the \"securities\" data set","data:load:classifications":"Load the \"classifications\" data set","data:load:lists":"Load the \"lists\" data set","data:load:accounts":"Load the \"accounts\" data set","data:load:account_groups":"Load the \"account_groups\" data set","data:load:models":"Load the \"models\" data set","data:load:benchmarks":"Load the \"benchmarks\" data set","data:load:brokers":"Load the \"brokers\" data set","data:load:positions":"Load the \"positions\" data set","data:load:lots":"Load the \"lots\" data set","data:load:cash":"Load the \"cash\" data set","data:load:prices":"Load the \"prices\" data set","data:load:intraday_prices":"Load the \"intraday_prices\" data set","data:load:fx":"Load the \"fx\" data set","data:load:adv":"Load the \"adv\" data set","data:load:corporate_actions":"Load the \"corporate_actions\" data set","data:load:risk_factors":"Load the \"risk_factors\" data set","data:load:users":"Load users and roles (Admins)","data:load:<set>":"Load one data set (one scope per data set)"}}}}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail","code"]},"OpenApi":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"type":"object"},"paths":{"type":"object"}},"required":["openapi","info","paths"]},"Me":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"kind":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"firm":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"demo":{"type":"boolean"}},"required":["id","name","demo"],"additionalProperties":false},"privileges":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"grant":{"type":"string"},"client_id":{"type":["string","null"]},"token_expires_at":{"type":["string","null"],"format":"date-time"},"paper_trading":{"type":"string"}},"required":["id","kind","name","role","firm","privileges","scopes","grant","client_id","token_expires_at","paper_trading"],"additionalProperties":false},"ScopeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScopeInfo"}}},"required":["data"],"additionalProperties":false},"ScopeInfo":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"}},"required":["scope","description"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"kind":{"type":"string"},"status":{"type":"string"},"result":{"description":"Any JSON value"},"error":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"poll":{"type":["string","null"]}},"required":["id","kind","status","result","error","created_at","started_at","finished_at","poll"],"additionalProperties":false},"Firm":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"code":{"type":"string"},"demo":{"type":"boolean"},"status":{"type":"string"},"settings":{"type":"object","properties":{"approval_order_value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"approval_pct_of_account":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"ai_enabled":{"type":"boolean"},"ai_retention_days":{"type":"integer"},"wash_window_days":{"type":"integer"},"spoof_cancel_minutes":{"type":"integer"},"spoof_min_value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"stuck_minutes":{"type":"integer"},"override_approval_value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"single_co_approval":{"type":"boolean"},"legacy_keys_enabled":{"type":"boolean"},"api_max_access_ttl":{"type":"integer"},"api_max_refresh_days":{"type":"integer"},"api_rate_per_minute":{"type":"integer"}},"required":["approval_order_value","approval_pct_of_account","ai_enabled","ai_retention_days","wash_window_days","spoof_cancel_minutes","spoof_min_value","stuck_minutes","override_approval_value","single_co_approval","legacy_keys_enabled","api_max_access_ttl","api_max_refresh_days","api_rate_per_minute"],"additionalProperties":false}},"required":["id","name","code","demo","status","settings"],"additionalProperties":false},"FirmPatch":{"type":"object","properties":{"name":{"type":"string"},"settings":{"type":"object"}}},"User":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"email":{"type":["string","null"]},"kind":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"privileges":{"type":"array","items":{"type":"string"}},"privilege_adjustments":{"type":"object"},"last_login_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","email","kind","role","status","privileges","privilege_adjustments","last_login_at","created_at"],"additionalProperties":false},"Invite":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"},"name":{"type":"string"}},"required":["email","role"]},"Invitation":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expires_in_days":{"type":"integer"}},"required":["email","role","status","expires_in_days"],"additionalProperties":false},"UserPatch":{"type":"object","properties":{"role":{"type":"string"},"status":{"type":"string"}}},"PrivilegeSet":{"type":"object","properties":{"state":{"type":"string"}},"required":["state"]},"RoleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}},"required":["data"],"additionalProperties":false},"Role":{"type":"object","properties":{"role":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"default_privileges":{"type":"array","items":{"type":"string"}},"max_account_permissions":{"type":"array","items":{"type":"string"}},"sees_all_accounts":{"type":"boolean"}},"required":["role","label","summary","default_privileges","max_account_permissions","sees_all_accounts"],"additionalProperties":false},"EntitlementList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Entitlement"}}},"required":["data"],"additionalProperties":false},"Entitlement":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^[0-9]+$"},"account_id":{"type":"string","pattern":"^[0-9]+$"},"view":{"type":"boolean"},"propose":{"type":"boolean"},"trade":{"type":"boolean"},"approve":{"type":"boolean"}},"required":["user_id","account_id","view","propose","trade","approve"],"additionalProperties":false},"PermissionSet":{"type":"object","properties":{"view":{"type":"boolean"},"propose":{"type":"boolean"},"trade":{"type":"boolean"},"approve":{"type":"boolean"}}},"AccessReview":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"period":{"type":"string"},"status":{"type":"string"},"drafted_by_ai":{"type":"boolean"},"draft":{"type":"string"},"recommendations":{"type":"array"},"created_at":{"type":["string","null"],"format":"date-time"},"signed_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"signed_at":{"type":["string","null"],"format":"date-time"},"sign_note":{"type":["string","null"]}},"required":["id","period","status","drafted_by_ai","draft","recommendations","created_at","signed_by","signed_at","sign_note"],"additionalProperties":false},"ReviewSignOff":{"type":"object","properties":{"apply":{"type":"array","items":{"type":"integer"}},"note":{"type":"string"}}},"Security":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"name":{"type":"string"},"isin":{"type":["string","null"]},"cusip":{"type":["string","null"]},"sedol":{"type":["string","null"]},"figi":{"type":["string","null"]},"sec_type":{"type":"string"},"sector":{"type":"string"},"industry":{"type":"string"},"issuer":{"type":"string"},"issuer_code":{"type":["string","null"]},"country":{"type":"string"},"asset_class":{"type":"string"},"market_cap_bucket":{"type":"string"},"currency":{"type":"string"},"exchange":{"type":"string"},"avg_daily_volume":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"esg_flags":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"user_defined":{"type":"object"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","symbol","name","isin","cusip","sedol","figi","sec_type","sector","industry","issuer","issuer_code","country","asset_class","market_cap_bucket","currency","exchange","avg_daily_volume","esg_flags","active","user_defined","created_at"],"additionalProperties":false},"SecurityIn":{"type":"object","properties":{"symbol":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"issuer":{"type":"string"},"user_defined":{"type":"object"}}},"Issuer":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"code":{"type":"string"},"name":{"type":"string"},"country":{"type":["string","null"]},"lei":{"type":["string","null"]},"parent_code":{"type":["string","null"]},"active":{"type":"boolean"},"user_defined":{"type":"object"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","code","name","country","lei","parent_code","active","user_defined","updated_at"],"additionalProperties":false},"Broker":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"code":{"type":"string"},"name":{"type":"string"},"country":{"type":["string","null"]},"lei":{"type":["string","null"]},"active":{"type":"boolean"},"user_defined":{"type":"object"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","code","name","country","lei","active","user_defined","updated_at"],"additionalProperties":false},"Benchmark":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"code":{"type":"string"},"name":{"type":"string"},"constituents":{"type":"array","items":{"$ref":"#/components/schemas/Constituent"}},"user_defined":{"type":"object"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","code","name","constituents","user_defined","updated_at"],"additionalProperties":false},"Constituent":{"type":"object","properties":{"symbol":{"type":"string"},"weight_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["symbol","weight_pct"],"additionalProperties":false},"AccountGroup":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^[0-9]+$"}},"other_accounts":{"type":"integer"},"user_defined":{"type":"object"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","code","name","description","account_ids","other_accounts","user_defined","created_at"],"additionalProperties":false},"AccountGroupIn":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"account_ids":{"type":"array"}},"required":["code","name"]},"SecurityList":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"member_count":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ListMember"}}},"required":["id","name","kind","description","created_at","member_count"],"additionalProperties":false},"ListMember":{"type":"object","properties":{"security_id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"reason":{"type":"string"},"added_at":{"type":["string","null"],"format":"date-time"},"user_defined":{"type":"object"}},"required":["security_id","symbol","reason","added_at","user_defined"],"additionalProperties":false},"ListMembersIn":{"type":"object","properties":{"symbols":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}},"required":["symbols"]},"UdfDefList":{"type":"object","properties":{"table":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UdfDef"}}},"required":["table","data"],"additionalProperties":false},"UdfDef":{"type":"object","properties":{"slot":{"description":"Any JSON value"},"column":{"type":"string"},"active":{"description":"Any JSON value"},"name":{"description":"Any JSON value"},"description":{"description":"Any JSON value"},"type":{"description":"Any JSON value"},"max_length":{"description":"Any JSON value"},"precision":{"description":"Any JSON value"},"scale":{"description":"Any JSON value"},"required":{"description":"Any JSON value"},"default":{"description":"Any JSON value"},"min":{"description":"Any JSON value"},"max":{"description":"Any JSON value"},"pattern":{"description":"Any JSON value"},"options":{"description":"Any JSON value"},"flags":{"type":"object"},"version":{"description":"Any JSON value"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["slot","column","active","name","description","type","max_length","precision","scale","required","default","min","max","pattern","options","flags","version","updated_at"],"additionalProperties":false},"UdfDefIn":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]},"UdfValues":{"type":"object","properties":{"table":{"type":"string"},"key":{"type":"string"},"values":{"type":"object"}},"required":["table","key","values"],"additionalProperties":false},"UdfValuesIn":{"type":"object","properties":{"values":{"type":"object"}},"required":["values"]},"Account":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"code":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"base_currency":{"type":"string"},"model_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"lot_method":{"type":"string"},"status":{"type":"string"},"value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"cash":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"cash_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"holdings":{"type":"integer"},"your_permissions":{"type":"array","items":{"type":"string"}},"user_defined":{"type":"object"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","code","name","strategy","tags","base_currency","model_id","lot_method","status","value","cash","cash_pct","holdings","your_permissions","user_defined","created_at"],"additionalProperties":false},"AccountIn":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string"},"tags":{"description":"Any JSON value"},"model_id":{"description":"Any JSON value"},"lot_method":{"type":"string"}}},"PositionList":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"as_of":{"type":"string","format":"date-time"},"value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"cash":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Position"}},"simulated":{"type":"boolean"}},"required":["account_id","as_of","value","cash","data","simulated"],"additionalProperties":false},"Position":{"type":"object","properties":{"security_id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"cost_basis":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"unrealized_pnl":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"weight_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["security_id","symbol","name","sector","quantity","price","value","cost_basis","unrealized_pnl","weight_pct"],"additionalProperties":false},"LotList":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lot"}}},"required":["account_id","data"],"additionalProperties":false},"Lot":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"security_id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"open_quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"original_quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"unit_cost":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"acquired_on":{"type":["string","null"],"format":"date"},"source":{"type":"string"}},"required":["id","security_id","symbol","open_quantity","original_quantity","unit_cost","acquired_on","source"],"additionalProperties":false},"Cash":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"balance":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"currency":{"type":"string"},"simulated":{"type":"boolean"},"movements":{"type":"array","items":{"$ref":"#/components/schemas/CashMovement"}}},"required":["account_id","balance","currency","simulated","movements"],"additionalProperties":false},"CashMovement":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"amount":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"reason":{"type":"string"},"at":{"type":["string","null"],"format":"date-time"}},"required":["id","amount","reason","at"],"additionalProperties":false},"CashMove":{"type":"object","properties":{"amount":{"type":"string"},"direction":{"type":"string"}},"required":["amount","direction"]},"Drift":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"model_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"tolerance_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"out_of_tolerance":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DriftLine"}}},"required":["account_id","model_id","tolerance_pct","out_of_tolerance","data"],"additionalProperties":false},"DriftLine":{"type":"object","properties":{"symbol":{"type":"string"},"target_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"actual_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"drift_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["symbol","target_pct","actual_pct","drift_pct"],"additionalProperties":false},"Risk":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"cash_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"holdings":{"type":"integer"},"top_position":{"type":["object","null"]},"top5_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"hhi":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"effective_n":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"sectors":{"type":"object"},"issuers":{"type":"object"},"factor_betas":{"description":"Any JSON value"},"volatility_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"correlation_spikes":{"type":"array"},"simulated":{"type":"boolean"}},"required":["account_id","value","cash_pct","holdings","top_position","top5_pct","hhi","effective_n","sectors","issuers","factor_betas","volatility_pct","correlation_spikes","simulated"],"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"description":{"type":"string"},"cash_target_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"drift_tolerance_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ModelTarget"}},"accounts":{"type":"integer"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","description","cash_target_pct","drift_tolerance_pct","targets","accounts","updated_at"],"additionalProperties":false},"ModelTarget":{"type":"object","properties":{"symbol":{"type":"string"},"target_pct":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["symbol","target_pct"],"additionalProperties":false},"ModelIn":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"cash_target_pct":{"description":"Any JSON value"},"drift_tolerance_pct":{"description":"Any JSON value"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ModelTargetIn"}}},"required":["name","targets"]},"ModelTargetIn":{"type":"object","properties":{"symbol":{"type":"string"},"target_pct":{"description":"Any JSON value"}},"required":["symbol","target_pct"],"additionalProperties":false},"RebalanceIn":{"type":"object","properties":{"account_ids":{"type":"array"},"params":{"type":"object"}},"required":["account_ids"]},"WhatIfIn":{"type":"object","properties":{"account_ids":{"type":"array"},"params":{"type":"object"}},"required":["account_ids","params"]},"Proposal":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"account_id":{"type":"string","pattern":"^[0-9]+$"},"source":{"type":"string"},"status":{"type":"string"},"pipeline_run_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"request":{"type":"string"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/ProposedTrade"}},"summary":{"description":"Any JSON value"},"explanation":{"type":"string"},"explanation_by_ai":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","account_id","source","status","pipeline_run_id","request","trades","summary","explanation","explanation_by_ai","created_at"],"additionalProperties":false},"ProposedTrade":{"type":"object","properties":{"symbol":{"type":"string"},"side":{"type":"string"},"quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["symbol","side","quantity","price","value"],"additionalProperties":false},"PipelineRun":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"request":{"type":"string"},"status":{"type":"string"},"interpreted_by_ai":{"type":"boolean"},"intent":{"description":"Any JSON value"},"stages":{"description":"Any JSON value"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"note":{"type":"string"}},"required":["id","request","status","interpreted_by_ai","intent","stages","created_at","updated_at","note"],"additionalProperties":false},"PipelineIn":{"type":"object","properties":{"text":{"type":"string"},"run":{"type":"boolean"}},"required":["text"]},"PriceList":{"type":"object","properties":{"symbol":{"type":"string"},"source":{"type":"string"},"simulated":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}}},"required":["source","simulated","data"],"additionalProperties":false},"Price":{"type":"object","properties":{"symbol":{"type":"string"},"date":{"type":"string"},"close":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["symbol","date","close"],"additionalProperties":false},"FxList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FxRate"}}},"required":["data"],"additionalProperties":false},"FxRate":{"type":"object","properties":{"base":{"type":"string"},"quote":{"type":"string"},"date":{"type":"string"},"rate":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["base","quote","date","rate"],"additionalProperties":false},"CorporateAction":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"ref":{"type":"string"},"security_id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"kind":{"type":"string"},"ex_date":{"type":["string","null"],"format":"date"},"pay_date":{"type":["string","null"],"format":"date"},"ratio":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"amount":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"status":{"type":"string"},"applied_at":{"type":["string","null"],"format":"date-time"}},"required":["id","ref","security_id","symbol","kind","ex_date","pay_date","ratio","amount","status","applied_at"],"additionalProperties":false},"AsOf":{"type":"object","properties":{"dataset":{"type":"string"},"key":{"type":"string"},"date":{"type":"string"},"record":{"type":"object"},"valid_from":{"type":["string","null"],"format":"date"},"valid_to":{"type":["string","null"],"format":"date"},"batch_id":{"type":["string","null"],"pattern":"^[0-9]+$"}},"required":["dataset","key","date","record","valid_from","valid_to","batch_id"],"additionalProperties":false},"Order":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"security_id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"side":{"type":"string"},"order_type":{"type":"string"},"limit_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"quantity":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"filled_quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"avg_fill_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"state":{"type":"string"},"compliance_state":{"type":"string"},"is_block":{"type":"boolean"},"algo":{"type":"string"},"slices":{"type":"integer"},"arrival_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"approval_required":{"type":"boolean"},"approval_reason":{"type":"string"},"status_reason":{"type":"string"},"notes":{"type":"string"},"venue":{"type":"string"},"created_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"approved_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"trader_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"pipeline_run_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"proposal_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"allocations":{"type":"array","items":{"$ref":"#/components/schemas/Allocation"}},"hidden_allocations":{"type":"integer"},"allocated_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"working_at":{"type":["string","null"],"format":"date-time"},"done_at":{"type":["string","null"],"format":"date-time"},"simulated":{"type":"boolean"},"result":{"type":"object","properties":{"state":{"type":"string"},"compliance":{"type":"array"},"approvals_needed":{"type":"array"},"needs_override":{"type":"boolean"},"override":{"description":"Any JSON value"}},"required":["state","compliance","approvals_needed","needs_override","override"],"additionalProperties":false},"history":{"type":"array","items":{"$ref":"#/components/schemas/OrderHistory"}}},"required":["id","security_id","symbol","side","order_type","limit_price","quantity","filled_quantity","avg_fill_price","state","compliance_state","is_block","algo","slices","arrival_price","approval_required","approval_reason","status_reason","notes","venue","created_by","approved_by","trader_id","pipeline_run_id","proposal_id","allocations","hidden_allocations","allocated_at","created_at","submitted_at","approved_at","working_at","done_at","simulated"],"additionalProperties":false},"OrderSummary":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"symbol":{"type":"string"},"side":{"type":"string"},"order_type":{"type":"string"},"quantity":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"filled_quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"limit_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"avg_fill_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"state":{"type":"string"},"compliance_state":{"type":"string"},"is_block":{"type":"boolean"},"algo":{"type":"string"},"created_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","symbol","side","order_type","quantity","filled_quantity","limit_price","avg_fill_price","state","compliance_state","is_block","algo","created_by","created_at"],"additionalProperties":false},"Allocation":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9]+$"},"quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"filled_quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"}},"required":["account_id","quantity","filled_quantity"],"additionalProperties":false},"OrderHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"by":{"type":["string","null"],"pattern":"^[0-9]+$"},"reason":{"type":"string"},"at":{"type":["string","null"],"format":"date-time"}},"required":["from","to","by","reason","at"],"additionalProperties":false},"OrderIn":{"type":"object","properties":{"symbol":{"type":"string"},"security_id":{"description":"Any JSON value"},"side":{"type":"string"},"order_type":{"type":"string"},"limit_price":{"description":"Any JSON value"},"notes":{"type":"string"},"allocations":{"type":"array","items":{"$ref":"#/components/schemas/AllocationIn"}}},"required":["side","allocations"]},"AllocationIn":{"type":"object","properties":{"account_id":{"description":"Any JSON value"},"quantity":{"description":"Any JSON value"},"lot_ids":{"type":"array"}},"required":["account_id","quantity"],"additionalProperties":false},"OrderAmend":{"type":"object","properties":{"quantity":{"description":"Any JSON value"},"limit_price":{"description":"Any JSON value"},"reason":{"type":"string"}}},"Reason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"Note":{"type":"object","properties":{"note":{"type":"string"}}},"Release":{"type":"object","properties":{"algo":{"type":"string"},"slices":{"type":"integer"},"mode":{"type":"string"}}},"Decision":{"type":"object","properties":{"decision":{"type":"string"},"note":{"type":"string"}},"required":["decision"]},"FillList":{"type":"object","properties":{"order_id":{"type":"string","pattern":"^[0-9]+$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Fill"}}},"required":["order_id","data"],"additionalProperties":false},"Fill":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"order_id":{"type":"string","pattern":"^[0-9]+$"},"quantity":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"arrival_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"market_price":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"slippage_bps":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"sim_time":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"simulated":{"type":"boolean"}},"required":["id","order_id","quantity","price","arrival_price","market_price","slippage_bps","sim_time","created_at","simulated"],"additionalProperties":false},"Override":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"order_id":{"type":"string","pattern":"^[0-9]+$"},"order_value":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"reason":{"type":"string"},"status":{"type":"string"},"requested_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"requested_at":{"type":["string","null"],"format":"date-time"},"decided_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"decided_at":{"type":["string","null"],"format":"date-time"},"decision_note":{"type":["string","null"]}},"required":["id","order_id","order_value","reason","status","requested_by","requested_at","decided_by","decided_at","decision_note"],"additionalProperties":false},"BlotterViewList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlotterView"}}},"required":["data"],"additionalProperties":false},"BlotterView":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"shared":{"type":"boolean"},"mine":{"type":"boolean"},"my_default":{"type":"boolean"},"firm_default":{"type":"boolean"},"config":{"description":"Any JSON value"},"notices":{"type":"array"}},"required":["id","name","shared","mine","my_default","firm_default","config"],"additionalProperties":false},"BlotterViewIn":{"type":"object","properties":{"name":{"type":"string"},"config":{"type":"object"},"shared":{"type":"boolean"}},"required":["name","config"]},"Rule":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"lineage_id":{"type":"string","pattern":"^[0-9]+$"},"version":{"type":"integer"},"name":{"type":"string"},"rule_type":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"display_status":{"type":"string"},"pending_action":{"type":"string"},"definition":{"type":"object","properties":{"params":{"type":"object"},"scope":{"type":"object","properties":{"type":{"type":"string"},"ids":{"type":"array","items":{"type":"string","pattern":"^[0-9]+$"}}},"required":["type","ids"],"additionalProperties":false},"run_points":{"type":"array"}},"required":["params","scope","run_points"],"additionalProperties":false},"definition_hash":{"type":"string"},"restatement":{"type":"string"},"source_text":{"type":"string"},"drafted_by_ai":{"type":"boolean"},"test_bench":{"type":["object","null"]},"effective_from":{"type":["string","null"],"format":"date-time"},"effective_to":{"type":["string","null"],"format":"date-time"},"created_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"created_at":{"type":["string","null"],"format":"date-time"},"decided_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"decided_at":{"type":["string","null"],"format":"date-time"},"decision_note":{"type":"string"}},"required":["id","lineage_id","version","name","rule_type","severity","status","display_status","pending_action","definition","definition_hash","restatement","source_text","drafted_by_ai","test_bench","effective_from","effective_to","created_by","created_at","decided_by","decided_at","decision_note"],"additionalProperties":false},"RuleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}}},"required":["data"],"additionalProperties":false},"RuleIn":{"type":"object","properties":{"name":{"type":"string"},"rule_type":{"type":"string"},"params":{"type":"object"},"scope":{"type":"object"},"severity":{"type":"string"},"run_points":{"type":"array","items":{"type":"string"}},"change_of":{"description":"Any JSON value"},"source_text":{"type":"string"}}},"Days":{"type":"object","properties":{"days":{"type":"integer"}}},"SignOffPreview":{"type":"object","properties":{"rule":{"type":"object"},"action":{"type":"string"},"restatement":{"type":"string"},"test_bench":{"description":"Any JSON value"},"confirm_token":{"type":"string"},"how":{"type":"string"},"source_text":{"type":"string"},"four_eyes":{"type":"object"},"needs":{"type":"array","items":{"type":"string"}}},"required":["rule","action","restatement","test_bench","confirm_token","how"],"additionalProperties":false},"SignOff":{"type":"object","properties":{"reason":{"type":"string"},"effective":{"type":"string"}},"required":["reason"]},"Violation":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"kind":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"rule_id":{"type":"string","pattern":"^[0-9]+$"},"rule_name":{"type":"string"},"rule_type":{"type":"string"},"account_id":{"type":"string","pattern":"^[0-9]+$"},"account_name":{"type":"string"},"order_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"security_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"symbol":{"type":["string","null"]},"measured":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"limit":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"message":{"type":"string"},"owner_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"due_at":{"type":["string","null"],"format":"date-time"},"review_note":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"history":{"type":"array"}},"required":["id","kind","status","severity","rule_id","rule_name","rule_type","account_id","account_name","order_id","security_id","symbol","measured","limit","message","owner_id","due_at","review_note","created_at","reviewed_at","resolved_at"],"additionalProperties":false},"ViolationTransition":{"type":"object","properties":{"to":{"type":"string"},"note":{"type":"string"},"owner_id":{"description":"Any JSON value"},"due":{"type":"string"}}},"PackageList":{"type":"object","properties":{"data":{"type":"array"},"groups":{"type":"array"},"exceptions":{"type":"array"}},"required":["data","groups","exceptions"],"additionalProperties":false},"Register":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RegisterEntry"}},"generated_at":{"type":"string","format":"date-time"},"note":{"type":"string"}},"required":["data","generated_at","note"],"additionalProperties":false},"RegisterEntry":{"type":"object","properties":{"lineage_id":{"type":"string","pattern":"^[0-9]+$"},"current":{"$ref":"#/components/schemas/Rule"},"violations":{"type":"integer"},"open_violations":{"type":"integer"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}},"approvals":{"type":"array"}},"required":["lineage_id","current","violations","open_violations","versions","approvals"],"additionalProperties":false},"Report":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"title":{"type":"string"},"period_start":{"type":["string","null"],"format":"date"},"period_end":{"type":["string","null"],"format":"date"},"status":{"type":"string"},"drafted_by_ai":{"type":"boolean"},"text":{"type":"string"},"final_sha256":{"type":["string","null"]},"facts":{"type":"object"},"created_at":{"type":["string","null"],"format":"date-time"},"finalized_at":{"type":["string","null"],"format":"date-time"}},"required":["id","title","period_start","period_end","status","drafted_by_ai","text","final_sha256","facts","created_at","finalized_at"],"additionalProperties":false},"ReportIn":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"Alert":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"kind":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"summary":{"type":"string"},"details":{"type":"object"},"suggested_fix":{"type":"string"},"narrative":{"type":["string","null"]},"narrative_by_ai":{"type":"boolean"},"user_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"account_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"order_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"security_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"review_note":{"type":"string"},"reviewer_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"created_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","severity","status","summary","details","suggested_fix","narrative","narrative_by_ai","user_id","account_id","order_id","security_id","review_note","reviewer_id","created_at","reviewed_at"],"additionalProperties":false},"AlertReview":{"type":"object","properties":{"status":{"type":"string"},"note":{"type":"string"}},"required":["status"]},"WorkflowItem":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"type":{"type":"string"},"item_id":{"type":"string","pattern":"^[0-9]+$"},"title":{"type":"string"},"status":{"type":"string"},"outcome":{"type":["string","null"]},"stage":{"type":"string"},"stage_label":{"type":"string"},"priority":{"type":"integer"},"owner_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"owner":{"type":"string"},"desk_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"desk":{"type":"string"},"requester_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"accounts":{"type":"array"},"symbol":{"type":["string","null"]},"notional":{"type":["string","null"],"pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"A decimal number as a string"},"origin":{"type":"string"},"age_seconds":{"type":"integer"},"in_stage_seconds":{"type":"integer"},"sla":{"type":"string"},"sla_minutes":{"type":["integer","null"]},"sla_due_at":{"type":["string","null"],"format":"date-time"},"escalation_level":{"type":"integer"},"blocking":{"type":["string","null"]},"next_action":{"type":["string","null"]},"can":{"type":"object"},"why":{"type":"string"},"decision":{"type":"object"},"progress":{"description":"Any JSON value"},"your_approval_counts":{"type":"boolean"},"stages":{"type":"array"},"comments":{"type":"array"},"watching":{"type":"boolean"},"note":{"type":"string"}},"required":["id","type","item_id","title","status","outcome","stage","stage_label","priority","owner_id","owner","desk_id","desk","requester_id","accounts","symbol","notional","origin","age_seconds","in_stage_seconds","sla","sla_minutes","sla_due_at","escalation_level","blocking","next_action","can"],"additionalProperties":false},"WorkflowAction":{"type":"object","properties":{"action":{"type":"string"},"user_id":{"description":"Any JSON value"},"desk_id":{"description":"Any JSON value"},"priority":{"description":"Any JSON value"},"why":{"type":"string"},"body":{"type":"string"}},"required":["action"]},"MyWork":{"type":"object","properties":{"waiting":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"}},"requested":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"}},"watching":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"}}},"required":["waiting","requested","watching"],"additionalProperties":false},"WorkflowRule":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"lineage_id":{"type":"string","pattern":"^[0-9]+$"},"version":{"type":"integer"},"name":{"type":"string"},"item_type":{"type":"string"},"priority":{"type":"integer"},"status":{"type":"string"},"state":{"type":"string"},"is_default":{"type":"boolean"},"conditions":{"description":"Any JSON value"},"actions":{"type":"array"},"restatement":{"type":"string"},"source_text":{"type":"string"},"drafted_by_ai":{"type":"boolean"},"pending_action":{"type":["string","null"]},"weakens":{"type":"boolean"},"weakens_why":{"type":"string"},"signoffs":{"type":"object","properties":{"admin":{"type":["string","null"],"pattern":"^[0-9]+$"},"compliance":{"type":["string","null"],"pattern":"^[0-9]+$"}},"required":["admin","compliance"],"additionalProperties":false},"test_bench":{"type":["object","null"]},"effective_from":{"type":["string","null"],"format":"date-time"},"effective_to":{"type":["string","null"],"format":"date-time"},"created_by":{"type":["string","null"],"pattern":"^[0-9]+$"},"created_at":{"type":["string","null"],"format":"date-time"},"done":{"type":"boolean"},"still_needed":{"type":"array","items":{"type":"string"}}},"required":["id","lineage_id","version","name","item_type","priority","status","state","is_default","conditions","actions","restatement","source_text","drafted_by_ai","pending_action","weakens","weakens_why","signoffs","test_bench","effective_from","effective_to","created_by","created_at"],"additionalProperties":false},"WorkflowRuleIn":{"type":"object","properties":{"text":{"type":"string"},"name":{"type":"string"},"item_type":{"type":"string"},"priority":{"type":"integer"},"conditions":{"type":"object"},"actions":{"type":"array"},"change_of":{"description":"Any JSON value"}}},"WorkflowSignOff":{"type":"object","properties":{"as":{"type":"string"},"note":{"type":"string"},"effective":{"type":"string"}},"required":["as"]},"DeskList":{"type":"object","properties":{"data":{"type":"array"}},"required":["data"],"additionalProperties":false},"SlaList":{"type":"object","properties":{"data":{"type":"array"}},"required":["data"],"additionalProperties":false},"MonitorViewList":{"type":"object","properties":{"data":{"type":"array"}},"required":["data"],"additionalProperties":false},"LegacyBatch":{"type":"object","properties":{"ok":{"type":"boolean"},"batch":{"type":"object","properties":{"id":{"type":"integer"},"dataset":{"type":"string"},"status":{"type":"string"},"file_name":{"type":"string"},"sha256":{"type":["string","null"]},"business_date":{"type":["string","null"]},"counts":{"description":"Any JSON value"},"message":{"type":["string","null"]},"hold_reason":{"type":["string","null"]},"created_at":{"type":["string","null"]},"applied_at":{"type":["string","null"]}},"required":["id","dataset","status","file_name","sha256","business_date","counts","message","hold_reason","created_at","applied_at"],"additionalProperties":false},"review":{"type":["string","null"]}},"required":["ok","batch","review"],"additionalProperties":false},"LegacyBatchStatus":{"type":"object","properties":{"ok":{"type":"boolean"},"batch":{"type":"object","properties":{"id":{"type":"integer"},"dataset":{"type":"string"},"status":{"type":"string"},"file_name":{"type":"string"},"sha256":{"type":["string","null"]},"business_date":{"type":["string","null"]},"counts":{"description":"Any JSON value"},"message":{"type":["string","null"]},"hold_reason":{"type":["string","null"]},"created_at":{"type":["string","null"]},"applied_at":{"type":["string","null"]}},"required":["id","dataset","status","file_name","sha256","business_date","counts","message","hold_reason","created_at","applied_at"],"additionalProperties":false},"progress":{"type":"object","properties":{"rows":{"type":"integer"},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false}},"required":["ok","batch","progress"],"additionalProperties":false},"LegacyBundle":{"type":"object","properties":{"ok":{"type":"boolean"},"bundle":{"type":"object"},"needs_review":{"type":"array","items":{"type":"string"}}},"required":["ok","bundle"],"additionalProperties":false},"LegacyFeedFile":{"type":"object","properties":{"ok":{"type":"boolean"},"result":{"type":"string"},"business_date":{"type":["string","null"]},"code":{"type":"string"},"message":{"type":"string"},"batch":{"type":["integer","null"]}},"required":["ok","result","business_date","code","message","batch"],"additionalProperties":false},"Batch":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"dataset":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"mode":{"type":"string"},"file_name":{"type":"string"},"sha256":{"type":"string"},"business_date":{"type":["string","null"],"format":"date"},"counts":{"type":"object"},"message":{"type":"string"},"hold_reason":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"applied_at":{"type":["string","null"],"format":"date-time"},"undone_at":{"type":["string","null"],"format":"date-time"}},"required":["id","dataset","status","source","mode","file_name","sha256","business_date","counts","message","hold_reason","created_at","applied_at","undone_at"],"additionalProperties":false},"BatchRows":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BatchRow"}},"next_offset":{"type":["integer","null"]},"has_more":{"type":"boolean"}},"required":["batch","data","next_offset","has_more"],"additionalProperties":false},"BatchRow":{"type":"object","properties":{"row":{"type":"integer"},"status":{"type":"string"},"key":{"type":"string"},"data":{"type":"object"},"diff":{"type":"object"},"errors":{"type":"array"}},"required":["row","status","key","data","diff","errors"],"additionalProperties":false},"FeedList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Feed"}}},"required":["data"],"additionalProperties":false},"Feed":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"name":{"type":"string"},"dataset":{"type":"string"},"source":{"type":"string"},"format":{"type":"string"},"filename_pattern":{"type":"string"},"apply_mode":{"type":"string"},"expected_by":{"type":["string","null"]},"cutoff":{"type":["string","null"]},"calendar":{"type":"string"},"sod_step":{"type":["string","null"]},"depends_on":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"}},"required":["id","name","dataset","source","format","filename_pattern","apply_mode","expected_by","cutoff","calendar","sod_step","depends_on","active"],"additionalProperties":false},"FeedRunList":{"type":"object","properties":{"business_date":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FeedRun"}}},"required":["business_date","data"],"additionalProperties":false},"FeedRun":{"type":"object","properties":{"id":{"type":["string","null"],"pattern":"^[0-9]+$"},"feed_id":{"type":"string","pattern":"^[0-9]+$"},"feed":{"type":"string"},"dataset":{"type":"string"},"status":{"type":"string"},"file_name":{"type":"string"},"batch_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"rows":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"arrived_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}},"required":["id","feed_id","feed","dataset","status","file_name","batch_id","rows","code","message","arrived_at","finished_at"],"additionalProperties":false},"HeldReview":{"type":"object","properties":{"action":{"type":"string"},"reason":{"type":"string"}},"required":["action"]},"ScheduleList":{"type":"object","properties":{"data":{"type":"array"},"recent_runs":{"type":"array"}},"required":["data","recent_runs"],"additionalProperties":false},"StartOfDay":{"type":"object","properties":{"business_date":{"type":"string"},"status":{"type":"string"},"steps":{"description":"Any JSON value"},"message":{"type":"string"},"completed_at":{"type":["string","null"],"format":"date-time"},"override_reason":{"type":"string"}},"required":["business_date","status","steps","message"],"additionalProperties":false},"DqIssue":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"detector":{"type":"string"},"severity":{"type":"string"},"dataset":{"type":"string"},"key":{"type":"string"},"summary":{"type":"string"},"details":{"type":"object"},"narrative":{"type":["string","null"]},"status":{"type":"string"},"first_seen":{"type":["string","null"],"format":"date-time"},"last_seen":{"type":["string","null"],"format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["id","detector","severity","dataset","key","summary","details","narrative","status","first_seen","last_seen","resolved_at"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"at":{"type":["string","null"],"format":"date-time"},"user_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"actor":{"type":"string"},"category":{"type":"string"},"action":{"type":"string"},"entity_type":{"type":["string","null"]},"entity_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"account_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"outcome":{"type":"string"},"details":{"type":"object"},"prev_hash":{"type":"string"},"hash":{"type":"string"}},"required":["id","at","user_id","actor","category","action","entity_type","entity_id","account_id","outcome","details","prev_hash","hash"],"additionalProperties":false},"ChainCheck":{"type":"object","properties":{"ok":{"type":"boolean"},"rows":{"type":"integer"},"first_bad_id":{"type":["string","null"]},"verified_at":{"type":["string","null"],"format":"date-time"}},"required":["ok","rows","first_bad_id","verified_at"],"additionalProperties":false},"AiInteraction":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"user_id":{"type":["string","null"],"pattern":"^[0-9]+$"},"client_id":{"type":["string","null"]},"purpose":{"type":"string"},"model":{"type":"string"},"fallback":{"type":"boolean"},"ok":{"type":"boolean"},"error":{"type":["string","null"]},"latency_ms":{"type":"integer"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"input_sha256":{"type":"string"},"output_sha256":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","user_id","client_id","purpose","model","fallback","ok","error","latency_ms","input_tokens","output_tokens","input_sha256","output_sha256","created_at"],"additionalProperties":false},"Question":{"type":"object","properties":{"question":{"type":"string"}},"required":["question"]},"CopilotAnswer":{"type":"object","properties":{"answer":{"type":"string"},"by_ai":{"type":"boolean"},"suggested_actions":{"type":"array"},"note":{"type":"string"}},"required":["answer","by_ai","suggested_actions","note"],"additionalProperties":false},"CommandIn":{"type":"object","properties":{"text":{"type":"string"},"answer_to":{"description":"Any JSON value"}},"required":["text"]},"CommandExecute":{"type":"object","properties":{}},"Command":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"screen":{"type":"string"},"text":{"type":"string"},"status":{"type":"string"},"planned_by_ai":{"type":"boolean"},"question":{"type":["string","null"]},"message":{"type":"string"},"plan":{"type":"object"},"preview":{"type":["object","null"]},"item_count":{"type":"integer"},"confirm_token":{"type":["string","null"]},"typed_confirmation":{"type":["string","null"]},"results":{"type":"array"},"created_at":{"type":["string","null"],"format":"date-time"},"previewed_at":{"type":["string","null"],"format":"date-time"},"executed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","screen","text","status","planned_by_ai","question","message","plan","preview","item_count","confirm_token","typed_confirmation","results","created_at","previewed_at","executed_at"],"additionalProperties":false},"WebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"event_types":{"type":"array","items":{"$ref":"#/components/schemas/ScopeLikeType"}},"signing":{"type":"string"}},"required":["data","event_types","signing"],"additionalProperties":false},"ScopeLikeType":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"],"additionalProperties":false},"Webhook":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"description":{"type":"string"},"failing_deliveries":{"type":"integer"},"created_at":{"type":["string","null"],"format":"date-time"},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":"string"},"secret_note":{"type":"string"}},"required":["id","url","events","status","description","failing_deliveries","created_at","last_delivery_at"],"additionalProperties":false},"WebhookCreated":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"description":{"type":"string"},"failing_deliveries":{"type":"integer"},"created_at":{"type":["string","null"],"format":"date-time"},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":["string","null"]},"secret_note":{"type":"string"}},"required":["id","url","events","status","description","failing_deliveries","created_at","last_delivery_at","secret","secret_note"],"additionalProperties":false},"WebhookIn":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"description":{"type":"string"},"rotate_secret":{"type":"boolean"}}},"Delivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$"},"webhook_id":{"type":"string","pattern":"^[0-9]+$"},"event_type":{"type":"string"},"event_id":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"integer"},"last_status":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"payload":{"description":"Any JSON value"}},"required":["id","webhook_id","event_type","event_id","status","attempts","last_status","last_error","next_attempt_at","created_at","delivered_at","payload"],"additionalProperties":false},"InquiryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Inquiry"}}},"required":["data"],"additionalProperties":false},"Inquiry":{"type":"object","properties":{"id":{"type":"string"},"received_at":{"type":["string","null"],"format":"date-time"},"form":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"subject":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}},"required":["id","received_at","form","name","email","phone","company","subject","message","status"],"additionalProperties":false}},"responses":{"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or privilege","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found (also for what you may not see)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict or invalid state","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"The resource changed (ETag)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"A precondition header is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}